- s3 and cloud-front
Amazon S3
- Amazon S3 is a simple key-based object store
- Files can be from 0 bytes to 5TB
- The largest object that can be uploaded in a single PUT is 5 gigabytes
- For objects larger than 100 megabytes use the Multipart Upload capability
- Provides read after write consistency for PUTS of new objects.
- Provides eventual consistency for overwrite PUTS and DELETES (takes time to propagate).
Amazon S3 Buckets
- 100 buckets per account by default
- You can store unlimited objects in your buckets
- You cannot create nested buckets
Amazon S3 Sub-resources
- Sub-resources (configuration containers) associated with buckets include
- Lifecycle – define an object’s lifecycle
- Website – configuration for hosting static websites
- Access Control Lists (ACLs) – control permissions access to the bucket
- Bucket Policies – control access to the bucket
- Cross Origin Resource Sharing (CORS
Amazon S3 Storage Classes
There are six S3 storage classes.
- S3 Standard (durable, immediately available, frequently accessed).
- Ø S3 Intelligent-Tiering (automatically moves data to the most cost-effective tier).
- Ø S3 Standard-IA (durable, immediately available, infrequently accessed).
- Ø S3 One Zone-IA (lower cost for infrequently accessed data with less resilience).
- Ø S3 Glacier (archived data, retrieval times in minutes or hours).
- Ø S3 Glacier Deep Archive (lowest cost storage class for long term retention).
Amazon S3 Copy
- You can create a copy of objects up to 5GB in size in a single atomic operation
- For files larger than 5GB you MUST USE (recommendation is for >100mb and possible is for >5MB)the multipart upload API.
Amazon S3 Encryption
| Encryption Option | How it Works |
|---|---|
| SSE-S3 | |
| SSE-C | |
| SSE-KMS | |
| Client-Side Encrypt |
Amazon CloudFront Distributions
There are two types of distribution
- Web Distribution
- Distributes files over HTTP and HTTPS.
- RTMP
- Allows an end user to begin playing a media file before the file has finished downloading from a CloudFront edge location
- Files must be stored in an S3 bucket
Amazon CloudFron
- A special type of user called an Origin Access Identity (OAI) can be used to restrict access to content in an Amazon S3 bucket.
- By using an OAI you can restrict users so they cannot access the content directly using the S3 URL, they must connect via CloudFront
Amazon CloudFront Charges
You pay for:
- Data Transfer Out to Internet
- Data Transfer Out to Origin
- Number of HTTP/HTTPS Requests.
- Invalidation Requests etc
You do not pay for:
- Data transfer between AWS regions and CloudFront
- Regional edge cache
- AWS ACM SSL/TLS certificates