(aws-ecs): adding cluster config disables container insights
See original GitHub issueWhat is the problem?
ECS Cluster container insights gets disabled, even if the cdk stack settings is set to true
.
Reproduction Steps
Created a minimal reproducible example at https://github.com/rajyan/cdk-ecs-bug.
First, deploy a cluster with containerInsights: true
only.
import * as cdk from '@aws-cdk/core';
import * as ecs from '@aws-cdk/aws-ecs';
export class CdkEcsBugStack extends cdk.Stack {
constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) {
super(scope, id, props);
new ecs.Cluster(this, 'Cluster', {
containerInsights: true,
});
}
}
Then deploy the cluster adding executeCommandConfiguration
, leaving containerInsights: true
.
import * as cdk from '@aws-cdk/core';
import * as ecs from '@aws-cdk/aws-ecs';
export class CdkEcsBugStack extends cdk.Stack {
constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) {
super(scope, id, props);
new ecs.Cluster(this, 'Cluster', {
containerInsights: true,
executeCommandConfiguration: {
logging: ecs.ExecuteCommandLogging.OVERRIDE,
logConfiguration: {
cloudWatchLogGroup: new LogGroup(this, 'LogGroup'),
}
},
});
}
}
What did you expect to happen?
Only executeCommandConfiguration should be added to the cluster, and no changes in containerInsights.
What actually happened?
Container insights got disabled.
CDK CLI Version
1.134.0
Framework Version
No response
Node.js Version
v16.13.0
OS
Both on Linux and maxOS
Language
Typescript
Language Version
TypeScript (3.9.7)
Other information
Also confirmed that deploying these two settings at once won’t disable container insights.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Setting up Container Insights on Amazon ECS for cluster
You can enable Container Insights on new and existing Amazon ECS clusters. Container Insights collects metrics at the cluster, task, and service levels....
Read more >[ecs] Cannot disable containerInsights of a cluster ... - GitHub
I tried disabling containerInsights of an ECS cluster but it failed. It seems CFn doesn't support removing the setting but replacing.
Read more >Ensure container insights are enabled on ECS cluster
Open the Amazon ECS console. · In the navigation pane, choose Account Settings. · To enable the Container Insights default opt-in, check the...
Read more >Clean up resources - Amazon ECS Workshop
To disable container insights for the ECS cluster execute following command. ... Your output should look similar to this one below. ... Go...
Read more >How to enable container insights on already created ECS ...
I unclicked in aws console (in account settings) then i aws cli runned the command " aws ecs update-cluster-settings --cluster myCluster ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ryparker
I’m sorry to hurry you.
Thank you very much for your investigation!
Handling this internally. I’ll follow up in this thread when we have updates to share.