Lesson 3 S3
Lesson 3 S3
2
Content
• Storage classes
• Object lifecycles
• Global replication
• VPC Gateway Endpoint for S3
• Static website hosting
• S3 with CloudFront
• Object versioning
• Object encryption
Simple Storage Service - S3
Amazon S3 has a simple interface that you can use to store and retrieve
any amount of data, at any time, from anywhere on the web. It's
infinitely scaling storage.
It gives any user access to the same highly scalable, reliable, fast data
storage infrastructure that Amazon uses to run its own global network
of websites.
In S3, you can store anything such as images, videos, blobs, and so on.
You can even store a payload. And encrypt the payload with built-in S3
encryption.
Object
Bucket
Folder Object
AWS S3 Regions
When you create a bucket, you must select a specific region for it. This
means that any data you upload to the S3 bucket will be physically
located in a data center in that region. Later on, you can replicate your
data in different regions.
Note: You must provide public access to both the bucket and object in order to make it available to the world.
Object Durability is the percent (%) over a one-year time period that a file stored in S3 will not be lost.
Object Availbility is the percent (%) over a one-year time period that a file stored in S3 will be accessible.
11 Nines Data Durability
If you store 1 million objects in S3 for 10 million years, you would
expect to lose 1 file.
There’s a higher likelihood of an asteroid destroying Earth within a
million years.
S3 Object Lifecycle
An object lifecycle is a set of rules that automate the migration of an
object's storage class to a different storage class, or its deletion, based
on specified time intervals for cost optimization.
The best practice is to put AWS CloudFront (CDN service) on top of the
S3 bucket so your static website will be cached globally. Then you can
create Origin Access Identity (OAI) and put that in the bucket policy.
S3 Bucket
SNS Lambda
SQS
S3 Global Replication
Replication enables automatic, asynchronous copying of objects across
Amazon S3 buckets between different accounts and regions.
An object may be replicated to a single destination bucket or multiple
destination buckets.
Customers needing a predictable replication time backed by a Service
Level Agreement (SLA) can use Replication Time Control (RTC) to
replicate objects in less than 15 minutes.
When to use S3 Replication
• Data redundancy – If you need to maintain multiple copies of your
data in the same, or different AWS Regions, or across different
accounts. S3 Replication powers your global content distribution
needs, compliant storage needs, and data sharing across accounts.
Replica copies are identical to the source data, that retain all
metadata, such as the original object creation time, ACLs, and version
IDs.
• Replicate objects to more cost-effective storage classes — You can
use S3 Replication to put objects into S3 Glacier, S3 Glacier Deep
Archive, or another storage class in the destination buckets.
• Maintain object copies under a different account
When to use Cross-Region Replication
S3 Cross-Region Replication (CRR) is used to copy objects across Amazon S3
buckets in different AWS Regions.
• Meet compliance requirements — Although Amazon S3 stores your data
across multiple geographically distant Availability Zones by default,
compliance requirements might dictate that you store data at even greater
distances (regions).
• Minimize latency — If your customers are in two geographic locations, you
can minimize latency in accessing objects by maintaining object copies in
AWS Regions that are geographically closer to your users.
• Increase operational efficiency — If you have compute clusters in two
different AWS Regions that analyze the same set of objects, you might
choose to maintain object copies in those Regions.
When to use Same-Region Replication
Same-Region Replication (SRR) is used to copy objects across Amazon
S3 buckets in the same AWS Region. SRR can help you do the following:
• Aggregate logs into a single bucket — If you store logs in multiple
buckets or across multiple accounts, you can easily replicate logs into
a single, in-Region bucket. This allows for simpler processing of logs in
a single location.
• Configure live replication between production and test accounts —
If you or your customers have production and test accounts that use
the same data, you can replicate objects between those multiple
accounts, while maintaining object metadata.
S3 Gateway Endpoint
VPC endpoints are easy to configure, highly reliable, and provide a
secure connection to public AWS resources such as S3 without going
out to the public internet. It uses AWS infrastructure. Hence, it is much
safer and faster.
You can use an S3 bucket policy to indicate which VPCs and which VPC
endpoints have access to your S3 buckets.
public private