S3 Flashcards
CORS
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.
- Need to enable it on the resources bucket and state the URL for the origin that will be calling the bucket.
- S3 website URL <> Bucket URL:
- S3 Website URL: http://patin.s3-website-us-east-1.amazonaws.com
- Bucket URL: https://s3-us-east-1.amazonaws.com/patin
CORS
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.
- Need to enable it on the resources bucket and state the URL for the origin that will be calling the bucket.
- S3 website URL <> Bucket URL:
- S3 Website URL: http://patin.s3-website-us-east-1.amazonaws.com
- Bucket URL: https://s3-us-east-1.amazonaws.com/patin
S3 - Exam Tips
- Read the S3 FAQ before taking the exam!
- S3 is object based i.e. allows you to upload files (not suitable to install programs or OS)
- Successful uploads will generate a HTTP 200 status code with an MD5 checksum
- Files can be from 0 byte to 5 GB with PUT operation, 5 TB with Multipart upload (faster)
- There is unlimited storage
- You can use Multi-Object Delete to delete large numbers of objects
- By default, you can provision up to 100 buckets per AWS account.
- S3 is a universal namespace, that is, (bucket) names must be unique globally
- https://s3-us-west-1.amazonaws.com/julienheck
S3 - Exam Tips
- Read the S3 FAQ before taking the exam!
- S3 is object based i.e. allows you to upload files (not suitable to install programs or OS)
- Successful uploads will generate a HTTP 200 status code with an MD5 checksum
- Files can be from 0 byte to 5 GB with PUT operation, 5 TB with Multipart upload (faster)
- There is unlimited storage
- You can use Multi-Object Delete to delete large numbers of objects
- S3 is a universal namespace, that is, (bucket) names must be unique globally
- https://s3-us-west-1.amazonaws.com/julienheck
S3 - Consistency
- Read after write consistency for PUTS of new objects
- Eventual consistency for overwrite PUTS and DELETES (can take some time to propagate)
S3 - Consistency
- Read after write consistency for PUTS of new objects
- Eventual consistency for overwrite PUTS and DELETES (can take some time to propagate)
S3 - Core fundamentals of an S3 object
- Key (name)
- Value (data)
- Version ID
- Metadata
- Subresources
- Access Control Lists
- Torrent
S3 - Core fundamentals of an S3 object
- Key (name)
- Value (data)
- Version ID
- Metadata
- Subresources
- Access Control Lists
- Torrent
S3 - Storage Classes/Tiers
- S3 : 99.99% availability, 99.999999999% durability, immediately available, frequently accessed
- S3 - IA (Infrequently Accessed) : For data that is accessed less frequently, but requires rapid access when needed. 99.99% availability. Lower fee than S3, but you are charged a retrieval fee
- S3 - RRS (Reduced Redundancy Storage) : Designed to provide 99.99% availability and 99.99% durability
- Glacier - Archived data, where you can wait 3-5 hours before accessing
S3 - Storage Classes/Tiers
- S3 : 99.99% availability, 99.999999999% durability, immediately available, frequently accessed
- S3 - IA (Infrequently Accessed) : For data that is accessed less frequently, but requires rapid access when needed. 99.99% availability. Lower fee than S3, but you are charged a retrieval fee
- S3 - RRS (Reduced Redundancy Storage) : Designed to provide 99.99% availability and 99.99% durability
- Glacier - Archived data, where you can wait 3-5 hours before accessing
S3 - Transfer Acceleration vs CloudFront vs Import/Export vs Snowball vs Direct Connect
Transfer Acceleration optimizes the TCP protocol and adds additional intelligence between the client and the S3 bucket, making Transfer Acceleration a better choice if a higher throughput is desired. If you have objects that are smaller than 1GB or if the data set is less than 1GB in size, you should consider using Amazon CloudFront’s PUT/POST commands for optimal performance.
The AWS Import/Export Snowball is ideal for customers moving large batches of data at once. The AWS Snowball
has a typical 57 days turnaround time. As a rule of thumb, Transfer Acceleration over a fullyutilized 1 Gbps line can transfer up to 75 TBs in the same time. In general, if it will take more than a week to transfer over the Internet, or there are recurring transfer jobs and there is more than 25Mbps of available bandwidth, Transfer Acceleration is a good option. Another option is to use both: perform initial heavy lift moves with an AWS Snowball (or series of AWS Snowballs) and then transfer incremental ongoing changes with Transfer Acceleration.
AWS Direct Connect is a good choice for customers with a private networking requirement or have access to AWS Direct Connect exchanges. Transfer Acceleration is best for submitting data from distributed client locations over the public Internet, or where variable network conditions make throughput poor. Some AWS Direct Connect customers use Transfer Acceleration to help with remote office transfers, where they may suffer from poor Internet performance.
S3 - Transfer Acceleration vs CloudFront vs Import/Export vs Snowball vs Direct Connect
Transfer Acceleration optimizes the TCP protocol and adds additional intelligence between the client and the S3 bucket, making Transfer Acceleration a better choice if a higher throughput is desired. If you have objects that are smaller than 1GB or if the data set is less than 1GB in size, you should consider using Amazon CloudFront’s PUT/POST commands for optimal performance.
The AWS Import/Export Snowball is ideal for customers moving large batches of data at once. The AWS Snowball
has a typical 57 days turnaround time. As a rule of thumb, Transfer Acceleration over a fullyutilized 1 Gbps line can transfer up to 75 TBs in the same time. In general, if it will take more than a week to transfer over the Internet, or there are recurring transfer jobs and there is more than 25Mbps of available bandwidth, Transfer Acceleration is a good option. Another option is to use both: perform initial heavy lift moves with an AWS Snowball (or series of AWS Snowballs) and then transfer incremental ongoing changes with Transfer Acceleration.
AWS Direct Connect is a good choice for customers with a private networking requirement or have access to AWS Direct Connect exchanges. Transfer Acceleration is best for submitting data from distributed client locations over the public Internet, or where variable network conditions make throughput poor. Some AWS Direct Connect customers use Transfer Acceleration to help with remote office transfers, where they may suffer from poor Internet performance.
S3 - Life Cycle Management
- Can be used in conjunction with versioning
- Can be applied to current versions and previous versions
- Following actions can now be done:
- Transition to the standard-Infrequent Access Storage Class (128kb and 30 days after the creation date)
- Archive to the Glacier Storage Class (30 days after IA, if relevant)
- Permanently Delete
- Use Lifecycle policies to expire incomplete Multipart uploads by automatically removing incomplete multipart uploads and the associated storage after a predefined number of days.
S3 - Life Cycle Management
- Can be used in conjunction with versioning
- Can be applied to current versions and previous versions
- Following actions can now be done:
- Transition to the standard-Infrequent Access Storage Class (128kb and 30 days after the creation date)
- Archive to the Glacier Storage Class (30 days after IA, if relevant)
- Permanently Delete
- Use Lifecycle policies to expire incomplete Multipart uploads by automatically removing incomplete multipart uploads and the associated storage after a predefined number of days.
S3 - Securing your buckets
- By default, all newly created bucket are private
- You can setup access control to your buckets using:
- IAM policies: You can only grant users within your own AWS account permission to access your Amazon S3 resources
- Access Control Lists (ACLs): You can only grant other AWS accounts (not specific users) access to your Amazon S3 resources
- Bucket Policies: can be used to add or deny permissions across some or all of the objects within a single bucket. Policies can be attached to users, groups, or Amazon S3 buckets, enabling centralized management of permissions. You can grant users within your AWS account or another AWS account access to your Amazon S3 resources
- S3 buckets can be configured to create access logs which log all requests made to the S3 bucket. This can be done to another bucket.
S3 - Securing your buckets
- By default, all newly created bucket are private
- You can setup access control to your buckets using:
- IAM policies: You can only grant users within your own AWS account permission to access your Amazon S3 resources
- Access Control Lists (ACLs): You can only grant other AWS accounts (not specific users) access to your Amazon S3 resources
- Bucket Policies: can be used to add or deny permissions across some or all of the objects within a single bucket. Policies can be attached to users, groups, or Amazon S3 buckets, enabling centralized management of permissions. You can grant users within your AWS account or another AWS account access to your Amazon S3 resources
- S3 buckets can be configured to create access logs which log all requests made to the S3 bucket. This can be done to another bucket.
S3 vs Glacier
To retrieve Amazon S3 data stored in Amazon Glacier, initiate a retrieval job via the Amazon S3 APIs or Management Console. The retrieval request creates a temporary copy of your data in RRS while leaving the archived data intact in Amazon Glacier.
S3 vs Glacier
To retrieve Amazon S3 data stored in Amazon Glacier, initiate a retrieval job via the Amazon S3 APIs or Management Console. The retrieval request creates a temporary copy of your data in RRS while leaving the archived data intact in Amazon Glacier.
S3 - Version Control
- Stored all versions of an object (including all writes and even if you delete an object; be careful when versioning large files)
- Great backup tool
- Once enabled, versioning cannot be disabled, only suspended
- Integrates with Lifecycle rules
- Versioning’s MFA Delete capability, which uses multi-factor authentication, can be used to provide an additional layer of security
S3 - Version Control
- Stored all versions of an object (including all writes and even if you delete an object; be careful when versioning large files)
- Great backup tool
- Once enabled, versioning cannot be disabled, only suspended
- Integrates with Lifecycle rules
- Versioning’s MFA Delete capability, which uses multi-factor authentication, can be used to provide an additional layer of security
S3 - Encryption
- In Transit
- SSL/TLS
- At Rest
- Server Side Encryption:
- SSE - S3: S3 Managed Keys
- SSE - KMS: AWS Key Management Service, managed Keys
- SSE - C: Server-side encryption with customer provided key
- Client Site Encryption
- Server Side Encryption:
S3 - Encryption
- In Transit
- SSL/TLS
- At Rest
- Server Side Encryption:
- SSE - S3: S3 Managed Keys
- SSE - KMS: AWS Key Management Service, managed Keys
- SSE - C: Server-side encryption with customer provided key
- Client Site Encryption
- Server Side Encryption:
S3 - Key Name Prefixes Considerations
S3 maintains an index of object key names in each AWS region. Object keys are stored across multiple partitions in the index. The key name dictates which partition the key is stored in.
Using a sequential prefix, such as timestamp or an alphabetical sequence, increases the likelihood that Amazon S3 will target a specific partition for a large number of your keys, overwhelming the I/O capacity of the partition. If you introduce some randomness in your key name prefixes, the key names, and therefore the I/O load, will be distributed across more than one partition.
S3 - Key Name Prefixes Considerations
S3 maintains an index of object key names in each AWS region. Object keys are stored across multiple partitions in the index. The key name dictates which partition the key is stored in.
Using a sequential prefix, such as timestamp or an alphabetical sequence, increases the likelihood that Amazon S3 will target a specific partition for a large number of your keys, overwhelming the I/O capacity of the partition. If you introduce some randomness in your key name prefixes, the key names, and therefore the I/O load, will be distributed across more than one partition.
S3 - Cross-Region replication
- Cross-Region replication needs versioning to be enabled on the both the source and destination bucket
- Files in an existing bucket are not replicated automatically. All subsequent updated files will be replicated automatically
- You cannot replicate to multiple buckets or use daisy chaining
- Delete markers are replicated
- Deleting individual versions or delete markers will not be replicated
- The metadata and ACLs associated with the object are also part of the replication
S3 - Cross-Region replication
- Cross-Region replication needs versioning to be enabled on the both the source and destination bucket
- Files in an existing bucket are not replicated automatically. All subsequent updated files will be replicated automatically
- You cannot replicate to multiple buckets or use daisy chaining
- Delete markers are replicated
- Deleting individual versions or delete markers will not be replicated
- Understand what Cross Region Replication is at a high level
S3 - Transfer Acceleration
You can speed up transfers to S3 using transfer acceleration. This costs extra, and has the greatest impact on people who are in far away location (upload to Edge location).
S3 - Transfer Acceleration
You can speed up transfers to S3 using transfer acceleration. This costs extra, and has the greatest impact on people who are in far away location (upload to Edge location).
S3 - Static Websites
- You can use S3 to host static website
- Serverless
- Very cheap, scales automatically
- STATIC only, cannot host dynamic sites
S3 - Static Websites
- You can use S3 to host static website
- Serverless
- Very cheap, scales automatically
- STATIC only, cannot host dynamic sites