を参考に
を読むと良い。具体的には .ebextensions
に新しいファイルを作って下記のような感じに設定する。また、 aws-elasticbeanstalk-ec2-role
というロールに対して IAMで対象のファイルが読めるような権限を与えておく。
Resources:
AWSEBAutoScalingGroup:
Metadata:
AWS::CloudFormation::Authentication:
S3Auth:
type: "s3"
buckets: ["my-backet-name"]
roleName: "aws-elasticbeanstalk-ec2-role"
files:
"/path/to/test/test.txt" :
mode: "000644"
owner: root
group: root
authentication: "S3Auth"
source: https://s3-ap-northeast-1.amazonaws.com/my-backet-name/test/test.txt