Posted On: Nov 5, 2020
AWS Fargate for Amazon Elastic Container Service (Amazon ECS) announced features to improve configuration and metrics of containers: environment files, secret versions and JSON keys, granular network metrics, and more metadata.
Environment files are now supported for Amazon ECS tasks running on Fargate. You can store multiple environment variables into centrally located files and reference them across your containers, instead of having to manually edit environment variables as key value pairs in task definitions. This makes it easier to use different environment variables for production and test environments; now different files can be used and switched, each containing the right variables. To see an example, visit our documentation.
AWS Secrets Manager secrets can be referenced 1) with a specific version or 2) from a key of a secret stored as a JSON object. This gives you more granular control to reference sensitive information such as database credentials, tokens, or configuration variables for your applications on Amazon ECS. To see an example of this, visit our product documentation on specifying sensitive data with ECS.
Network metrics for bytes transmitted (NetworkTxBytes) and bytes received (NetworkRxBytes) can now be measured in bytes per second to see how your tasks process inbound and outbound requests. These metrics are available in both ECS Container Insights in Amazon CloudWatch or the ECS task metadata endpoint version 4. Access the ECS task metadata endpoint to read network metrics with the instructions here and set up ECS container insights with the instructions here.
Additional metadata such as launch type, container ARN, log driver name, and log driver options is now available in the ECS task metadata endpoint version 4 for tasks running on both Fargate and EC2. This lets you more easily locate where to find container logs and how they are routed, as well as distinguish between specific containers with the ARN and launch type. A full list of all metadata supported is located here.
These features are supported in Fargate Platform Version 1.4. To learn more see our documentation.