LoginSignup
3
2

More than 5 years have passed since last update.

ElasticBeanstalkで、起動時にS3のプライベートなファイルを取ってくる

Posted at

を参考に

を読むと良い。具体的には .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
3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2