AWS S3 Interview Questions and Answers:

  • By
  • June 10, 2021
  • AWS

Q: What is AWS?

Ans: AWS  is an abbreviation for Amazon Web Services. Its actually a subsidiary  of Amazon. With AWS, Amazon provides on-demand infrastructure, various managed services and cloud computing platform to organizations, governments or individuals on pay-as-you-go basis. It was launched in March 2006.

 

Q: What is S3?

Ans: Simple Storage Service (S3) is a object class storage that allows users and applications to access it over the Internet. S3 in theory provides unlimited storage and offers various flexible options for storage cost optimization. S3 was one of the first services to be launched with AWS Cloud in 2006. Since then S3, has been made more robust and featuristic over the period of years.

For Free, Demo classes Call: 7798058777
Registration Link: Click Here!

Q: What is Versioning in S3?

Ans: Versioning is a feature supported by S3 buckets. Versioning is enabled globally on the bucket. With versioning, one can track various changes made into a file over a period of time. If versioning is enabled, every time a file is uploaded, every file gets a unique Version ID. Consider a bucket has a file and a user uploads a new modified copy of the same file in the bucket, both the files have their unique Version ID and the timestamps when they were uploaded. So, if one needs to go back in time to an older state of the file, it becomes easy with versioning. Please note that in different scenarios versioning can prove to be expensive.

Also note that Versioning in S3 may look similar to Version Control System (VCS), but is quiet different to it. If your developers need a VCS solution, please use Git, SVN, or any other similar product.

 

Q: Explain Lifecycle Policy in S3?

Ans: Lifecycle Policy in S3 is an offering from AWS for storage cost optimization. Its actually allows one to define data retention rule for S3 Objects in a bucket. One can safely handle his data and define rules such that data dynamically transitions through various object class and gets deleted once it is no longer needed. 

Lifecycle policy are defined at the level of bucket with a maximum limit of 1000 policies per bucket. Different policies can be used to apply on a collection of objects filtered with an option of ‘Prefix’.

 

Q: What is Replication Rule feature supported by AWS S3 ?

Ans: With S3 Amazon provides a lot of useful features. One such feature is Replication Rules. Replication rules allows us to replicate the data to a secondary region so that we can continuously allow our users and customers to access the data. Replication rules allows to reduce upon the cost by replicating specific type of data and not all the data in the bucket. Also, when the data is replicated to the secondary region, one can transform the data storage class to optimize upon the cost.

 

Q: Explain Object Lock feature in AWS S3?

Ans: S3 object lock allows us to store object using WORM model (write-once-read-many). The feature allows a S3 user to protect his data from being over-written or deleated for a cfertain amount of time or indefinately. S3 object lock is often implemented by various orginizations to meet regulatory requirements that needs WORM storage.

For Free, Demo classes Call: 7798058777
Registration Link: Click Here!

Q: What are the retention options offered by S3 object lock?

Ans: S3 object lock offers mainly two methods for object retention:

Retention Period: This method allows a user to define a retention period in days, months or years, for an object uploaded in S3 bucket. During this period  one cannot over-write or delete a protected object.

Legal Holds: This method is similar to Retention Period, but there’s no duration defining the term for which the object will be locked in the bucket. Legal Hold configuration stays enabled until a user explicitly disabled it. 

 

Q: What are the steps to encrypt a file in S3 ?

Ans: Its easy to encrypt a file in S3 bucket. While uploading a file using S3 management console, one can simply expand property option and choose if AWS Managed key should be used or Customer Managed key is to be used for file encryption. Consider if the file is already uploaded, one can easily navigate to properties of the file and enable encryption.

 

Q: What is Static Website Hosting in S3?

Ans: A static website is a simple html, css or javascript document stored in AWS S3 bucket. An S3 bucket can function as a web server to host this website. AWS has other services to host dynamic websites. 

To host static website from AWS S3 bucket, one needs to upload a html document in S3 bucket. In the bucket properties, you can easily find ‘Static Website Hosting’ option. Choose Enable option and mention the index document that was uploaded to S3. Remember the index document should be uploaded in the root of S3 bucket to keep things simple.

 

Q: Explain the steps of creating S3 Buckets.

Ans: When you login to AWS Management Console, navigate to S3. In the S3 Console you will find the create bucket option. Click on it. This should start the create bucket wizard. Type in your desired bucket name. Remember the name to be configured is to be unique. Choose upon a region where you want to create the desired bucket. Next option allows us to select a bucket from which you want to copy the settings. Next option allows to configure Public Access settings. We can choose to enable Bucket Versioning and configure Encryption in the next options. In the last option of Advance Settings, Object Lock can be Enabled. Remenber, in order to enable Object Lock, we need to enable Versioning first. Finally ‘Create Bucket’ button can be clicked to create the bucket. 

 

Q: What are steps of uploading a file in S3 Bucket?

Ans: Navigate to the bucket where you want to upload the file. Click on upload button to start the ‘upload file’ wizard. Next click on ‘Add Files’ button and select the file to be uploaded. Once the file got selected, other settings such as permissions and object storage class can be choosen. Finally we can click the ‘upload’ button to upload the file. Also please note, files larger that 160GB cannot be uploaded through the console. For files larger that 160GB , AWS CLI, AWS REST API or AWS SDK can be used.,

For Free, Demo classes Call: 7798058777
Registration Link: Click Here!

Q: What is a object URL and how is it constructed ?

Ans: Any file uploaded in S3 is reffered as ‘object’ in AWS terminology. Every object stored in S3 bucket has a unique url assigned to it. This url is simply the address of the object and it can be used to access the object if it is public, over the internet. Object url is constructed with ‘https://’ and the bucket name, then ‘s3-’ region API name and then ‘.amazonaws.com/’ then the file name with extensionand then ‘?versionId=’ the Version ID followed. The following is an example.

 

https://bucket1.s3-eu-west-1.amazonaws.com/test.txt?versionId=BGNasp.Ci7kkXIm46VA_7HrNdOh_4AkG

 

Please note, if this bucket would had been in Virginia region, the url wont consist the region API name in it and woul appear as follows:

 

https://bucket1.s3.amazonaws.com/test.txt?versionId=BGNasp.Ci7kkXIm46VA_7HrNdOh_4AkG

 

Author”-

 Shaikh, Aftab | SevenMentor Pvt Ltd.

Call the Trainer and Book your free demo Class for AWS

© Copyright 2021 | Sevenmentor Pvt Ltd.

Submit Comment

Your email address will not be published. Required fields are marked *

*
*