Skip to content

Commit

Permalink
fix(ecs): correct typo and other minor mistakes in ecs readme (#1448)
Browse files Browse the repository at this point in the history
  • Loading branch information
BDQ authored and Elad Ben-Israel committed Dec 30, 2018
1 parent 7cd84a0 commit 9c91b20
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/@aws-cdk/aws-ecs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,14 @@ For a `FargateTaskDefinition`, specify the task size (`memoryMiB` and `cpu`):

```ts
const fargateTaskDefinition = new ecs.FargateTaskDefinition(this, 'TaskDef', {
memoryMiB: '512'
cpu: 256,
memoryMiB: '512',
cpu: '256'
});
```
To add containers to a Task Definition, call `addContainer()`:

```ts
const container = fargateTaskDefinition.addContainer(this, {
const container = fargateTaskDefinition.addContainer("WebContainer", {
// Use an image from DockerHub
image: ecs.ContainerImage.fromDockerHub("amazon/amazon-ecs-sample"),
// ... other options here ...
Expand All @@ -132,7 +132,7 @@ const ec2TaskDefinition = new ecs.Ec2TaskDefinition(this, 'TaskDef', {
networkMode: bridge
});

const container = ec2TaskDefinition.addContainer(this, {
const container = ec2TaskDefinition.addContainer("WebContainer", {
// Use an image from DockerHub
image: ecs.ContainerImage.fromDockerHub("amazon/amazon-ecs-sample"),
memoryLimitMiB: 1024
Expand All @@ -156,7 +156,7 @@ tasks you intend to run: EC2, Fargate, or both:

```ts
const taskDefinition = new ecs.TaskDefinition(this, 'TaskDef', {
memoryMiB: '512'
memoryMiB: '512',
cpu: 256,
networkMode: 'awsvpc',
compatibility: ecs.Compatibility.Ec2AndFargate,
Expand Down

0 comments on commit 9c91b20

Please sign in to comment.