You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(ecs): ecs exec cannot be enabled for ECS Anywhere (ecs.ExternalService) (#31374)
### Issue # (if applicable)
Closes#31181.
### Reason for this change
In the `ecs.ExternalService` class (ECS Anywhere), the `enableExecuteCommand` property cannot be set to true, so it is not possible to enable ECS exec.
However, the [documentation](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-exec.html) states that ECS Anywhere supports ECS Exec.
> ECS Exec is supported for tasks that run on the following infrastructure:
> Linux and Windows containers on external instances (Amazon ECS Anywhere)
### Description of changes
Remove unnecessary if statement.
### Description of how you validated changes
Fix an unit test.
### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)
----
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@@ -1606,7 +1606,7 @@ to work, you need to have the SSM plugin for the AWS CLI installed locally. For
1606
1606
[Install Session Manager plugin for AWS CLI](https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-install-plugin.html).
1607
1607
1608
1608
To enable the ECS Exec feature for your containers, set the boolean flag `enableExecuteCommand` to `true` in
1609
-
your `Ec2Service`or `FargateService`.
1609
+
your `Ec2Service`, `FargateService`or `ExternalService`.
1610
1610
1611
1611
```ts
1612
1612
declareconst cluster:ecs.Cluster;
@@ -1771,9 +1771,9 @@ const service = new ecs.FargateService(this, 'Service', {
1771
1771
## ServiceManagedVolume
1772
1772
1773
1773
Amazon ECS now supports the attachment of Amazon Elastic Block Store (EBS) volumes to ECS tasks,
1774
-
allowing you to utilize persistent, high-performance block storage with your ECS services.
1775
-
This feature supports various use cases, such as using EBS volumes as extended ephemeral storage or
1776
-
loading data from EBS snapshots.
1774
+
allowing you to utilize persistent, high-performance block storage with your ECS services.
1775
+
This feature supports various use cases, such as using EBS volumes as extended ephemeral storage or
1776
+
loading data from EBS snapshots.
1777
1777
You can also specify `encrypted: true` so that ECS will manage the KMS key. If you want to use your own KMS key, you may do so by providing both `encrypted: true` and `kmsKeyId`.
1778
1778
1779
1779
You can only attach a single volume for each task in the ECS Service.
0 commit comments