Skip to content

Instantly share code, notes, and snippets.

@luisacarrion
Last active October 12, 2018 02:13
Show Gist options
  • Save luisacarrion/8ebfadb3711cf83932611ea88f0a0767 to your computer and use it in GitHub Desktop.
Save luisacarrion/8ebfadb3711cf83932611ea88f0a0767 to your computer and use it in GitHub Desktop.
AWS Elastic Beanstalk .ebextensions - get S3 file with files key and source option
Resources:
AWSEBAutoScalingGroup:
Metadata:
AWS::CloudFormation::Authentication:
S3Auth:
type: "s3"
buckets: ["your-bucket-name"]
roleName:
"Fn::GetOptionSetting":
Namespace: "aws:autoscaling:launchconfiguration"
OptionName: "IamInstanceProfile"
DefaultValue: "aws-elasticbeanstalk-ec2-role"
files:
/etc/nginx/conf.d/01_nginx_http.conf:
mode: "000644"
owner: root
group: root
authentication: "S3Auth"
source: https://s3-us-west-2.amazonaws.com/your-bucket-name/shared_config/01_nginx_http.conf
container_commands:
01_reload_nginx:
command: "sudo service nginx reload"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment