S3(Simple Storage Service)

Object Storage

Basically nice http filesystem as a service

Buckets that can be accessed over https with uri like https://s3.us-east-2.amazonaws.com/jsfuentes-test/JorgeFuentes_Nov2018.pdf

Can configure access, default private

Uses:

  • store files, images, videos, etc

  • could be used as a ghetto key value store or ghetto GitHub

  • can serve as a static web site hosting

Creation

Nice coursera Overview

Make new bucket give unique name, create bucket, super ez,

CLI

aws s3 sync . s3://mybucket

Publically Accessible

Make public, can just follow link to object ez ezezezezezezz

Permissions->ACL to give public access

Permissions->CORS configuration: Might need CORS, unsure...

Can create an endpoint to create signed urls to access specific resources

Static Website Hosting

  1. Set to publically accessible in the bucket policy

  • policy type → S3

  • Effect → Allow

  • Principal → *

  • Actions → GetObject

  • Amazon Resource Number (ARN) → Copy “arn” from permissions tab add /* or path

  1. Go to Properties tab of bucket and turn on server web hosting set both index and error to index.html

  • You need index.html in EACH subfolder and path requests will route to that index.html

  • You will get a http url

  1. To setup https, you use Cloudfront look at Cloudfront.md

  • ? You might be able to just use cloudfront and skip step 2?

Extra: Look at codebuild.md to get a built react app or github updates into the S3, use the AWS cli to get the artifact in the root

Advanced

MultiPart Upload

Can upload a file part by part and even in parallel, then it will be constructed when you signal completion

You are charged for incomplete multipart uploads, but you can add a lifecycle policy detailed here

Last updated