我的文件.ebextensions
夹中有一个简单的文件:
00-myconfig.config
Resources:
AWSEBAutoScalingGroup:
Metadata:
AWS::CloudFormation::Authentication:
S3Access:
type: S3
roleName: aws-elasticbeanstalk-ec2-role
buckets: my-bucket
files:
"/tmp/ca-bundle.zip":
mode: "000755"
owner: root
group: root
source: https://s3-ap-southeast-2.amazonaws.com/my-bucket/ca/ca-bundle.zip
authentication: S3Access
根据多个答案,哪个是授予S3存储桶对该aws-elasticbeanstalk-ec2-role
角色访问权限的方法。
但是我继续收到403错误 /var/log/eb-activity.log
[2015-08-26T01:27:03.544Z] INFO [22320] - [Application update/AppDeployStage0/EbExtensionPreBuild/Infra-EmbeddedPreBuild] : Activity execution failed, because: Failed to retrieve https://s3-ap-southeast-2.amazonaws.com/my-bucket/ca/ca-bundle.zip: HTTP Error 403 : <?xml version="1.0" encoding="UTF-8"?> (ElasticBeanstalk::ExternalInvocationError)
如果我手动向aws-elasticbeanstalk-ec2-role
角色添加S3访问策略,那么一切正常,因此我知道URL中没有拼写错误或其他错误,那么EC2实例无疑是正确的角色。
怎么了?
PS。我尝试了files
具有或不具有“身份验证”设置的部分。