Skip to content

Instantly share code, notes, and snippets.

@ajbrown
Last active March 14, 2018 19:17
Show Gist options
  • Save ajbrown/1defcc743a1ef4154a30750beacf8757 to your computer and use it in GitHub Desktop.
Save ajbrown/1defcc743a1ef4154a30750beacf8757 to your computer and use it in GitHub Desktop.
EC2 Bootstrapping with AWS CLI Example

This file contains examples of using the AWS CLI to perform bootstrapping actions on EC2 instances through Userdata. These are useful in your terraform scripts to perform configuration that isn't natively supported.

Determine IP Address of EFS mount target

aws efs describe-mount-targets --file-system-id=fs-123456abcd | jq -r '.MountTargets[] | select(.SubnetId | contains("subnet-12345abcd")) | .IpAddress'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment