Day 43 Task: S3 Programmatic access with AWS-CLI

Day 43 Task: S3 Programmatic access with AWS-CLI

ยท

2 min read

๐Ÿ”ถ S3 (Simple Storage Service)

Amazon Simple Storage Service (Amazon S3) is an object storage service that provides a secure and scalable way to store and access data on the cloud. It is designed for storing any kind of data, such as text files, images, videos, backups, and more. Read more here

๐Ÿ”ถ Task-01: Access the file from the EC2 instance using the AWS Command Line Interface (AWS CLI)

  • Launch an EC2 instance using the AWS Management Console and connect to it using Secure Shell (SSH).
    Log in to AWS Management Console and Launch instances.

    Connect with SSH.

  • Create an S3 bucket and upload a file to it using the AWS Management Console.

    Make a unique name for your S3 bucket.

  • Go to your bucket and upload some files.

  • Access the file from the EC2 instance using the AWS Command Line Interface (AWS CLI).
    use to install awscli sudo apt-get install awscli

  • Check the awscli installation by using the awscli --version

    Configure awscli.

    use aws s3 cp "$aws s3 cp s3://bucket/folder/file.txt" to copy a file from the s3 bucket.

Read more about S3 using aws-cli here

๐Ÿ”ถ Task-02: Create a snapshot of the EC2 instance and use it to launch a new EC2 instance.

  • Snapshot created.

    Now Create an image from the snapshot.

    Name your image.

  • Once you create an image go to AMIs.

    Select an image for launch instances from the images

    Now Connect with your instances.

    You have to configure aws it with your access key and secret keys

  • Download a file from the S3 bucket using the AWS CLI.

  • Verify that the contents of the file are the same on both EC2 instances.

  • Happy Learning :)

    If you find my blog valuable, I invite you to like, share, and join the discussion. Your feedback is immensely cherished as it fuels continuous improvement. Let's embark on this transformative DevOps adventure together! ๐Ÿš€ #devops #90daysofdevop #AWS

ย