aws / aws/containers-roadmap

Allow setting a default value for `awslog*` configuration settings, per-service or per-instance

Open
#198 3 comments 3 reactions 0 assignees View on GitHub
ECS Proposed
Dominant language
Shell
Stars
5.4k
Forks
334
PR merge metrics
No merged PRs in 30d

Description

Scenario: I'm trying to ensure that my ECS tasks are fully environment-agnostic, so that the same Task Definition can be deployed to a test/staging/production cluster and will automatically pick up the right configuration. I can achieve this by not baking configuration into the task definition (via environment variables or whatever) but instead get either the instance or the container to pull in its configuration at launch.

I am using the awslogs driver, and so I have to configure `awslogs-group` and `awslogs-stream-prefix` in the Task Definition. I would still like to be able to separate the log streams per-environment, however, and I don't think there is a way to do this without changing the Task Definition.

I would like to be able to set a configuration variable (eg `DEFAULT_AWSLOGS_STREAM_PREFIX=production`) in `/etc/ecs/ecs.config`, and have that be used as the value of `awslogs-stream-prefix` if nothing is specified in an incoming TD. I think overriding `awslogs-stream-prefix` in this way is probably more useful than `awslogs-group`, but it would be good to have both, I think.

Ideally it would also be possible to specify a default value in the Service configuration, but I appreciate that that's an AWS API change.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing how ECS reads /etc/ecs/ecs.config and how the awslogs-group and awslogs-stream-prefix values are applied from a Task Definition. Determine whether defaults can be supported per instance or service, then verify that unset Task Definition values inherit the configured defaults without changing explicitly supplied values.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
cloud, observability-sre
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.