AWS CloudShell Cheat Sheet
AWS CloudShell is a browser-based shell, accessible directly from the AWS Management Console. It provides command-line access to your AWS resources, with a pre-configured environment that includes common tools and authenticated AWS credentials.
Core Features
-
Browser-Based Access: Launch a terminal session directly in your web browser without needing to install or configure any software on your local machine.
-
Pre-Authenticated Environment: CloudShell automatically uses the same IAM credentials as the user signed in to the AWS Management Console, simplifying authentication.
-
Pre-Installed Tools: The environment comes with the AWS CLI, AWS SDKs (for Python, Node.js, etc.), and other essential utilities like Git,
tar
,make
, and more. -
Persistent Storage: You get 1 GB of persistent storage in your
$HOME
directory per AWS Region. This allows you to store scripts, configuration files, and other data between sessions. -
Session Management: CloudShell uses
tmux
under the hood, allowing you to restore sessions even if you close and reopen the browser tab.
Environment Specifications
-
Operating System: Amazon Linux 2
-
Compute: 1 vCPU and 2 GiB of RAM
-
Available Shells:
-
Bash (
bash
) -
PowerShell (
pwsh
) -
Z shell (
zsh
)
-
-
Storage:
-
Persistent: 1 GB in the
/home/cloudshell-user
directory. -
Temporary: Storage outside the home directory is recycled after each session ends.
-
Key Operations and Customization
-
File Upload/Download: You can upload and download files (up to 1 GB) between your local machine and the CloudShell environment. This can be done via the "Actions" menu in the CloudShell interface.
-
Customization: The CloudShell interface allows for customization of:
-
Tabs and Layout: Split the terminal into multiple rows and columns.
-
Font Size: Adjust the text size for readability.
-
Color Theme: Switch between light and dark themes.
-
Security
-
IAM Integration: Access to CloudShell and the actions a user can perform within it are controlled by IAM policies attached to the user.
-
Safe Paste: This feature is enabled by default to protect against pasting malicious multi-line scripts. It requires you to confirm the paste operation, giving you a chance to review the code first.
Pricing
-
AWS CloudShell is available at no additional charge.
-
You only pay for the AWS resources that you create or run using CloudShell (e.g., launching an EC2 instance, storing data in S3).