Skip to content

Instantly share code, notes, and snippets.

@garystafford
Last active April 5, 2021 15:50
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 garystafford/1e03fe85ff355ed440510f850ab11d6a to your computer and use it in GitHub Desktop.
Save garystafford/1e03fe85ff355ed440510f850ab11d6a to your computer and use it in GitHub Desktop.
#!/bin/bash
# Purpose: EMR bootstrap script
# Author: Gary A. Stafford (2021-04-05)
# update and install some useful yum packages
sudo yum install -y jq
# set region for boto3
aws configure set region \
"$(curl --silent http://169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region)"
# install some useful python packages
sudo python3 -m pip install boto3 ec2-metadata
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment