Skip to content

Commit

Permalink
fix: README
Browse files Browse the repository at this point in the history
  • Loading branch information
badmintoncryer committed Dec 16, 2023
1 parent ca62ca5 commit 5b3d2a5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/aws-cdk-lib/aws-ecs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,9 @@ cluster.addAsgCapacityProvider(capacityProvider);
The following code retrieve the Amazon Resource Names (ARNs) of tasks that are a part of a specified ECS cluster.
It's useful when you want to grant permissions to a task to access other AWS resources.

```typescript
declare cluster: Cluster;
declare taskDefinition: TaskDefinition;
```ts
declare const cluster: ecs.Cluster;
declare const taskDefinition: ecs.TaskDefinition;
const taskARNs = cluster.arnForTasks('*'); // arn:aws:ecs:<region>:<regionId>:task/<clusterName>/*

// Grant the task permission to access other AWS resources
Expand All @@ -203,7 +203,6 @@ taskDefinition.addToTaskRolePolicy(
)
```


### Bottlerocket

[Bottlerocket](https://aws.amazon.com/bottlerocket/) is a Linux-based open source operating system that is
Expand Down

0 comments on commit 5b3d2a5

Please sign in to comment.