S3

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 16

S3

Can create upto 100 bucket


There is no limit to the number of objects that
can be stored in a bucket
After you have created a bucket, you can't
change its Region
You cannot create a bucket within another
bucket.
After you create an S3 bucket, you can't change
the bucket name
S3 Bucket Naming
• Bucket names must be unique across all
existing bucket names in Amazon S3.
• Bucket names must be at least 3 and no more
than 63 characters long.
• Bucket names must not contain uppercase
characters or underscores.
• Bucket names must start with a lowercase
letter or number.
• Bucket names must not be formatted as an IP
address (for example, 192.168.5.4).
Delete S3 Bucket
$ aws s3 rb s3://bucket-name --force

**You can delete a bucket that contains objects


using the AWS CLI only if the bucket does not have
versioning enabled.

Empty bucket
$ aws s3 rm s3://bucket-name/doc –recursive

**You cannot remove objects from a bucket with


versioning enabled
Protecting data in S3
Data encryption
Versioning
Locking objects
S3 Encryption for S3 Buckets
The objects are encrypted using server-side encryption
with either
Amazon S3-managed keys (SSE-S3)
AWS KMS-managed keys (SSE-KMS)

**If we enable cross-region replication with encryption


than source bucket should have same encryption
enabled otherwise Etag will conflict

To enable
Go to bucket properties – encryption – enable
Lock an S3 Object
Amazon S3 object lock enables you to store
objects using a "Write Once Read Many"
(WORM) model. When using object lock you
can prevent an object from being deleted or
overwritten
**Object lock can be enabled only when a
bucket is created ( not work for existing
buckets)
**versioning need to be enabled before lock
Versioning
Versioning is a means of keeping multiple variants of an object in the same
bucket. You can use versioning to preserve, retrieve, and restore every
version of every object stored in your Amazon S3 bucket

you can recover objects from accidental deletion or overwrite if you have
versioning enabled

While versioning enabled if you delete an object, Amazon S3 inserts a delete


marker, which becomes the current object version. You can always
restore/recover the previous version

To enable versioning
Go to bucket – properties – enable versioning

To recover deleted objects


Go to bucket – check for version and click on show
S3 Storage Management Rule
Lifecycle Rule
Cross-Region replication rule
Configure Storage Class Analytics
Inventory
Metrics
Lifecycle Rule
With the help of lifecycle rule you can define
actions you want AWS S3 to take during an
object lifetime. For example move data to
another storage class, delete data after few
days etc.

Go to bucket – choose management tab – add


lifecycle rule
Cross-Region replication rule
Cross-region replication is the automatic,
asynchronous copying of objects across buckets in
different AWS Regions. 

requires that the source and destination buckets be


in different AWS Regions

Versioning must be enabled

Go to bucket – management – replication – add rule


Storage Classes
• Storage Classes for Frequently Accessed
Objects
• Storage Class That Automatically Optimize
Frequently and Infrequently Accessed Objects
• Storage Classes for Infrequently Accessed
Objects
• Storage Classes for Archiving Objects
Storage Classes
Storage Classes for Frequently Accessed
Objects

When you require best performance and


frequently access data

Standard
Reduced Redundancy
Storage Classes
Storage Class That Automatically Optimizes
Frequently and Infrequently Accessed Objects

INTELLIGENT_TIERING 
Long-lived data with changing or unknown access
patterns
Storage Classes
Storage Classes for Infrequently Accessed
Objects

STANDARD_IA 
Amazon S3 stores the object data redundantly
across multiple geographically separated
Availability Zones
ONEZONE_IA 
Amazon S3 stores the object data in only one
Availability Zone
Storage Classes
Storage Classes for Archiving Objects

GLACIER 
Use for archives where portions of the data might need to be
retrieved in minutes. Data stored in the GLACIER storage class has a
minimum storage duration period of 90 days and can be accessed in
as little as 1-5 minutes using expedited retrieval. If you delete an
object before the 90-day minimum, you are charged for 90 days

DEEP_ARCHIVE 
Use for archiving data that rarely needs to be accessed. Data stored in
the DEEP_ARCHIVE storage class has a minimum storage duration
period of 180 days and a default retrieval time of 12 hours. If you
delete an object before the 180-day minimum, you are charged for
180 days.

You might also like