Skip to content

Commit

Permalink
feat: add arnForTasks method
Browse files Browse the repository at this point in the history
test: add test
  • Loading branch information
badmintoncryer committed Dec 15, 2023
1 parent 21a0fa6 commit e1ffc5c
Show file tree
Hide file tree
Showing 21 changed files with 3,195 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import * as path from 'path';
import * as ec2 from 'aws-cdk-lib/aws-ec2';
import * as ecs from 'aws-cdk-lib/aws-ecs';
import { App, Stack } from 'aws-cdk-lib';
import * as integ from '@aws-cdk/integ-tests-alpha';
import { QueueProcessingEc2Service } from 'aws-cdk-lib/aws-ecs-patterns';

const app = new App();
const stack = new Stack(app, 'aws-ecs-patterns-queue');

const vpc = new ec2.Vpc(stack, 'Vpc', { maxAzs: 2, restrictDefaultSecurityGroup: false });
const cluster = new ecs.Cluster(stack, 'Cluster', { vpc });
cluster.addCapacity('DefaultAutoScalingGroup', { instanceType: new ec2.InstanceType('t2.micro') });

new QueueProcessingEc2Service(stack, 'QueueProcessingService', {
cluster,
image: new ecs.AssetImage(path.join(__dirname, '..', 'sqs-reader')),
memoryReservationMiB: 512,
});

new integ.IntegTest(app, 'queueProcessingFargateServiceTest', {
testCases: [stack],
});

app.synth();

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e1ffc5c

Please sign in to comment.