(@aws-cdk/aws-ecs): Expose logdriver "mode" property for @aws-cdk/aws-ecs.AwsLogDriverProps
Currently it is possible to change aws logdriver "mode" in CloudFormation https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_awslogs.html
But AwsLogDriverProps do not expose the property in CDK.
Use Case
We have a performance need to deliver logs, but the ordering is not as relevant to us. Adjusting the mode to non-blocking would help.
Proposed Solution
Add "mode" as configurable option for AwsLogDriverProps / reach parity with CloudFormation API.
Other
https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_awslogs.html
This is a :rocket: Feature Request
@SoManyHs Can I pick this up?
@hassanazharkhan absolutely!! We'd love your contribution. I'll go ahead and assign you to this issue!
In case anyone is looking for a workaround while this feature is in progress:
It is possible to adjust this flag by falling back to the L1 Cfn resources.
Using a L3 ApplicationLoadBalancedEc2Service as an example:
const albEc2Service = new ecs_patterns.ApplicationLoadBalancedEc2Service(...);
let cfnTaskDefinition = albEc2Service.taskDefinition.node.defaultChild as ecs.CfnTaskDefinition;
cfnTaskDefinition.addPropertyOverride('ContainerDefinitions.0.LogConfiguration.Options', {
'mode': 'non-blocking'
});
This can of course be used on anything that surfaces a L2 TaskDefinition. 👍
⚠️COMMENT VISIBILITY WARNING⚠️
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.