Amazon S3
or Amazon Simple Storage
Service
(a global service with regional
storage)
AWS
AWS
OS/APP/INSTALL
Heavy Read/writes
Quick/reading/
S3/EFS
Some
time/Reading
Long term storage
Auditing/compliance
AWS
AWS
AWS
● S3 is an Object level storage (not a Block level storage) and
cannot be used to host OS or dynamic websites
● S3 bucket names are globally unique, regardless of the AWS
region in which you create the bucket
● S3 is a global service, however, buckets are created within a
region specified during the creation of the bucket
● no limit to the number of objects that can be stored in a bucket
● Buckets cannot be nested and cannot have bucket within another
bucket. Can have folders inside a bucket.They are path variables
and not the container.
AWS
AWS
† Because S3 One Zone-IA stores data in a single AWS Availability Zone, data
stored in this storage class will be lost in the event of Availability Zone
destruction.
★ Can I have a bucket that has different objects in different
storage classes? -- Yes
★ What is S3 Intelligent-Tiering?
An S3 storage class for data with unknown access
patterns or changing access patterns that are difficult to
learn. It is the first cloud storage class that delivers
automatic cost savings by moving objects between two
access tiers when access patterns change. One tier is
optimized for frequent access and the other lower-cost tier
is designed for infrequent access.
S3 Intelligent-Tiering works by monitoring access patterns
and then moving the objects that have not been accessed
in 30 consecutive days to the infrequent access tier.
❖ Objects of size 5GB can be uploaded in a single PUT
operation
❖ Multipart upload – can be used for objects of size > 5GB
and supports max size of 5TB can is recommended for
objects above size 100MB
❖ Amazon S3 costs vary by Region
❖ Charges in S3 are incurred for
● Storage – cost is per GB/month
● Requests – per request cost varies depending on the
request type GET, PUT
● Data Transfer
○ data transfer in is free
○ data transfer out is charged per GB/month
AWS S3 Data Consistency Model
● S3 achieves high availability by replicating data across
multiple servers within Amazon’s data centers.
● S3 provides read-after-write consistency for PUTS of
new objects
● S3 provides eventual consistency for overwrite PUTS
and DELETES
● Updates to a single key are atomic. for e.g., if you PUT to an
existing key, a subsequent read might return the old data or
the updated data, but it will never write corrupted or
partial data.
Region specific
AWS
AWS
Bucket Policy and ACL
S3 bucket policies, are attached only to S3 buckets. S3 bucket
policies specify what actions are allowed or denied for which
principals on the bucket that the bucket policy is attached to
(e.g. allow user Alice to PUT but not DELETE objects in the
bucket).
You attach S3 bucket policies at the bucket level (i.e. you can’t
attach a bucket policy to an S3 object), but the permissions
specified in the bucket policy apply to all the objects in the
bucket.
Bucket Policy is very handy in giving bucket access to a
different AWS account users without creating roles.
Bucket policies are recommended over ACLs.
➔ ACLs is a legacy access control mechanism that predates
IAM and Bucket Policy
➔ With help of ACLs, we can only give simple permissions
➔ Complex permissions can only be given via Bucket Policy
(e.g. allow user Alice to PUT but not DELETE objects in the
bucket).
➔ In ACL, you can’t DENY any permission, it can only ALLOW
READ/WRITE
➔ ACL is coarse-grained access control but Bucket Policy is
fine-grained access control
Cross-Origin Resource Sharing (CORS)
● defines a way for client web applications that are loaded in
one domain to interact with resources in a different domain
● With CORS support, you can build rich client-side web
applications with Amazon S3 and selectively allow cross-
origin access to your Amazon S3 resources
Use-case Scenarios
● This is practically beyond the domain of this training. It
involves knowledge of JavaScript to perform proper
scripting.
S3 in nutshell
Pros
1)Object Store /Cloud Store
2)Global As accessible from http://link/url
3)Fully Managed and backed up by AWS
4)No worries about maintenance…..just pay a monthly bill…..cheapest storage option
5)Unlimited Storage size……unlimited objects…..low latency access
6)Object is like File….. max size 5TB
7)Bucket is like Folder/Directory….max no of buckets 100….should be unique like DNS names
8)Good for Video/media/pictures/logs ..files which require more reading less writing
9)An Object is made up of any file(mp3/mpeg/jpeg/logs)…
10)Metadata related to file…..when was it created …size of object…etc
11)Identified by Key name/uniqe_id which is like filename
12)Many features like Versioning/cross-region-replication/static-webhosting
13)Life cycle Management and storage classess
14)Supports Encryption…..IAM policies…..HTTPS……very secure
15)Eleven nines Durability 99.999999999%
16)High Availability four nines 99.99%
17)Read After Write Consistency
Cons
1)Not good for files which require continuous modification/writing
2)Not good for OS and Application installation
3)For Accessing files every time requires (Download/Get……/Upload/Put)