Skip to content

Instantly share code, notes, and snippets.

@tuladhar
Created July 22, 2020 09:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tuladhar/2957a4a01993bbba86f615c76ccf17ec to your computer and use it in GitHub Desktop.
Save tuladhar/2957a4a01993bbba86f615c76ccf17ec to your computer and use it in GitHub Desktop.
UserData:
Fn::Base64:
Fn::Sub:
- |
#!/bin/bash -xe
echo ECS_CLUSTER=${EcsCluster} >> /etc/ecs/ecs.config
yum install -y aws-cfn-bootstrap ec2-instance-connect awscli
amazon-linux-extras install epel
yum install -y s3fs-fuse
mkdir -p /srv/omaha_s3
s3fs ${OmahaS3BucketName} /srv/omaha_s3 -o iam_role=auto
/opt/aws/bin/cfn-signal -e $? --stack ${AWS::StackName} --resource EcsAutoScalingGroup --region ${AWS::Region}
- OmahaS3BucketName:
Fn::ImportValue: !Sub "${EnvironmentName}:BucketName"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment