Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(@aws-cdk/aws-ecs): Expose logdriver "mode" property for @aws-cdk/aws-ecs.AwsLogDriverProps #13845

Closed
nicohartto opened this issue Mar 29, 2021 · 4 comments · Fixed by #13965
Closed
Labels
@aws-cdk/aws-ecs Related to Amazon Elastic Container effort/small Small work item – less than a day of effort feature/coverage-gap Gaps in CloudFormation coverage by L2 constructs feature-request A feature should be added or improved. p2

Comments

@nicohartto
Copy link

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 🚀 Feature Request

@nicohartto nicohartto added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Mar 29, 2021
@SoManyHs SoManyHs added @aws-cdk/aws-ecs Related to Amazon Elastic Container p2 effort/small Small work item – less than a day of effort and removed needs-triage This issue or PR still needs to be triaged. labels Mar 29, 2021
@hassanazharkhan
Copy link
Contributor

@SoManyHs Can I pick this up?

@SoManyHs
Copy link
Contributor

@hassanazharkhan absolutely!! We'd love your contribution. I'll go ahead and assign you to this issue!

@Bio2hazard
Copy link
Contributor

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. 👍

@ericzbeard ericzbeard added the feature/coverage-gap Gaps in CloudFormation coverage by L2 constructs label Apr 1, 2021
@hassanazharkhan hassanazharkhan removed their assignment Apr 12, 2021
@mergify mergify bot closed this as completed in #13965 May 4, 2021
mergify bot pushed a commit that referenced this issue May 4, 2021
Closes [#13845](#13845)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

github-actions bot commented May 4, 2021

⚠️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.

john-tipper pushed a commit to john-tipper/aws-cdk that referenced this issue May 10, 2021
Closes [aws#13845](aws#13845)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
hollanddd pushed a commit to hollanddd/aws-cdk that referenced this issue Aug 26, 2021
Closes [aws#13845](aws#13845)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-ecs Related to Amazon Elastic Container effort/small Small work item – less than a day of effort feature/coverage-gap Gaps in CloudFormation coverage by L2 constructs feature-request A feature should be added or improved. p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants