Step 5: An error occurred (MalformedPolicy) when calling the PutBucketPolicy operation: Policy has invalid resource
See original GitHub issuebucketpolicy.json:
{
"Version":"2012-10-17",
"Statement":[
{
"Sid":"AddPerm",
"Effect":"Allow",
"Principal": "*",
"Action":["s3:GetObject"],
"Resource":["arn:aws:s3:::barton-travel-site/*"]
}
]
}
Command:
aws s3api put-bucket-policy --bucket barton-travel-site --policy file://bucketpolicy.json
Output:
An error occurred (MalformedPolicy) when calling the PutBucketPolicy operation: Policy has invalid resource
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
An error occurred (MalformedPolicy) when calling the ...
This error you're receiving indicates that the bucket you're attaching this policy does not share the same name. In other words your resource...
Read more >Error putting S3 policy: MalformedPolicy: Invalid policy syntax ...
I am able to create the s3 bucket successfully. But when I try to provision the s3 bucket policy it throws error.
Read more >Tutorial: Configuring a static website on Amazon S3
A message appears indicating that the bucket policy has been successfully added. If you see an error that says Policy has invalid resource...
Read more >invalid resource on a bucket policy : r/aws - Reddit
im trying to set a bucket policy so that I can copy all contents of a ... generator but i still get the...
Read more >Cross Account Resource Access - Invalid Principal in Policy
It is a rather simple architecture. A Lambda function from account A called Invoker Function needs to trigger a function in account B...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I fixed this error by saving the website-bucket-policy.json file
How can this be resolved via the aws cli?