Prerequisites

To get the most out of this guide, you will need to:

Connection Configuration

NameTypeDescription
AWS_ACCESS_KEY_IDenv-varThe access key credential
AWS_SECRET_ACCESS_KEYenv-varThe secret key credential
AWS_REGIONenv-varThe AWS region

Use an IAM credential with reduced scope to only create secrets and/or listing ECS services

Connection Command

  • secretsmanager
hoop admin create conn secretsmanager -a <agent> \
	-e AWS_ACCESS_KEY_ID=<key-id> \
	-e AWS_SECRET_ACCESS_KEY=<key> \
	-e AWS_REGION=us-east-1 \
	-- aws secretsmanager create-secret
  • list-services-prod
hoop admin create conn list-services-prod -a <agent> \
	-e AWS_ACCESS_KEY_ID=<key-id> \
	-e AWS_SECRET_ACCESS_KEY=<key> \
	-e AWS_REGION=us-east-1 \
	-- aws ecs list-services --cluster prod

How to Use

Now, it’s possible to create credentials on the AWS Secrets Manager service.

hoop exec secretsmanager -- \
    --name MyTestSecret
    --description "My test secret created with the CLI." \
    --secret-string "{\"user\":\"diegor\",\"password\":\"EXAMPLE-PASSWORD\"}"

Or listing ECS Services from cluster prod

hoop exec list-services-prod