Skip to content

Instantly share code, notes, and snippets.

@vinhlh
Last active February 7, 2017 06:29
Embed
What would you like to do?
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