AWS S3 web site with custom domain
up vote
0
down vote
favorite
I've successly deployed and application on AWS S3 with @ng-toolkit/serverless on the AWS generated endpoint. Now I want to use a custom domain I've purchased, in order to access the app from i.e. mydomain.com
Following the AWS guide I have to modify the policy bucket with the following JSON (I used mydomain.com):
{ "Version":"2012-10-17",
"Statement":[
{
"Sid":"PublicReadGetObject",
"Effect":"Allow",
"Principal": "*",
"Action":["s3:GetObject"],
"Resource":["arn:aws:s3:::mydomain.com/*"]
}]
}
The problem is that when I save I got error with "Access denied" message.
I used both root user and generated secondary user (as AWS suggests) with AdministratorAccess permissions, but I'm unable to save the policy.
amazon-web-services amazon-s3 serverless-framework
add a comment |
up vote
0
down vote
favorite
I've successly deployed and application on AWS S3 with @ng-toolkit/serverless on the AWS generated endpoint. Now I want to use a custom domain I've purchased, in order to access the app from i.e. mydomain.com
Following the AWS guide I have to modify the policy bucket with the following JSON (I used mydomain.com):
{ "Version":"2012-10-17",
"Statement":[
{
"Sid":"PublicReadGetObject",
"Effect":"Allow",
"Principal": "*",
"Action":["s3:GetObject"],
"Resource":["arn:aws:s3:::mydomain.com/*"]
}]
}
The problem is that when I save I got error with "Access denied" message.
I used both root user and generated secondary user (as AWS suggests) with AdministratorAccess permissions, but I'm unable to save the policy.
amazon-web-services amazon-s3 serverless-framework
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I've successly deployed and application on AWS S3 with @ng-toolkit/serverless on the AWS generated endpoint. Now I want to use a custom domain I've purchased, in order to access the app from i.e. mydomain.com
Following the AWS guide I have to modify the policy bucket with the following JSON (I used mydomain.com):
{ "Version":"2012-10-17",
"Statement":[
{
"Sid":"PublicReadGetObject",
"Effect":"Allow",
"Principal": "*",
"Action":["s3:GetObject"],
"Resource":["arn:aws:s3:::mydomain.com/*"]
}]
}
The problem is that when I save I got error with "Access denied" message.
I used both root user and generated secondary user (as AWS suggests) with AdministratorAccess permissions, but I'm unable to save the policy.
amazon-web-services amazon-s3 serverless-framework
I've successly deployed and application on AWS S3 with @ng-toolkit/serverless on the AWS generated endpoint. Now I want to use a custom domain I've purchased, in order to access the app from i.e. mydomain.com
Following the AWS guide I have to modify the policy bucket with the following JSON (I used mydomain.com):
{ "Version":"2012-10-17",
"Statement":[
{
"Sid":"PublicReadGetObject",
"Effect":"Allow",
"Principal": "*",
"Action":["s3:GetObject"],
"Resource":["arn:aws:s3:::mydomain.com/*"]
}]
}
The problem is that when I save I got error with "Access denied" message.
I used both root user and generated secondary user (as AWS suggests) with AdministratorAccess permissions, but I'm unable to save the policy.
amazon-web-services amazon-s3 serverless-framework
amazon-web-services amazon-s3 serverless-framework
edited Nov 17 at 11:34
asked Nov 17 at 11:27
Federico Viotti
337
337
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
0
down vote
It is possible to lock yourself out of a bucket with a bad policy (not sure if that applies to your case?). If so you can try the below CLI command (using the root users API key) to remove any existing bucket policy:
aws s3api delete-bucket-policy --bucket mydomain.com
If this is your issue, you should be able to insert a new bucket policy as normal now.
1
I tried your command @MisterSmith but unfortunately didn't resolve my problem. Finally I get the solution changing the setting inside Permissions -> Public access setting -> Manage public bucket policies -> Block new public bucket policies = false. Doing this I'm enable to save the policy.
– Federico Viotti
Nov 17 at 15:17
add a comment |
up vote
0
down vote
If could help someone I finally get the solution changing the setting of the S3 bucket in Permissions -> Public access setting -> Manage public bucket policies -> Block new public bucket policies = false.
Doing this I'm able to save the policy!
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
It is possible to lock yourself out of a bucket with a bad policy (not sure if that applies to your case?). If so you can try the below CLI command (using the root users API key) to remove any existing bucket policy:
aws s3api delete-bucket-policy --bucket mydomain.com
If this is your issue, you should be able to insert a new bucket policy as normal now.
1
I tried your command @MisterSmith but unfortunately didn't resolve my problem. Finally I get the solution changing the setting inside Permissions -> Public access setting -> Manage public bucket policies -> Block new public bucket policies = false. Doing this I'm enable to save the policy.
– Federico Viotti
Nov 17 at 15:17
add a comment |
up vote
0
down vote
It is possible to lock yourself out of a bucket with a bad policy (not sure if that applies to your case?). If so you can try the below CLI command (using the root users API key) to remove any existing bucket policy:
aws s3api delete-bucket-policy --bucket mydomain.com
If this is your issue, you should be able to insert a new bucket policy as normal now.
1
I tried your command @MisterSmith but unfortunately didn't resolve my problem. Finally I get the solution changing the setting inside Permissions -> Public access setting -> Manage public bucket policies -> Block new public bucket policies = false. Doing this I'm enable to save the policy.
– Federico Viotti
Nov 17 at 15:17
add a comment |
up vote
0
down vote
up vote
0
down vote
It is possible to lock yourself out of a bucket with a bad policy (not sure if that applies to your case?). If so you can try the below CLI command (using the root users API key) to remove any existing bucket policy:
aws s3api delete-bucket-policy --bucket mydomain.com
If this is your issue, you should be able to insert a new bucket policy as normal now.
It is possible to lock yourself out of a bucket with a bad policy (not sure if that applies to your case?). If so you can try the below CLI command (using the root users API key) to remove any existing bucket policy:
aws s3api delete-bucket-policy --bucket mydomain.com
If this is your issue, you should be able to insert a new bucket policy as normal now.
answered Nov 17 at 12:03
MisterSmith
803511
803511
1
I tried your command @MisterSmith but unfortunately didn't resolve my problem. Finally I get the solution changing the setting inside Permissions -> Public access setting -> Manage public bucket policies -> Block new public bucket policies = false. Doing this I'm enable to save the policy.
– Federico Viotti
Nov 17 at 15:17
add a comment |
1
I tried your command @MisterSmith but unfortunately didn't resolve my problem. Finally I get the solution changing the setting inside Permissions -> Public access setting -> Manage public bucket policies -> Block new public bucket policies = false. Doing this I'm enable to save the policy.
– Federico Viotti
Nov 17 at 15:17
1
1
I tried your command @MisterSmith but unfortunately didn't resolve my problem. Finally I get the solution changing the setting inside Permissions -> Public access setting -> Manage public bucket policies -> Block new public bucket policies = false. Doing this I'm enable to save the policy.
– Federico Viotti
Nov 17 at 15:17
I tried your command @MisterSmith but unfortunately didn't resolve my problem. Finally I get the solution changing the setting inside Permissions -> Public access setting -> Manage public bucket policies -> Block new public bucket policies = false. Doing this I'm enable to save the policy.
– Federico Viotti
Nov 17 at 15:17
add a comment |
up vote
0
down vote
If could help someone I finally get the solution changing the setting of the S3 bucket in Permissions -> Public access setting -> Manage public bucket policies -> Block new public bucket policies = false.
Doing this I'm able to save the policy!
add a comment |
up vote
0
down vote
If could help someone I finally get the solution changing the setting of the S3 bucket in Permissions -> Public access setting -> Manage public bucket policies -> Block new public bucket policies = false.
Doing this I'm able to save the policy!
add a comment |
up vote
0
down vote
up vote
0
down vote
If could help someone I finally get the solution changing the setting of the S3 bucket in Permissions -> Public access setting -> Manage public bucket policies -> Block new public bucket policies = false.
Doing this I'm able to save the policy!
If could help someone I finally get the solution changing the setting of the S3 bucket in Permissions -> Public access setting -> Manage public bucket policies -> Block new public bucket policies = false.
Doing this I'm able to save the policy!
answered 19 hours ago
Federico Viotti
337
337
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53350777%2faws-s3-web-site-with-custom-domain%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown