AWS S3 interview questions

1) What is AWS S3 bucket and explain its properties?
Amazon S3 or Amazon Simple Storage Service is a service offered by Amazon Web Services (AWS) that provides object storage through a web service interface. It was Launched on March 14, 2006.Amazon S3 manages data with an object storage architecture
An object store .
You can store files and “folders” but can’t have locks, permissions etc like you would with a traditional file system.
Perfect for storing your images and videos for your website
Great for short term archiving . It’s good for long term archiving too
You can access the data from every region
Highly Available, Redundant. Basically data loss is not possible (99.999999999% durability, 99.9 uptime SLA)
Much cheaper than EBS.
You can serve the content directly to the internet
You can create static website working direct from S3, without an webserver or EC2 instance

2) What is the maximum size of S3 bucket?
Individual Amazon S3 objects can now range in size from 1 byte all the way to 5 terabytes (TB). Now customers can store extremely large files as single objects, which greatly simplifies their storage experience.

3) How to list objects of a S3 bucket using CLI commands?
use, aws s3 ls s3://mybucket –recursive command

4) How to display only files from aws s3 ls command?
Once you do ls, you can easily pipe it to another command to strip out the portion you don’t want.
aws s3 ls s3://mybucket –recursive | awk ‘{print $4}’

5) How to download entire S3 bucket?
You need to install any of the two
sudo easy_install awscli
or
sudo pip install awscli
Then you can do , aws s3 sync s3://<from_source_bucket> <to_local_destination>
You can also download a folder recursively
aws s3 cp s3://source_bucket/prefix_folder_path/ Local_folder_name –recursive
You can also use s3cmd to download your entire bucket:
s3cmd –configure
s3cmd sync s3://bucketnamehere/folder /destination/folder

Author: user

Leave a Reply