AWS CloudShell: CLI Access to AWS Resources from your Browser

Cloudshell

AWS CloudShell: CLI Access to AWS Resources from your Browser

Dear Reader, I hope you are doing well. Today I am here to share my experience with AWS CloudShell. AWS CloudShell is a browser-based shell that lets you interact with AWS resources via the command line from your browser in a simple and secure way. It is available to you right from your AWS Management Console.

This simply means you don’t need to install and configure AWS CLI in your local system.

That’s awesome !!!

If you have already used CloudShell, great !!! I hope you get to learn something new here 🙂

However, If you haven’t used it yet, I am sure this post is gonna be very very exciting for you. Trust me, you will be tempted to try it out(Don’t worry- By the end of this post I will show you how you can get started with CloudShell in a matter of seconds).

The very first time I used CloudShell, I was blown away by the simplicity and ease of access it provides. I would love to hear your point of view as well. Please do share your experience in the comment section 🙂

Let’s get started…

A Bit of Background on AWS CLI

If you remember, I shared a post on 5 ways to create and manage resources in AWS a few days ago. We discussed that CLI is one of the most important tools when it comes to automating repetitive tasks using scripts or putting up a quick production fix and many more.

But to use AWS CLI, you are required to install CLI in your system, configure it with your credentials and then you can fire your first command.

You might find it easy and cool once the setup is done. But trust me nothing can beat the flexibility to use your CLI at the reach of your fingertips even if you are not on your own machine.

To be honest, installing and setting up a CLI is neither very complex nor very time-consuming but still, there are people like me out there who don’t want to install and setup CLI to fire a simple s3 ls command. I would love to stick to a browser while doing my day-to-day work in AWS including CLI ones.

You might ask me, how I was surviving before AWS CloudShell came into the picture in re:Invent 2020 . I will answer this question later in this post.

For now, let me just tell you that AWS CloudShell provides you with all that flexibility we were just talking about. You can use CLI from your AWS management console itself in your browser.

Does that sound cool to you?

Well, I am sure, It does 🙂

Having said that, CloudShell is not just AWS CLI. It has more to offer you. Stay with me to know in detail.

What is AWS CloudShell?

As the name says it is a Shell on the AWS Cloud. It is a browser-based shell that you can launch from your AWS Management Console. It lets you interact and manage your AWS resources in a hassle-free way.

  • It is pre-authenticated with your console credential. Therefore, you need not manage extra credentials such as AccesKeyId & SecretAccessKey)
  • You can run AWS CLI commands out of the box
  • You can use your preferred shell (Bash, PowerShell, or Z shell) while firing an AWS CLI command
  • You no more need to install AWS CLI in your local machine just to test a simple aws s3 ls command
  • You also have access to pre-installed tools and utilities such as git, make, pip, sudo, tar, tmux, vim, wget, and zip.
  • You can customize your terminal experience with multiple tabs, text sizes, dark and light themes etc.
  • Terminals get timed out in around 20 minutes of inactivity
  • It is completely free of cost

What you can do with CloudShell?

  • You can run AWS CLI commands in a matter of seconds
  • You can save your scripts in 1GB persistent storage available in your home directory for free
  • You can clone your script repo, do some work and finally commit those changes to your remote repo
  • You can upload and download files into your home directory from your local machine all using a browser
  • You can install your own software in CloudShell
  • Changes you make in your home directory will persist across sessions

What you can’t do with CloudShell?

  • As of now, you can’t access resources in your VPC
  • CloudShell by default comes with 1GB of persistent storage per region. You can’t increase this storage.
  • You can’t get Windows or macOS-backed CloudShell

CloudShell Supported Region

At the time of writing this post, AWS CloudShell is available in the following AWS Regions:

  • US East (Ohio)
  • US East (N. Virginia)
  • US West (Oregon)
  • Asia Pacific (Mumbai)
  • Asia Pacific (Sydney)
  • Asia Pacific (Tokyo)
  • Europe (Frankfurt)
  • Europe (Ireland)

However, please keep an eye on AWS official page for latest supported region

Having said about supported regions, If your selected region is not supported, it doesn’t restrict you in any way from using CloudShell. You can simply switch to a supported region and use CloudShell in the usual way.

AWS CloudShell Pricing

You can run up to 10 CloudShell sessions per supported region free of cost. You only pay for AWS resources you create/run for your use.

How was I Surviving Before CloudShell?

As promised at the beginning of this post, I will tell you, loving the browser-only cloud-native development, how I was surviving without this much-awaited tool from AWS.

Well, I heavily use AWS Cloud9 for my development purpose. Cloud9 is a browser-based IDE service on AWS where you can clone your repository and do your development work as any other IDE.

Cloud9 sessions are also pre-authenticated with your credentials and you get seamless access to AWS CLI and other tools in the integrated terminal.

While you may enjoy all these perks of Cloud9, there is a catch.

Cloud9 is not free. If you are out of your free tier you are gonna pay standard EC2 charges.

You have a few more options like EC2 instance connect or jump servers but let me tell you all of them run on EC2 and are not free, unlike CloudShell.

Getting Started With AWS Cloudshell

This section will help you get started with AWS Cloudshell. We will quickly launch a session and verify using a simple AWS S3 command.

Permission:

Before you can get started with AWS CloudShell, please make sure that you have the required permission to do so. By default, only Administrator or PowerUser role can start a CloudShell session. If you are neither of them, your administrator must allow you CloudShell access explicitly. You can check more about access details here.

Login to AWS Management Console and switch your region to one of the CloudShell supported region.

Click on the shell icon as shown in below screenshot

AWS CloudShell

As soon as you click on the shell icon, a new tab opens and you get a welcome message like below.

AWS CoudShell

Just close the dialog and you will see the command line setup already.

Let’s verify whether AWS CLI is already installed or not by using the below command

aws --version

As you can see in the below screenshot, CLI v2 is installed and you can run your AWS commands straightaway out of the box in a matter of seconds.

CLI V2 is installed

Let’s try one of the simplest CLI commands to see if it working as intended

List s3 buckets in my account

aws s3 ls

Here is the output:

Everything worked perfectly. So here whenever you need to use AWS CLI, feel free to launch a CloudShell session and enjoy a hassle-free experience.

What is the Difference Between AWS CLI and CloudShell?

AWS CLI is a tool you can install it on your system/computer/servers. You can configure it with your credentials and then fire an aws command using it.

Using CloudShell however, you cal do all of this from your browser without doing any configuration such as credentials setup.

ClpoudShell is always at your finger tips while you are logged into your AWS console.

Conclusion:

This post was all about AWS CloudShell and how you can get started with it quickly in a matter of seconds.

We learnt that-

  • CloudShell is an AWS service which provides browser-based command line access to AWS resources.
  • It is pre-authenticated with your console credentials so no need to manage those extra credentials in your local system.
  • It comes free of cost to you and you can launch up to 10 sessions at a time in each supported region
  • It provides 1 GB of persistent storage so that you can save your work done in the home directory. Next time when you launch a shell, your work won’t be lost
  • Your terminal will timeout after around 20 minutes of inactivity

Enjoyed the content?

Subscribe to our newsletter below to get awesome AWS learning materials delivered straight to your inbox.

Don’t forget to motivate me by-

  • Adding a comment below on what you liked and what can be improved.
  • Follow us on
  • Subscribe to our newsletter to get notified each time we post new content
  • Share this post with your friends

Suggested Read:

2 thoughts on “AWS CloudShell: CLI Access to AWS Resources from your Browser

Leave a Reply

Your email address will not be published. Required fields are marked *