Advertisement
agswin2004

Untitled

Mar 19th, 2020
842
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.52 KB | None | 0 0
  1. #!/bin/bash
  2. apt-get update -y
  3. apt-get upgrade -y
  4. apt-get install awscli python-pip -y
  5. pip install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-latest.tar.gz
  6. apt autoremove -y
  7.  
  8. BASE=/claws-init
  9. mkdir -p $BASE
  10.  
  11. aws s3 sync s3://xxx/cloudformation/ $BASE
  12. cd $BASE/scripts
  13. chmod +x ./*.sh
  14. ./init-codedeploy.sh
  15.  
  16. REGION=$(curl --silent http://169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region)
  17.  
  18. cfn-signal --resource AutoScalingGroup --stack ${AWS::StackName} --region $REGION
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement