Devin Dixon
Devin Dixon

Reputation: 12423

AWS ECS Environment properties

I have a PHP application that is using the getEnv function to get outside configuration variables for the application.

Similar to how Environment Properties are set in Elastic BeanStalk, how can I pass those environment variables into an ECS EC2 instance?

Also I am use CodePipeline to build a docker image and deploy to ECS to create the EC2 instance.

Upvotes: 0

Views: 749

Answers (1)

Chris Williams
Chris Williams

Reputation: 35258

These variables are defined in the ECS task definition.

Inside the container definition you have the choice of environment or secret.

Environment would be used for environment variables that are fine to be passed as plain text, secrets can used either a SecureString in Systems Manager or a secret in Secrets Manager to store the value and only be retrievable during container boot.

Upvotes: 1

Related Questions