Skip to content

Instantly share code, notes, and snippets.

@bnhansn
Created February 8, 2016 15:17
Show Gist options
  • Save bnhansn/056ee468280bcc515360 to your computer and use it in GitHub Desktop.
Save bnhansn/056ee468280bcc515360 to your computer and use it in GitHub Desktop.
Resources:
AWSEBAutoScalingGroup:
Metadata:
AWS::CloudFormation::Authentication:
S3Auth:
type: "s3"
buckets: ["yourbucketname"]
roleName:
"Fn::GetOptionSetting":
Namespace: "aws:asg:launchconfiguration"
OptionName: "IamInstanceProfile"
DefaultValue: "aws-elasticbeanstalk-ec2-role"
files:
"/tmp/server.crt" :
mode: "000400"
owner: root
group: root
authentication: "S3Auth"
source: "https://s3-us-west-2.amazonaws.com/yourbucketname/server.crt"
"/tmp/server.key" :
mode: "000400"
owner: root
group: root
authentication: "S3Auth"
source: "https://s3-us-west-2.amazonaws.com/yourbucketname/server.key"
container_commands:
move_cert:
command: "mv /tmp/server.crt /etc/pki/tls/certs/"
move_key:
command: "mv /tmp/server.key /etc/pki/tls/certs/"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment