Skip to content

Instantly share code, notes, and snippets.

@vinhlh
Last active February 7, 2017 06:29
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save vinhlh/17bb55fcdf393fc026f4cf15c55fc42b to your computer and use it in GitHub Desktop.
Managing Secrets for Amazon EC2 Container Service–Based Applications Raw
#!/bin/sh
# Check that the environment variable has been set correctly
if [ -z "$SECRETS_BUCKET_NAME" ]; then
echo >&2 'error: missing SECRETS_BUCKET_NAME environment variable'
exit 1
fi
# Containers that are running on your container instances
# have access to all of the permissions that are supplied to the container instance role.
# Read more http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html
# If you are using Server Side Encryption, enable this
aws configure set s3.signature_version s3v4
# Download
aws s3 cp s3://${SECRETS_BUCKET_NAME}/cyclops.conf .
exec "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment