Getting 403 while deploying your app through amplify, no access to the buckets?
Here is the problem : https://github.com/aws-amplify/amplify-console/issues/1058#issuecomment-694965987
In detail — when we use amplify’s adding of custom domain feature (definitely easier) the actual deployment files are NOT in your S3 buckets and is maintained internally by AWS in its own private buckets to which you do NOT have access!!!
With amplify hosting, the files are not hosted in your account and hence there is no access to them. However the benefits are that with amplify hosting you would be able to connect to a repo+branch and get CI/CD and also you could do manual where you point to a zip. Read here : https://docs.amplify.aws/cli/hosting. But not having visibility to actual files that are served up for the front end of the app seems not very apt imo and hence the below. Also there are cases where one would get a 403 due to directory structuring mismatch — in the sense of what amplify expects and what you many have it the zip what you have uploaded and in my case, could not even track the problem as there was no access
So the alternative :
S3AndCloudFront — PROD (S3 with CloudFront using HTTPS)
Steps:
- Add S3AndCloudFront hosting from command line