Skip to content

Instantly share code, notes, and snippets.

@AlexzanderFlores
Created June 30, 2020 18:35
Show Gist options
  • Save AlexzanderFlores/b0624382904d0800fb7e645c721615cb to your computer and use it in GitHub Desktop.
Save AlexzanderFlores/b0624382904d0800fb7e645c721615cb to your computer and use it in GitHub Desktop.
//https://youtu.be/Mgs7jl430vs
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "PublicReadGetObject",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::YOUR_S3_BUCKET_HERE/*"
}
]
}
<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
</CORSRule>
</CORSConfiguration>
version: 0.2
phases:
pre_build:
commands:
- npm install
build:
commands:
- npm run build
artifacts:
files:
- '**/*'
discard-paths: no
base-directory: build
@oneEyedSunday
Copy link

oneEyedSunday commented Apr 25, 2022

Thanks @mohitsrai02

The configuration can be found here - AWS User Guide

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment