Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

S3 Introdution

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

AWS S3

• Amazon S3 is one of the main building blocks of AWS

• Many AWS services uses Amazon S3 as an integration


as well

• Amazon S3 allows people to store objects (files) in


“buckets” (directories)

• Buckets must have a globally unique name

• Buckets are defined at the region level


AWS Regions and Availability Zones

• AWS has Regions all around the world

• Names can be us-east-1, eu-west-3…

• A region is a cluster of data centers

• Most AWS services are region-scoped


AWS S3
• Objects (files) have a Key
• The key is the FULL path:
• s3://my-bucket/my_file.txt
• s3://mybucket/my_folder1/another_folder/my_file.txt

• The key is composed of prefix + object name


• s3://mybucket/my_folder1/another_folder/my_file.txt

• There’s no concept of “directories” within buckets


(although the UI will trick you to think otherwise)
• Just keys with very long names that contain slashes (“/”)
AWS S3
• Object values are the content of the body:
• Max Object Size is 5TB (5000GB)
• If uploading more than 5GB, must use “multi-part
upload”

• Metadata (list of text key / value pairs – system or user


metadata)

• Version ID (if versioning is enabled)


AWS S3 Versioning
• You can version your files in Amazon S3

• It is enabled at the bucket level

• Same key overwrite will increment the “version”: 1,


2, 3

• It is best practice to version your buckets


• Protect against unintended deletes (ability to
restore a version)
• Easy roll back to previous version
AWS S3 Encryption
• There are 4 methods of encrypting objects in S3

• SSE-S3: encrypts S3 objects using keys handled &


managed by AWS

• SSE-KMS: leverage AWS Key Management Service to


manage encryption keys

• SSE-C: when you want to manage your own


encryption keys

• Client-Side Encryption
AWS S3 MFA Delete
• MFA (multi factor authentication) forces user to generate a
code on a device (usually a mobile phone or hardware) before
doing important operations on S3
• To use MFA-Delete, enable Versioning on the S3 bucket
• You will need MFA to
• permanently delete an object version
• suspend versioning on the bucket
• You won’t need MFA for
• enabling versioning
• listing deleted versions
• Only the bucket owner (root account) can enable/disable
MFA-Delete
AWS S3 Access Logs

• For audit purpose, you may want to log all


access to S3 buckets

• Any request made to S3, from any account,


authorized or denied, will be logged into
another S3 bucket

• That data can be analyzed using data analysis


tools…
AWS S3 Replication

• Must enable versioning in source and destination


• Cross Region Replication (CRR)
• Same Region Replication (SRR)
• Buckets can be in different accounts
• Copying is asynchronous
• Must give proper IAM permissions to S3
• CRR - Use cases: compliance, lower latency access, replication across
accounts
• SRR – Use cases: log aggregation, live replication between production
and test accounts
AWS S3 Pre-Signed URLs

• Can generate pre-signed URLs using SDK or CLI


• For downloads (easy, can use the CLI)
• For uploads (harder, must use the SDK)
• Valid for a default of 3600 seconds, can change
timeout with --expires-in [TIME_BY_SECONDS]
argument
• Users given a pre-signed URL inherit the permissions
of the person who generated the URL for GET /PUT
AWS S3 Storage Classes

• Amazon S3 Standard - General Purpose


• Amazon S3 Standard-Infrequent Access (IA)
• Amazon S3 One Zone-Infrequent Access
• Amazon S3 Glacier Instant Retrieval
• Amazon S3 Glacier Flexible Retrieval
• Amazon S3 Glacier Deep Archive
• Amazon S3 Intelligent Tiering
AWS S3 Storage Classes
S3 Standard – General Purpose

• 99.99% Availability
• Used for frequently accessed data
• Low latency and high throughput
• Sustain 2 concurrent facility failures

• Use Cases: Big Data analytics, mobile & gaming


applications, content distribution…
AWS S3 Storage Classes
S3 Storage Classes – Infrequent Access
• For data that is less frequently accessed, but requires rapid
access when needed
• Lower cost than S3 Standard
• Amazon S3 Standard-Infrequent Access (S3 Standard-IA)
• 99.9% Availability
• Use cases: Disaster Recovery, backups
• Amazon S3 One Zone-Infrequent Access (S3 One Zone-IA)
• High durability (99.999999999%) in a single AZ; data lost
when AZ is destroyed
• 99.5% Availability
• Use Cases: Storing secondary backup copies of on-
premises data, or data you can recreate
AWS S3 Storage Classes
S3 Glacier Storage Classes
• Low-cost object storage meant for archiving / backup
• Pricing: price for storage + object retrieval cost
• Amazon S3 Glacier Instant Retrieval
• Millisecond retrieval, great for data accessed once a quarter
• Minimum storage duration of 90 days
• Amazon S3 Glacier Flexible Retrieval
• Expedited (1 to 5 minutes), Standard (3 to 5 hours), Bulk (5 to 12
hours) – free
• Minimum storage duration of 90 days
• Amazon S3 Glacier Deep Archive – for long term storage:
• Standard (12 hours), Bulk (48 hours)
• Minimum storage duration of 180 days
AWS S3 Storage Classes
S3 Intelligent-Tiering
• Small monthly monitoring and auto-tiering fee
• Moves objects automatically between Access Tiers based on usage
• There are no retrieval charges in S3 Intelligent-Tiering

• Frequent Access tier (automatic): default tier


• Infrequent Access tier (automatic): objects not accessed for 30 days
• Archive Instant Access tier (automatic): objects not accessed for 90 days
• Archive Access tier (optional): configurable from 90 days to 700+ days
• Deep Archive Access tier (optional): config. from 180 days to 700+ days
AWS S3 Demo App

Rest API

AWS Cloud

Maven
Java
AWS SDK
Swagger2
AWS S3
Common
EPA Ear jar

Zip/unzip
jar

You might also like