Describe the bug
When CDK hotswapping a task definition that uses the function obtainDefaultFluentBitECRImage found in firelens-log-router.ts, the use of an image URI which is grabbed from an SSM repository leads to failed deployments. Upon hotswapping, the API call made to ECS simply uses the SSM parameter name (/aws/service/aws-for-fluent-bit:latest) instead of the value of the SSM parameter, as happens in CDK. This makes the function incompatible with CDK hotswap.
Expected Behavior
CDK Hotswap uses a resolvable image URI when making ECS API calls
Current Behavior
CDK Hotswap fails with the error:
Task is stopping
InternalError: failed to create container model: failed to normalize image reference "/aws/service/aws-for-fluent-bit/2.23.4". Launch a new task to retry.
Reproduction Steps
Using a log router which gets a firelens container from obtainDefaultFluentBitECRImage leads to this issue. After deploying a stack, attempt to run a hotswap deployment.
Possible Solution
CDK Hotswap should either resolve ssm parameters in these scenarios such that the image URI is resolved in time for the image field in a task definition to be usable by ECS, or obtainDefaultFluentBitECRImage should change its implementation to be compatible with hotswap. Otherwise, CDK hotswap perhaps could continue to use correct fields from the original/previous deploy when the fields have no diff.
Additional Information/Context
No response
CDK CLI Version
2.78
Framework Version
No response
Node.js Version
16
OS
Mac OSX
Language
Typescript
Language Version
No response
Other information
No response
Describe the bug
When CDK hotswapping a task definition that uses the function
obtainDefaultFluentBitECRImagefound in firelens-log-router.ts, the use of an image URI which is grabbed from an SSM repository leads to failed deployments. Upon hotswapping, the API call made to ECS simply uses the SSM parameter name (/aws/service/aws-for-fluent-bit:latest) instead of the value of the SSM parameter, as happens in CDK. This makes the function incompatible with CDK hotswap.Expected Behavior
CDK Hotswap uses a resolvable image URI when making ECS API calls
Current Behavior
CDK Hotswap fails with the error:
Reproduction Steps
Using a log router which gets a firelens container from
obtainDefaultFluentBitECRImageleads to this issue. After deploying a stack, attempt to run a hotswap deployment.Possible Solution
CDK Hotswap should either resolve ssm parameters in these scenarios such that the image URI is resolved in time for the image field in a task definition to be usable by ECS, or
obtainDefaultFluentBitECRImageshould change its implementation to be compatible with hotswap. Otherwise, CDK hotswap perhaps could continue to use correct fields from the original/previous deploy when the fields have no diff.Additional Information/Context
No response
CDK CLI Version
2.78
Framework Version
No response
Node.js Version
16
OS
Mac OSX
Language
Typescript
Language Version
No response
Other information
No response