Hello, DevOps enthusiasts! Hope you're riding high on your tech journey. Today, in our #90DaysofDevOps Challenge, we're diving into the heart of AWS with the most ubiquitous service โ Amazon S3 (Simple Storage Service). Buckle up as we navigate the cloud storage waters!
Unveiling the Magic of Amazon S3 ๐ ๐
Amazon S3 is the go-to solution for storing and accessing data in the cloud securely and at scale. It's like a digital treasure chest that can hold anything โ from text files to images, videos, backups, and beyond.
๐ฏ Task-01: Let's Get Our Hands Dirty! ๐ง
Launch an EC2 Instance:
Head to the AWS Management Console.
Spin up an EC2 instance with the power of the cloud at your fingertips.
Connect via Secure Shell (SSH):
- Securely connect to your EC2 instance, setting the stage for the AWS CLI magic.
S3 Bucket Creation & File Upload:
Jump back to the AWS Management Console.
Craft an S3 bucket โ your digital haven.
Upload a file to your newfound bucket โ maybe a cat meme for good vibes?
AWS CLI from EC2:
Open up the AWS CLI on your EC2 instance.
Execute
aws s3 cp s3://your-bucket-name/your-file.txt .
โ bringing that file right to your EC2 doorstep!
๐ฏ Task-02: Taking it to the Next Level! ๐
EC2 Snapshot & New Instance:
Snap a picture of your EC2 instance โ create a snapshot.
Use the snapshot to launch a shiny new EC2 instance โ a clone of the original magic.
S3 File Download & Verification:
Fire up the AWS CLI again.
Execute
aws s3 cp s3://your-bucket-name/your-file.txt .
โ downloading that file like a pro.Verify the contents on both EC2 instances โ making sure your data travels securely.
๐ Some AWS CLI Commands in Your Toolkit ๐ง
aws s3 ls
: List all S3 buckets in your AWS account.aws s3 mb s3://bucket-name
: Create a new S3 bucket.aws s3 rb s3://bucket-name
: Delete an S3 bucket.aws s3 cp file.txt s3://bucket-name
: Upload a file to S3.aws s3 cp s3://bucket-name/file.txt .
: Download a file from S3.aws s3 sync local-folder s3://bucket-name
: Sync a local folder with S3.aws s3 ls s3://bucket-name
: List objects in an S3 bucket.aws s3 rm s3://bucket-name/file.txt
: Delete an object from an S3 bucket.aws s3 presign s3://bucket-name/file.txt
: Generate a pre-signed URL for temporary access.aws s3api list-buckets
: Retrieve a list of all S3 buckets using the S3 API.
Now you're armed with the AWS CLI magic โ shaping your cloud journey one command at a time! ๐๐ป Stay tuned for more adventures. #AWS #DevOps #CloudComputing #S3Magic #AWSCLIAdventures ๐โ
Thank you for reading this Blog. Hope you learned something new today! If you found this blog helpful, please like, share, and follow me for more blog posts like this in the future.
You can connect with me at: https://www.linkedin.com/in/davendersingh/