Migrating from AWS Cloud9 to AWS CloudShell: A Step-by-Step Guide
Siddharthrane07
Posted on August 11, 2024
With AWS discontinuing Cloud9 services for certain accounts as of July 25th, it's crucial to find an alternative way to continue your work. AWS CloudShell offers a powerful, browser-based shell environment that integrates well with AWS services. In this guide, I'll walk you through how to perform the same tasks you previously did in Cloud9 using CloudShell.
- Setting Up Your Environment in CloudShell Open AWS Management Console: Navigate to AWS CloudShell.
Launch CloudShell: Click on the CloudShell icon in the AWS Management Console. This opens a terminal directly in your browser, preconfigured with the AWS CLI.
Create a Working Directory: Use mkdir to create a new directory for your project.
mkdir my-project
cd my-project
- Configuring IAM Users Access IAM: In another browser tab, go to the AWS Management Console and search for IAM.
Create a New IAM User:
Go to Users and click on Add User.
Provide a username, select Custom Password, and set the password.
Click on Next: Permissions.
Create a User Group:
Click on Create Group, name the group, and attach the necessary policies.
Finish the setup by clicking on Next: Tags, then Next: Review, and finally Create User.
- Writing and Sharing an HTML File in CloudShell Create an HTML File:
In CloudShell, use a text editor like vi, nano, or even the CloudShell editor to create a new HTML file.
For example, to use nano:
nano index.html
Write your HTML code inside the file, save, and exit the editor.
Share the File:
Sharing isn’t as straightforward as Cloud9, but you can upload your file to an S3 bucket and set permissions for the IAM user to access it.
Use the following command to upload the file to S3:
aws s3 cp index.html s3://your-bucket-name/index.html
Grant the IAM user access to the S3 bucket by attaching the appropriate S3 policies to the user group.
- Accessing the Shared File Incognito Window: Open an incognito window and log in to the AWS Management Console as the IAM user. Navigate to the S3 bucket where the HTML file was uploaded. The IAM user will now be able to access the file, simulating the shared editing experience previously available in Cloud9. Conclusion While AWS CloudShell doesn’t yet offer all the collaborative features of Cloud9, it provides a powerful alternative for managing and running AWS CLI commands in a secure, browser-based environment. By following the steps outlined above, you can smoothly transition your workflow from Cloud9 to CloudShell.
Above is the overview,you can view the image
for the detailed commands.
Posted on August 11, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.