AWS CloudShell: CLI Access to AWS Resources from your Browser

Cloudshell
Sharing is Caring:

Dear Reader, I hope you are doing good. Today I am here to share my experience with AWS CloudShell . CloudShell is a browser based shell that lets you interact with AWS resources via 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 no 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 comment section 🙂

Lets 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 few days ago. We discussed that CLI is one of the most important tool 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 setup is done. But trust me nothing can beat the flexibility to use your CLI at the reach of your finger tips even if you are not on your own machine.

To be honest, installing and setting up a CLI is neither very complex nor very much time consuming but still there are people like me out there who doesn’t want to install and setup CLI to fire a simple s3 ls command. I would love to stick to 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 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 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 details.

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 credential 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 like multiple tabs, text sizes, dark and light themes etc.
  • Terminals gets 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 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 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 anyway from using CloudShell. You can simply switch to a supported region and use CloudShell in a 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 uses.

How was I Surviving Before CloudShell?

As promised in 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 this perks of Cloud9, there is catch.

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

You have few more options like EC2 instance connect or jump servers but let me tell you all of them runs 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 command line setup already.

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

aws --version

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

CLI V2 is installed

Lets try one of the the simplest CLI command and 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 after whenever you need to use AWS CLI, feel free to launch a CloudShell session and enjoy a hassle free experience.

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 at free of cost to you and you can launch up to 10 sessions at a time in each supported regions
  • It provides 1 GB of persistent storage so that you can save your work done in 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:

Sharing is Caring:

Leave a Reply

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