Skip to content

(events-targets): Support all input overrides for EcsTask target #32217

@blimmer

Description

@blimmer

Describe the feature

ECS targets can override any item in the TaskOverride structure via the input parameter, according to the docs.

However, today, only the containerOverrides option is exposed:

const containerOverrides = this.props.containerOverrides && this.props.containerOverrides
.map(({ containerName, ...overrides }) => ({ name: containerName, ...overrides }));
const input = { containerOverrides };

Use Case

I need to override CPU/Memory at the Task Definition level, but CDK doesn't currently expose that option.

Proposed Solution

All input options (documented in the TaskOverride structure docs) should be allowed. Specifically, these are missing today:

  • cpu
  • ephemeralStorage
  • executionRoleArn
  • inferenceAcceleratorOverrides
  • memory
  • taskRoleArn

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.168.0

Environment details (OS name and version, etc.)

Mac, Node 20 LTS

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions