Skip to content

Commit

Permalink
rosetta
Browse files Browse the repository at this point in the history
  • Loading branch information
comcalvi committed Aug 14, 2023
1 parent fb41291 commit ce83818
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/@aws-cdk/aws-batch-alpha/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -660,17 +660,21 @@ You can grant any Principal the `batch:submitJob` permission on both a job defin

```ts
import * as cdk from 'aws-cdk-lib';
new batch.EcsJobDefinition(this, 'JobDefn', {
import * as iam from 'aws-cdk-lib/aws-iam';

declare const vpc: ec2.IVpc;

const ecsJob = new batch.EcsJobDefinition(this, 'JobDefn', {
container: new batch.EcsEc2ContainerDefinition(this, 'containerDefn', {
image: ecs.ContainerImage.fromRegistry('public.ecr.aws/amazonlinux/amazonlinux:latest'),
memory: cdk.Size.mebibytes(2048),
cpu: 256,
}),
});

new batch.JobQueue(this, 'JobQueue', {
const queue = new batch.JobQueue(this, 'JobQueue', {
computeEnvironments: [{
computeEnvironment: new ManagedEc2EcsComputeEnvironment(this, 'managedEc2CE', {
computeEnvironment: new batch.ManagedEc2EcsComputeEnvironment(this, 'managedEc2CE', {
vpc,
}),
order: 1,
Expand Down

0 comments on commit ce83818

Please sign in to comment.