โ Day 10 of My Cloud Journey โ โ Hands-on with Amazon S3 using AWS CLI on EC2 ๐ป๐ชฃ

Today I rolled up my sleeves and got practical with one of the most valuable cloud combinations: Amazon EC2 + S3 + AWS CLI. This is where you start seeing how DevOps, automation, and cloud-native development come together in real workflows.
๐ What Was Today All About?
While the AWS Console is beginner-friendly and visual, the AWS CLI (Command Line Interface) offers powerful automation and scripting capabilities โ vital for production-grade environments.
Today, I connected to a running EC2 instance and used the AWS CLI to:
Create an S3 bucket
Upload/download files
Securely manage permissions with IAM Roles
Automate storage operations from the terminal
๐ ๏ธ What I Did (Hands-On Steps):
1๏ธโฃ Launched an EC2 Instance using Amazon Linux 2023
2๏ธโฃ SSH Access to connect securely via terminal
3๏ธโฃ Installed the AWS CLI (already pre-installed on Amazon Linux)
4๏ธโฃ Configured credentials using aws configure
(for test/demo only)
5๏ธโฃ Created a new S3 bucket directly from the terminal
6๏ธโฃ Uploaded and downloaded files
7๏ธโฃ Tested IAM Role-based Access without needing access keys ๐ฏ
๐ป CLI Commands I Practiced
Here's a cheat sheet of the AWS CLI commands I used:
bashCopyEditaws s3 mb s3://my-bucket-name # Create a bucket
aws s3 ls # List all buckets
aws s3 cp myfile.txt s3://my-bucket-name # Upload a file
aws s3 ls s3://my-bucket-name # List contents of the bucket
aws s3 cp s3://my-bucket-name/myfile.txt . # Download the file
aws s3 rm s3://my-bucket-name/myfile.txt # Delete the file
๐ IAM Roles vs. AWS Configure
Method | Description | Use Case |
aws configure | Manually set access key and secret | Not recommended for production |
IAM Role | Attach role to EC2 for secure, keyless access | โ Preferred for automation and security |
๐ Key Learning: IAM Roles eliminate the need to store credentials in code or config โ a major win for security-first cloud architectures.
๐ง What I Learned
โ
How EC2 and S3 work together seamlessly
โ
CLI operations are much faster and perfect for automation
โ
IAM Roles allow secure, credential-free access to services
โ
CLI is essential for DevOps tasks, backups, deployments, and more
๐ Real-World Use Cases
๐น Automate logs or reports upload to S3
๐น Backup critical files from EC2 to S3
๐น Lambda/EC2 fetching config/data from S3 at runtime
๐น Trigger events when objects are uploaded (using S3 events + Lambda)
๐น Build cron jobs for automated sync between local storage and S3
๐งฉ Recap: Why AWS CLI Matters in Cloud Workflows
Works consistently across platforms (Linux, macOS, Windows)
Enables scripting & automation
Faster than Console for bulk or repeated tasks
Easily integrates into CI/CD pipelines, Bash scripts, and cron jobs
Reduces error-prone manual processes.
๐ Whatโs Next?
๐ Tomorrow โ Day 11:
Weโll shift gears from storage to networking as I dive into Amazon VPC (Virtual Private Cloud) and explore:
๐น What is a VPC?
๐น Subnets (Public vs. Private)
๐น Internet Gateway (IGW)
๐น NAT Gateway
๐น Route Tables and how traffic flows in AWS
Understanding VPC is crucial for deploying secure and scalable cloud applications โ donโt miss it! ๐ง ๐
๐ท๏ธ Hashtags
#Day10 #30DaysOfCloud #AWS #S3 #AmazonS3 #AWSCLI #CloudComputing #EC2 #IAM #DevOps #LearnInPublic #CloudSkills #Automation #Hashnode #CloudStorage #TruptiMane #ShellScripting #CloudProjects #VPC #Networking #Day11Preview
Subscribe to my newsletter
Read articles from Pratik Das directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
