AWS S3 interview questions

36) What is S3 One Zone-IA storage class?
S3 One Zone-IA storage class is an Amazon S3 storage class that customers can choose to store objects in a single availability zone. S3 One Zone-IA storage redundantly stores data within that single Availability Zone to deliver storage at 20% less cost than geographically redundant S3 Standard-IA storage, which stores data redundantly across multiple geographically separate Availability Zone.S3 One Zone-IA storage class offers the same performance as S3 Standard and S3 Standard-Infrequent Access storage.

37) Explain process of mounting s3 to ec2 instance?
Follow below steps to mount s3 to ec2 instance
a. Update the system : apt-get update
b. Install the dependencies : sudo apt-get install automake autotools-dev fuse g++ git libcurl4-gnutls-dev libfuse-dev libssl-dev libxml2-dev make pkg-config
c. Clone s3fs source code from git : git clone https://github.com/s3fs-fuse/s3fs-fuse.git
d. Run below commands to change source code directory, compile and install the code.
cd s3fs-fuse
./autogen.sh
./configure –prefix=/usr –with-openssl
make
sudo make install
e. Run s3fs command to check where command is placed
which s3fs
f. Get your access key and secret key ready.
g. Create a new file in /etc with the name passwd-s3fs and paste your access key and secret key.
touch /etc/passwd-s3fs
vim /etc/passwd-s3fs
Your_accesskey:Your_secretkey
h. Change the permission of the file
sudo chmod 640 /etc/passwd-s3fs
i. Now create a directory or provide the path of an existing directory and mount S3bucket in it.
mkdir /mys3bucket
s3fs your_bucketname -o use_cache=/tmp -o allow_other -o uid=1001 -o mp_umask=002 -o multireq_max=5 /mys3bucket

38) How to install aws s3 cli?
You need Python2 version 2.6.5+ or Python3 version 3.3+
pip install awscli –upgrade –user
For window and other OS please read: https://docs.aws.amazon.com/cli/latest/userguide/installing.html

39) How to clear AWS S3 cache?
Login to AWS Console and go to Distribution Settings > Invalidations > Create Invalidation. Once invalidation is created just type path of file or a wildcard to purge the cache.Use invalidations to clear AWS S3 cache.

40) How to get or create AWS S3 access key?
Open the IAM console.
Click Users.
Select IAM user name.
Click User Actions,
Click Manage Access Keys.
Click Create Access Key.
Your keys will look something like this:
Access key ID example: AKIAIOSFODNN7EXAMPLE
Secret access key example: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
Click Download Credentials, and store the keys in a secure location.

Author: user

Leave a Reply