UPCOMING EVENT Discover how nOps streamlines your cost optimization at AWS re: Invent - BOOK A MEETING

NEW Featured eBook: AWS Cloud Cost Allocation: The Complete Guide - Download Now

AWS CloudShell is a browser-based shell environment provided by Amazon Web Services (AWS) that allows you to interact with AWS services directly from your web browser. It is pre-configured with popular command-line tools, making it easy for you to manage AWS resources without needing to install or configure anything locally.
What is AWS CloudShell? (image source: AWS)
Let’s talk about the key benefits, how it works, and some frequently asked questions about AWS CloudShell.

How does AWS CloudShell work?

AWS CloudShell utilizes managed Amazon EC2 instances as its underlying infrastructure. When a user initiates a CloudShell session, AWS automatically provisions a temporary EC2 instance equipped with a Amazon Linux-based OS and pre-configured tools.

Users access CloudShell with their AWS Management Console credentials, with each session operating in an, isolated environment.

CloudShell provides 1 GB of persistent storage per user, per region, utilizing Amazon Elastic Block Store (EBS). This storage persists across sessions, is attached to the temporary EC2 instance during active sessions, and retained when the EC2 instance is terminated.

Each CloudShell session typically has access to the internet via AWS’s managed networks. For specific network control, users can integrate CloudShell with a Virtual Private Cloud (VPC), configuring appropriate subnets and security settings.

AWS CloudShell, a browser-based shell (image source: AWS)

Key features of AWS CloudShell

AWS CLI Integration: AWS CloudShell includes AWS CLI version 2 pre-installed, utilizing pre-authenticated session credentials from the AWS Management Console for direct interaction with AWS services.

Multiple Shell Environments: Users can run AWS CLI commands with Bash, PowerShell, or Z shell, with a variety of development tools such as git, vim, and Node.js readily available without the need for runtime installations.

Persistent Storage: Provides 1 GB of free storage per AWS Region, which is retained across sessions, allowing users to store scripts, configuration files, and other data.

VPC Integration: Enables the creation of a CloudShell environment within a user’s VPC, inheriting network configurations and allowing for secure operations alongside other VPC resources.

Security Features: Includes IAM for permissions management, automatic session management to terminate inactive or long sessions, and Safe Paste to guard against pasting malicious scripts.

Customization Options: Users can customize the CloudShell interface, including layout, text size, and theme. Additional customization is possible by installing personal software and scripting modifications.

CloudShell Session Restore: Capable of restoring previous sessions across browser tabs, including terminal outputs and processes, which is helpful for continuing work after interruptions without loss of context.

Limitations of CloudShell

AWS CloudShell is good for quick, ad-hoc management tasks, experimenting with AWS services, or when you need immediate access to AWS resources without setting up a local development environment.

However, it’s not suitable for long-term projects requiring extensive storage, high computational resources, or continuous access, due to its limitations on session duration, storage capacity, and environment customization. Let’s talk about a few of the limitations:

  • Storage Limitations: Offers only 1 GB of persistent storage per region, which might not suffice for larger projects or for developers who need to store extensive datasets or logs.
  • VPC Environment Limitations: Persistent storage is not available when using CloudShell in a VPC environment. Moreover, the session’s $HOME directory gets deleted after 20-30 minutes of inactivity or when the environment is restarted.
  • Resource Constraints: CloudShell sessions have limits on CPU and memory usage, which might restrict performance-intensive operations or running complex applications directly within the environment.
  • Network Restrictions: While VPC integration allows for secure resource access, network configurations and restrictions might limit external internet access or the use of certain ports, affecting how external services can be interacted with.
  • Session Duration: Sessions are automatically stopped after a period of inactivity, typically around 60 minutes. Long-running processes need to be managed accordingly to prevent unexpected terminations.
  • Limited Software Customization: While developers can install additional software, the baseline environment and pre-installed tools might not cover all needs or latest versions, requiring additional setup time at the start of each CloudShell session.

For a full list of AWS CloudShell limits, consult the CloudShell User Guide.

How to get started with AWS CloudShell.

To start a CloudShell session, select CloudShell in the AWS Management Console.

Select a Region and launch AWS CloudShell.

AWS CloudShell Session in the AWS management console (image source: AWS)

Consult the documentation for more details.

How does AWS CloudShell pricing work?

There is no additional charge for AWS CloudShell; you pay only for the AWS resources you use for your applications.

Data transfer is billed at standard AWS data transfer rates.

CloudShell vs...

AWS CloudShell vs AWS Command Line Interface

AWS CloudShell offers an integrated, browser-based shell that comes with the AWS CLI pre-installed, providing the convenience of accessing AWS resources directly without the need for local setup.

Unlike using AWS CLI on a local machine, CloudShell automatically handles authentication and session management, which simplifies workflows for users who switch between multiple accounts or regions. However, for more persistent, complex scripting or automation tasks that require advanced CLI features or configurations, the local AWS CLI setup is be preferable.

AWS CloudShell vs AWS Cloud9

AWS Cloud9 is a full-featured cloud-based integrated development environment (IDE) that supports direct coding, running, and debugging of applications within the cloud. It offers a rich set of features including direct integration with many AWS services, a more extensive range of pre-installed programming languages and tools, and collaborative coding features. Cloud9 is ideal for development projects that require a persistent, scalable, and collaborative development environment.

In contrast, AWS CloudShell is better suited for command-line operations and quick administrative tasks.

AWS CloudShell vs PowerShell

PowerShell is a powerful scripting language and command-line shell primarily used on Windows, though it has been made cross-platform. It is designed for system administration and automation of tasks across Microsoft and non-Microsoft platforms.

AWS CloudShell, while offering a choice to use PowerShell within its environment, is inherently more focused on providing immediate, pre-configured access to AWS services.

For managing a broader IT infrastructure that includes various operating systems and services outside of AWS, PowerShell is the more robust and flexible tool.

Get better performance at lower costs with nOps

If you’re looking to optimize your AWS costs, nOps makes it easy and painless for engineers to take action on cloud cost optimization.

The nOps all-in-one cloud platform features include:

Business Contexts: Understand and allocate 100% of your AWS bill down to the container level

Compute Copilot: Intelligent provisioner that helps you save with Spot discounts to reduce On-Demand costs by up to 90%

Commitment management: Automatic life-cycle management of your EC2/RDS/EKS commitments with risk-free guarantee

Storage migration: One-Click EBS volume migration

Rightsizing: EC2 instance rightsizing and Auto Scaling Groups rightsizing

Resource Scheduling: Automatically schedule and pause idle resources

nOps was recently ranked #1 with five stars in G2’s cloud cost management category, and we optimize $1.5+ billion in cloud spend for our customers.

Join our customers using nOps to understand your cloud costs and leverage automation with complete confidence by booking a demo today!