Last active
February 7, 2017 06:29
-
-
Save vinhlh/17bb55fcdf393fc026f4cf15c55fc42b to your computer and use it in GitHub Desktop.
Managing Secrets for Amazon EC2 Container Service–Based Applications Raw
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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