Skip to content

fix(E3046): allow the awslogs flush-interval and buffered-events options - #4925

Merged
kddejong merged 1 commit into
aws-cloudformation:mainfrom
pcbeingused333:fix/e3046-awslogs-docker-options
Nov 3, 2026
Merged

kddejong merged 1 commit into
aws-cloudformation:mainfrom
pcbeingused333:fix/e3046-awslogs-docker-options

Conversation

@pcbeingused333

Copy link
Copy Markdown
Contributor

Issue #, if available: #4848

Description of changes:

The E3046 schema for awslogs (aws_ecs_taskdefinition/logging_configuration.json) restricts the Options keys to eight names. awslogs-force-flush-interval-seconds and awslogs-max-buffered-events are options of the Docker awslogs driver that ECS accepts on EC2 task definitions, and the CloudFormation registry schema types Options as a free map of strings, so the template from the issue was reported as "not one of [...]" although CloudFormation and ECS accept it. This adds the two names to the allowed list.

Note: ECS rejects these two options on Fargate task definitions. The schema is applied whatever RequiresCompatibilities is, so after this change they are no longer flagged there either (they were flagged before only because they were missing from the list). Making that check Fargate-aware (looking at RequiresCompatibilities) would be a separate change; happy to follow up on it if that is wanted.

Tests: a case with both options in test_task_definition_log_configuration.py, which fails without the change; the ECS rule tests pass (116 tests) and the template from the issue now lints clean. Not tested: deploying the stack.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

This change was prepared with Claude Code.

The awslogs LogConfiguration schema listed eight option names and reported any
other as not one of the list. awslogs-force-flush-interval-seconds and
awslogs-max-buffered-events are options of the Docker awslogs driver that ECS
accepts on EC2 task definitions, and the CloudFormation schema does not limit
the Options keys. Add both to the allowed names.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@kddejong
kddejong force-pushed the fix/e3046-awslogs-docker-options branch from af5717d to 214bcf1 Compare November 2, 2026 23:27
@codecov

codecov Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.74%. Comparing base (588d3c5) to head (214bcf1).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4925   +/-   ##
=======================================
  Coverage   94.74%   94.74%           
=======================================
  Files         442      442           
  Lines       16145    16145           
  Branches     3138     3138           
=======================================
  Hits        15296    15296           
  Misses        469      469           
  Partials      380      380           
Flag Coverage Δ
unittests 94.73% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kddejong
kddejong merged commit ce4ff0e into aws-cloudformation:main Nov 3, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants