Skip to content

Instantly share code, notes, and snippets.

@spg
Created May 31, 2018 03:19
Show Gist options
  • Save spg/ac0ce6ce8b879c5e4f77b0877b58ca9b to your computer and use it in GitHub Desktop.
Save spg/ac0ce6ce8b879c5e4f77b0877b58ca9b to your computer and use it in GitHub Desktop.

Revisions

  1. spg created this gist May 31, 2018.
    5 changes: 5 additions & 0 deletions user-data.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    #!/bin/bash -x
    yum -y install mysql # provisioning example
    # Signal that the instance is ready
    INSTANCE_ID=`wget -q -O - http://169.254.169.254/latest/meta-data/instance-id`
    aws ec2 create-tags --resources $INSTANCE_ID --tags Key=UserDataFinished,Value=true --region ${AWS::Region}