Created
June 19, 2020 18:43
-
-
Save AlexzanderFlores/80aeda53f03cc2902cf0ddad1961e17c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Scripts for https://youtu.be/FEI-uEdb2y8 | |
"deploy": "react-scripts build && aws s3 rm s3://wornoffkeys.com/ --recursive && aws s3 cp ./build s3://wornoffkeys.com/ --recursive --acl public-read" | |
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "PublicReadGetObject", | |
"Effect": "Allow", | |
"Principal": "*", | |
"Action": "s3:GetObject", | |
"Resource": "arn:aws:s3:::wornoffkeys.com/*" | |
} | |
] | |
} | |
<?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> |
Updated Scripts as per latest version
"Version": "2012-10-17",
"Statement": [
{
"Sid": "PublicReadGetObject",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "s3:*",
"Resource": [
"arn:aws:s3:::bucket-name",
"arn:aws:s3:::bucket-name/*"
]
}
]
}
CORS full permissions except delete
[
{
"AllowedHeaders": [
""
],
"AllowedMethods": [
"POST",
"GET",
"PUT"
],
"AllowedOrigins": [
""
],
"ExposeHeaders": []
}
]
{ "Version": "2012-10-17",
"Statement": [
{
"Sid": "PublicReadGetObject",
"Effect": "Allow",
"Principal": {
"AWS": ""
},
"Action": "s3:",
"Resource": [
"arn:aws:s3:::bucket-name",
"arn:aws:s3:::bucket-name/*"
]
}
]
}
Updated Scripts as per latest version
"Version": "2012-10-17", "Statement": [ { "Sid": "PublicReadGetObject", "Effect": "Allow", "Principal": { "AWS": "*" }, "Action": "s3:*", "Resource": [ "arn:aws:s3:::bucket-name", "arn:aws:s3:::bucket-name/*" ] } ] }
missing { at the begining
"deploy": "react-scripts build && aws s3 rm s3://wornoffkeys.com/ --recursive && aws s3 cp ./build s3://wornoffkeys.com/ --recursive --acl public-read"
this command didn't work can you say how is a change in this command. I am changing this wornoffkeys.com but is need for any change?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
CORS in JSON