Section 13: Advanced Amazon S3 Flashcards
**
Can you transition objects between storage classes?
Yes
What are these lifecycle things called?
___
A) Configure obejcts to transition to another storage class.
* Move objects to Standard IA class 60 days after creation
* move to Glacier for achiving after 6 months
___
B) Configure objects to expire (delete) after some time
* access log files can be set to delte after 365 days
* can be used to delete old versions of files (if versioning is enabled)
* can be used to delete incomplete multi part uploads
- A) Transition Actions
- B) Expiration actions
On S3 Lifecycle Rules are these true?:
* A) Rules can be created for a certain prefix (ex: s3://mybucket/mp3/*)
* B) Rules can be created for certain object Tags (Department: Finance)
* C) Rules can be created for certain suffixes (ex: s3://mybucket/mp3/.jpg)
(honestly i don’t know how much you should worry about this one. The link on the answers page explains idk more of how these rules are categorized and stuff.)
I think, though am not certain, that you cannot create rules for suffixes. That would mean C is false.
To be clear, the suffix is .jpg. The prefix would be everything between s3://mybucket and .jpg.
Per https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-prefixes.html
Which, if any, of the following S3 bucket lifecycle rule actions are fake?
- A) Move current versions of objects between storage classes
- B) Move noncurrent versions of objects between storage classes
- C) expire current versions of objects
- D) permanently delete current versions of objects
- E) permanently delete noncurrent versions of objects
- F) delete expired object delete markers or incomplete multipart uploads
D is fake.
Your app on ec2 creates image thumbnails after profile photos are uploaded to amazon s3. These thumbnails can be easily recreated and only need to be kept for 60 days. THe soruce images should be able to be immediately retrieved for these 60 days, and afterwards, the user can wait up to 6 hours. How would you design this?
- S3 source images can be on Standard with a lifecycle configuration to transition them to Glacier after 60 days
- S3 thumbnails can be on One-Zone IA with a lifecycle configuration to expire them (delete them) after 60 days
In “One-Zone IA”, what does “IA” stand for?
Infrequent Access
https://aws.amazon.com/about-aws/whats-new/2018/04/announcing-s3-one-zone-infrequent-access-a-new-amazon-s3-storage-class/
A rule in your company states that you should be able to recover your deleted S3 objects immediately for 30 days, although this may happen rarely. After this timte, and for up to 365 days, deleted obejcts should be recoverable within 48 hours. What do you reccommend?
- Enable S3 Versioning in order to have pbject versions, so that “deleted objects” are in fact hidden by a “delete marker” and can be recovered.
- Transition the “noncurrent versions” of the object to Standard IA
- Transition afterwards the “noncurrent versions” to Glacier Deep Archive
What can you use to help you determine when you should move things to Standard and Standard Infrequent Access storage classes?
S3 Analytics. It sits on top of your S3 Bucket (whatever, basically, it’s connected to your S3 bucket and analyzes it). It makes recommendations (a cute little csv file) for when something could be Standard and Standard IA. This does not work for One-Zone IA or Glacier (not sure if he’s saying that the recommendations won’t be made for those things, or if he’s saying that if you’re on One-Zone IA or Glacier, then S3 can’t run). I kind of think both, actually. Report is updated daily. 24-48 hours to see analysis. Good first step to creating Lifecycle Rules.
S3 Event Notifications. Which of hte following, if any, is false. If any are false, what is/are the true versions?
- A) S3:ObjectCreated,S3:ObjectPermanence S3:ObjectRemoved,S3:ObjectRestore,S3:Replication
- B) Object name wildcard filtering (*.jpg) possible
- C) use case: generate thumbnails of images uploaded to S3
- D) Can carete as many S3 events as desired
- E) S3 event notifications deliver events usually in seconds, occassionally in minutes.
A) is false. The true version is
S3:ObjectCreated,S3:ObjectRemoved,S3:ObjectRestore,S3:Replication
Subsection 136: S3 Event Notifiactions
You don’t need IAM Roles for S3 Event Notifications
This is actually True!!! Another card goes into the details.
S3 Event Notifications get IAM Permissions through their own special resource (aka access) policies.
True
True/False. CloudWatch, SNS, SQS, and Lambda are all things that can be used to create S3 Event notifications.
If false, what’s the correct list?
SNS, SQS, and Lambda Functions can be used to create S3 Event Notifications
True/False: The names of the resource policies that can be used to create S3 Event Notifications are: (if false, what is the correct version?)
- CloudWatch Resource Policy
- SNS Resource Policy
- Lambda Resource Policy
- SQS Resource Plicy
- SNS Resource Policy
- Lambda Resource Policy
- SQS Resource Policy
True/False: This is an example of an SNS Resource Policy. If false, what is the correct version?
{
“Version”: “20212-10-17”,
“Statement”: {
“Action”: “SNS:Publish”,
““Principal”: {
“Service”: “s3.amazonaws.com”
},
“Resource”: “arn:aws:sns:us-east-1:12345667435:MyTopic”,
“Condition” {
“ArnLike”: {
“aws:SourceArn”: “arn:aws:s3:::MyBucket”
}
}
}
}
False. It was missing “Effect”: “Allow”. Here’s the correct version.
{
“Version”: “20212-10-17”,
“Statement”: {
“Effect”: “Allow”,
“Action”: “SNS:Publish”,
““Principal”: {
“Service”: “s3.amazonaws.com”
},
“Resource”: “arn:aws:sns:us-east-1:12345667435:MyTopic”,
“Condition” {
“ArnLike”: {
“aws:SourceArn”: “arn:aws:s3:::MyBucket”
}
}
}
}
Which of the following, if any, are false, and what is the true version. S3 Event Notifications with Amazon EventBridge
- A) advanced filtering options with JSON rules (metadata, pbject size, name)
- B) Over 100 Destinations (ex: Step Functions, Kinesis Streams / Firehose)
- C) EventBridge Capabilities (Archive, Replay Events, Reliable delivery)
B) Is false. The true version is that it has over 18 possible destinations. Not sure about the exact number, though I doubt that knowing the exact number is the important part.