S3 Flashcards

1
Q

What do you need to do to allow a client to do requests on your S3 bucket?

A

Allow public access and enable CORS headers on the bucket. The CORS header is “Access-Control-Allow-Origin”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Your application on EC2 creates images thumbnails after profile photos are uploaded to Amazon S3. These thumbnails can be easily recreated, and only need to be kept for 45 days. The source images should be able to be immediately retrieved for these 45 days, and afterwards, the user can wait up to 6 hours. How would you design this?

A

S3 source images can be on Standard, with a lifecycle configuration to transition them to Glacier after 45 days.
The thumbnails can be kept on One Zone-IA with a lifecycle configuration to delete them after 45 days. One Zone is better because it’s cheaper, and in case of disaster, the thumbnails can be recreated

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

A rule in your company states that you should be able to recover your deleted S3 objects immediately for 15 days, although this may happen rarely. After this time, and for up to 365 days, deleted objects should be recoverable within 48 hours

A

You need to enable S3 versioning, so that “deleted objects” are just hidden by a delete marker and can be recovered.
You can transition the noncurrent versions of the objects to IA, and transition them to Deep Archive after 15 days.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How long is the minimum storage time for an object in Glacier?

A

90 days

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Does S3 Transfer Acceleration support Multi-Part uploads?

A

Yes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What happen if you delete a versioned object?

A

The object is not actually deleted, a delete marker is instead created and the object is hidden

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How many S3 buckets can you have with a new account?

A

100

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

When creating a website, and hosting exclusively on S3 while using Route53 to point an Alias to the bucket, what naming conventions must be met?

A

Bucket name must match the URL

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are the limit to upload and retrieve data to S3 per second?

A

3500 req/s per bucket prefix to add data
5500 req/s per bucket prefix to retrieve data
prefix = folder path in which the object is contained

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is a namespace in Glacier called?

A

Vault

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Can you set a retention policy specifically for an object version?

A

Yes, each version of an object can have its own retention policy

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Can you create a lifecycle policy to move object from S3 Standard to S3 One Zone-IA after 1 week?

A

No, the minimum duration to transition from Standard to One Zone-IA is 30 days

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What’s the minimum storage duration charge for S3 Zone-IA and S3 Standard-IA

A

30 days

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

You want to grant access to S3 to a specific user, what would you use?

A

Bucket or IAM policies.
Not ACL, because ACL can only grant access at the AWS account level

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Can you lock an object in S3?

A

Yes, you can do it with two different modes
Compliance mode: the object cannot be deleted by any user (including root), its retention mode cannot be changed and the retention period cannot be shortened
Governance mode: the object can be deleted or the retention period changed only by users with special permissions

You can set a retention period, or put a legal hold. Legal hold means that the object has no expiration

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Which destinations are supported by S3 Event Notifications?

A

Lambda, SNS, SQS (only Standard, not FIFO)

17
Q

You have a static website hosted with S3. How does the endpoint looks like?

A

http://bucket-name.s3-website.Region.amazonaws.com
or
http://bucket-name.s3-website-Region.amazonaws.com

18
Q

How to guarantee that an S3 bucket is accessed only by CloudFront?

A

Create Origin Access Identity

19
Q

What is the minimum days storage charge for S3 classes?

A

Any class can be changed immediately except for Standard-IA and OneZone-IA, in which the objects must stay for at least 30 days in S3 Standard

After they are transitioned, the objects will be charged for a minimum length of:
30 days - Standard-IA, OneZone-IA
90 days - Glacier Instant Retrieval, Glacier Flexible Retrieval
180 days - Glacier Deep Archive

20
Q

What’s the difference between S3 Replication and S3 Batch Replication?

A

Batch Replication allows to replicate existing data

21
Q

Does S3 Replication allow replicating the deletion of objects?

A

It allows replicating delete markers, but not deleting an actual object version, to avoid malicious deletes