Æth*_*tan 85 deployment github amazon-s3 amazon-web-services continuous-deployment
我对我的 AWS 账户中的 IAM 用户设置了以下访问策略。该策略引用存储桶名称“xo-staging”。
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AccessToGetBucketLocation",
"Effect": "Allow",
"Action": [
"s3:GetBucketLocation"
],
"Resource": [
"arn:aws:s3:::*"
]
},
{
"Sid": "AccessToWebsiteBuckets",
"Effect": "Allow",
"Action": [
"s3:PutBucketWebsite",
"s3:PutObject",
"s3:PutObjectAcl",
"s3:GetObject",
"s3:ListBucket",
"s3:DeleteObject"
],
"Resource": [
"arn:aws:s3:::xo-staging",
"arn:aws:s3:::xo-staging/*"
]
},
{
"Sid": "AccessToCloudfront",
"Effect": "Allow",
"Action": [
"cloudfront:GetInvalidation",
"cloudfront:CreateInvalidation"
],
"Resource": "*"
}
]
}
Run Code Online (Sandbox Code Playgroud)
我正在将 Gatsby 应用程序从本地计算机部署到 Github,其中我使用 Github Actions 来运行构建和部署脚本。
在我的 package.json 文件中,我已将“deploy”设置为 的值,gatsby-plugin-s3 deploy --yes; export AWS_PAGER=\"\"; aws cloudfront create-invalidation --distribution-id E5FDMTLPHUTLTL --paths '/*'; 在我的workflows.yml 文件中,我已将“deploy”设置为npm run deploy。
在 Github 中,我的构建成功,但部署失败。我收到的错误告诉我“AccessControlListNotSupported:存储桶不允许 ACL”。
我检查了 AWS 中的实际存储桶权限并尝试选择不同的选项,但总是返回相同的错误消息。换句话说,我已尝试删除公共访问和 ACL 上的所有阻止,但问题仍然存在。
请有人建议我可能需要更改哪些内容才能使完整部署正常工作?
Ada*_*cha 167
将屏幕截图添加到@rudieros提供的答案中
| 归档时间: |
|
| 查看次数: |
94779 次 |
| 最近记录: |