[ S3 Websites ]
- S3 can host static websites and have them accessible on the www
- The website URL will be :
{bucket-name}.s3-website-{AWS-region}.amazonaws.com
OR
{bucket-name}.s3-website.{AWS-region}.amazonaws.com
- If you get a 403 (forbidden) error, make sure the bucket policy allows public reads
[ # CORS ]
- An origin is a scheme (protocol), host (domain) and port
- CORS means Cross-Origin Resource Sharing
- Web Browser based mechanism to allow requests to other origins while visiting the main origin
Same origin : http://example.com/app1 & http://example.com/app2
Different origins : http://www.example.com & http://other.example.com
- The requests won't be fulfilled unless the other origin allows for the requests using CORS Headers(Access-Control-Allow-Origin)
[ S3 CORS *** ]
- If a client does a cross-origin request on our S3 bucket, we need to enable the correct CORS headers
- You can allow for a specific origin or for * (all origins)
[ Amazon S3 - Consistency Model ]
- Read after write consistency for PUTS of new objects
1) As soon as a new object is written, we can retrieve it (ex: PUT 200 => GET 200)
2) If we did a GET before to see if the object existed (ex: GET 404 => PUT 200 => GET 404) - eventually consistent
Eventual Consistency for DELETES and PUTS of existing objects
1) If we read an object after updating, we might get the older version (ex: PUT 200 => PUT 200 => GET 200 (might be older version))
2) If we delete an object, we might still be able to retrieve it for a short time (ex: DELETE 200 => GET 200)
* there's no way to request "strong consistency"
'infra & cloud > AWS' 카테고리의 다른 글
[AWS] 9-1. S3 MFA Delete (0) | 2021.04.03 |
---|---|
[AWS] 8. AWS CLI : configuration (0) | 2021.04.01 |
[AWS] 7-2. S3 Security (0) | 2021.03.29 |
[AWS] 7-1. Amazon S3, S3 Encryption (0) | 2021.03.29 |
[AWS] 6. Beanstalk (0) | 2021.03.29 |