From 81d323576ec714ebcbdfa7825f3ee592a5027be3 Mon Sep 17 00:00:00 2001 From: Anurag Mohapatra Date: Sat, 9 Dec 2023 08:34:07 +0000 Subject: [PATCH 01/14] Adding property to allow consumer to disable Cpu based scaling --- .../aws-cdk-lib/aws-ecs-patterns/README.md | 21 +++++ .../lib/base/queue-processing-service-base.ts | 37 +++++++- .../queue-processing-fargate-service.test.ts | 92 +++++++++++++++++++ 3 files changed, 147 insertions(+), 3 deletions(-) diff --git a/packages/aws-cdk-lib/aws-ecs-patterns/README.md b/packages/aws-cdk-lib/aws-ecs-patterns/README.md index aab49b0b8b173..26cfd9df3093a 100644 --- a/packages/aws-cdk-lib/aws-ecs-patterns/README.md +++ b/packages/aws-cdk-lib/aws-ecs-patterns/README.md @@ -295,6 +295,27 @@ const queueProcessingFargateService = new ecsPatterns.QueueProcessingFargateServ when queue not provided by user, CDK will create a primary queue and a dead letter queue with default redrive policy and attach permission to the task to be able to access the primary queue. +NOTE: This construct add a CPU Based scaling strategy by default, if this is not required in any solution please disable this by setting `disableCpuBasedScaling` to `true`. + +```ts +declare const cluster: ecs.Cluster; +const queueProcessingFargateService = new ecsPatterns.QueueProcessingFargateService(this, 'Service', { + cluster, + memoryLimitMiB: 512, + image: ecs.ContainerImage.fromRegistry('test'), + command: ["-c", "4", "amazon.com"], + enableLogging: false, + desiredTaskCount: 2, + environment: { + TEST_ENVIRONMENT_VARIABLE1: "test environment variable 1 value", + TEST_ENVIRONMENT_VARIABLE2: "test environment variable 2 value", + }, + maxScalingCapacity: 5, + containerName: 'test', + disableCpuBasedScaling: true, +}); +``` + ## Scheduled Tasks To define a task that runs periodically, there are 2 options: diff --git a/packages/aws-cdk-lib/aws-ecs-patterns/lib/base/queue-processing-service-base.ts b/packages/aws-cdk-lib/aws-ecs-patterns/lib/base/queue-processing-service-base.ts index 385caafdc0ca2..96919446335b3 100644 --- a/packages/aws-cdk-lib/aws-ecs-patterns/lib/base/queue-processing-service-base.ts +++ b/packages/aws-cdk-lib/aws-ecs-patterns/lib/base/queue-processing-service-base.ts @@ -221,6 +221,20 @@ export interface QueueProcessingServiceBaseProps { * @default - false */ readonly enableExecuteCommand?: boolean; + + /** + * Flag to disable CPU based auto scaling strategy on the service. + * + * @default - false + */ + readonly disableCpuBasedScaling?: boolean + + /** + * The target CPU utilization percentage for CPU based scaling strategy when enabled. + * + * @default - 50 + */ + readonly targetUtilizationPercent?: number } /** @@ -279,6 +293,18 @@ export abstract class QueueProcessingServiceBase extends Construct { * The AwsLogDriver to use for logging if logging is enabled. */ public readonly logDriver?: LogDriver; + /** + * Flag to disable CPU based auto scaling strategy on the service. + * + * @default - false + */ + public readonly disableCpuBasedScaling: boolean = false + /** + * The target CPU utilization percentage for CPU based scaling strategy when enabled. + * + * @default - 50 + */ + public readonly targetUtilizationPercent: number = 50 /** * Constructs a new instance of the QueueProcessingServiceBase class. @@ -325,6 +351,8 @@ export abstract class QueueProcessingServiceBase extends Construct { // Add the queue name to environment variables this.environment = { ...(props.environment || {}), QUEUE_NAME: this.sqsQueue.queueName }; this.secrets = props.secrets; + this.disableCpuBasedScaling = props.disableCpuBasedScaling ?? false; + this.targetUtilizationPercent = props.targetUtilizationPercent ?? 50; this.desiredCount = props.desiredTaskCount ?? 1; @@ -357,9 +385,12 @@ export abstract class QueueProcessingServiceBase extends Construct { */ protected configureAutoscalingForService(service: BaseService) { const scalingTarget = service.autoScaleTaskCount({ maxCapacity: this.maxCapacity, minCapacity: this.minCapacity }); - scalingTarget.scaleOnCpuUtilization('CpuScaling', { - targetUtilizationPercent: 50, - }); + + if (!this.disableCpuBasedScaling) { + scalingTarget.scaleOnCpuUtilization('CpuScaling', { + targetUtilizationPercent: this.targetUtilizationPercent, + }); + } scalingTarget.scaleOnMetric('QueueMessagesVisibleScaling', { metric: this.sqsQueue.metricApproximateNumberOfMessagesVisible(), scalingSteps: this.scalingSteps, diff --git a/packages/aws-cdk-lib/aws-ecs-patterns/test/fargate/queue-processing-fargate-service.test.ts b/packages/aws-cdk-lib/aws-ecs-patterns/test/fargate/queue-processing-fargate-service.test.ts index 05a4755e5bbdc..3e4ebf5acca30 100644 --- a/packages/aws-cdk-lib/aws-ecs-patterns/test/fargate/queue-processing-fargate-service.test.ts +++ b/packages/aws-cdk-lib/aws-ecs-patterns/test/fargate/queue-processing-fargate-service.test.ts @@ -487,6 +487,98 @@ testDeprecated('test Fargate queue worker service construct - with optional prop }); }); +testDeprecated('test Fargate queue worker service construct - with cpu scaling strategy disabled', () => { + // GIVEN + const stack = new cdk.Stack(); + const vpc = new ec2.Vpc(stack, 'VPC'); + const cluster = new ecs.Cluster(stack, 'Cluster', { vpc }); + cluster.addAsgCapacityProvider(new AsgCapacityProvider(stack, 'DefaultAutoScalingGroupProvider', { + autoScalingGroup: new AutoScalingGroup(stack, 'DefaultAutoScalingGroup', { + vpc, + instanceType: new ec2.InstanceType('t2.micro'), + machineImage: MachineImage.latestAmazonLinux(), + }), + })); + const queue = new sqs.Queue(stack, 'fargate-test-queue', { + queueName: 'fargate-test-sqs-queue', + }); + + // WHEN + new ecsPatterns.QueueProcessingFargateService(stack, 'Service', { + cluster, + memoryLimitMiB: 512, + image: ecs.ContainerImage.fromRegistry('test'), + command: ['-c', '4', 'amazon.com'], + enableLogging: false, + environment: { + TEST_ENVIRONMENT_VARIABLE1: 'test environment variable 1 value', + TEST_ENVIRONMENT_VARIABLE2: 'test environment variable 2 value', + }, + queue, + maxScalingCapacity: 5, + minHealthyPercent: 60, + maxHealthyPercent: 150, + serviceName: 'fargate-test-service', + family: 'fargate-task-family', + platformVersion: ecs.FargatePlatformVersion.VERSION1_4, + circuitBreaker: { rollback: true }, + disableCpuBasedScaling: true, + }); + + // THEN - QueueWorker is of FARGATE launch type, an SQS queue is created and all optional properties are set. + Template.fromStack(stack).hasResourceProperties('AWS::ECS::Service', { + DeploymentConfiguration: { + MinimumHealthyPercent: 60, + MaximumPercent: 150, + DeploymentCircuitBreaker: { + Enable: true, + Rollback: true, + }, + }, + LaunchType: 'FARGATE', + ServiceName: 'fargate-test-service', + PlatformVersion: ecs.FargatePlatformVersion.VERSION1_4, + DeploymentController: { + Type: 'ECS', + }, + }); + + Template.fromStack(stack).hasResourceProperties('AWS::SQS::Queue', { QueueName: 'fargate-test-sqs-queue' }); + + Template.fromStack(stack).hasResourceProperties('AWS::ECS::TaskDefinition', { + ContainerDefinitions: [ + Match.objectLike({ + Command: [ + '-c', + '4', + 'amazon.com', + ], + Environment: [ + { + Name: 'TEST_ENVIRONMENT_VARIABLE1', + Value: 'test environment variable 1 value', + }, + { + Name: 'TEST_ENVIRONMENT_VARIABLE2', + Value: 'test environment variable 2 value', + }, + { + Name: 'QUEUE_NAME', + Value: { + 'Fn::GetAtt': [ + 'fargatetestqueue28B43841', + 'QueueName', + ], + }, + }, + ], + Image: 'test', + }), + ], + Family: 'fargate-task-family', + }); +}); + test('can set custom containerName', () => { // GIVEN const stack = new cdk.Stack(); From 918174d9a5ed68034d20f8459d29cf071dd8c13c Mon Sep 17 00:00:00 2001 From: Anurag Mohapatra Date: Fri, 15 Dec 2023 13:26:31 +0000 Subject: [PATCH 02/14] Fix PR review comments --- .../Dockerfile | 10 + .../index.py | 22 + .../aws-ecs-patterns-queue-public.assets.json | 32 + ...ws-ecs-patterns-queue-public.template.json | 935 ++++++++++ .../cdk.out | 1 + .../integ.json | 12 + .../manifest.json | 371 ++++ ...efaultTestDeployAssertD65416D6.assets.json | 19 + ...aultTestDeployAssertD65416D6.template.json | 36 + .../tree.json | 1608 +++++++++++++++++ ...sing-fargate-service-custom-cpu-scaling.ts | 24 + .../Dockerfile | 10 + .../index.py | 22 + .../aws-ecs-patterns-queue-public.assets.json | 32 + ...ws-ecs-patterns-queue-public.template.json | 915 ++++++++++ .../cdk.out | 1 + .../integ.json | 12 + .../manifest.json | 365 ++++ ...efaultTestDeployAssertD65416D6.assets.json | 19 + ...aultTestDeployAssertD65416D6.template.json | 36 + .../tree.json | 1574 ++++++++++++++++ ...ocessing-fargate-service-no-cpu-scaling.ts | 24 + .../lib/base/queue-processing-service-base.ts | 12 +- .../queue-processing-fargate-service.test.ts | 109 +- 24 files changed, 6194 insertions(+), 7 deletions(-) create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/asset.497b192764e66ae2955bba8dff8487b11aaaaf904414455868e2560e31f47211/Dockerfile create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/asset.497b192764e66ae2955bba8dff8487b11aaaaf904414455868e2560e31f47211/index.py create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/aws-ecs-patterns-queue-public.assets.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/aws-ecs-patterns-queue-public.template.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/cdk.out create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/integ.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/manifest.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.assets.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.template.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/tree.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.ts create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/asset.497b192764e66ae2955bba8dff8487b11aaaaf904414455868e2560e31f47211/Dockerfile create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/asset.497b192764e66ae2955bba8dff8487b11aaaaf904414455868e2560e31f47211/index.py create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/aws-ecs-patterns-queue-public.assets.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/aws-ecs-patterns-queue-public.template.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/cdk.out create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/integ.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/manifest.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.assets.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.template.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/tree.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.ts diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/asset.497b192764e66ae2955bba8dff8487b11aaaaf904414455868e2560e31f47211/Dockerfile b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/asset.497b192764e66ae2955bba8dff8487b11aaaaf904414455868e2560e31f47211/Dockerfile new file mode 100644 index 0000000000000..a57d7f921cd45 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/asset.497b192764e66ae2955bba8dff8487b11aaaaf904414455868e2560e31f47211/Dockerfile @@ -0,0 +1,10 @@ +FROM public.ecr.aws/lambda/python:3.6 + +RUN pip3 install boto3 + +ENV QUEUE_NAME $QUEUE_NAME + +WORKDIR /src +ADD . /src + +ENTRYPOINT ["python3", "index.py"] diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/asset.497b192764e66ae2955bba8dff8487b11aaaaf904414455868e2560e31f47211/index.py b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/asset.497b192764e66ae2955bba8dff8487b11aaaaf904414455868e2560e31f47211/index.py new file mode 100644 index 0000000000000..8b53f5149cb24 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/asset.497b192764e66ae2955bba8dff8487b11aaaaf904414455868e2560e31f47211/index.py @@ -0,0 +1,22 @@ +#!/usr/bin/python +import os +import boto3 + +QUEUE_NAME = os.environ.get('QUEUE_NAME') +print('QUEUE_NAME ' + QUEUE_NAME) + +if __name__ == '__main__': + client = boto3.client('sqs') + queue_url = client.get_queue_url(QueueName=QUEUE_NAME)['QueueUrl'] + print('queue_url ' + queue_url) + while True: + response = client.receive_message( + QueueUrl=queue_url, + WaitTimeSeconds=10, + ) + if response and 'Messages' in response: + for msg in response['Messages']: + print(msg['Body']) + entries = [{'Id': x['MessageId'], 'ReceiptHandle': x['ReceiptHandle']} for x in response['Messages']] + client.delete_message_batch(QueueUrl=queue_url, Entries=entries) + diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/aws-ecs-patterns-queue-public.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/aws-ecs-patterns-queue-public.assets.json new file mode 100644 index 0000000000000..65191079254f6 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/aws-ecs-patterns-queue-public.assets.json @@ -0,0 +1,32 @@ +{ + "version": "35.0.0", + "files": { + "bfbdcf74eec6aa8e8536b34e3725e087fcb3ef3ec8f3269bbd284c06f7f455b6": { + "source": { + "path": "aws-ecs-patterns-queue-public.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "bfbdcf74eec6aa8e8536b34e3725e087fcb3ef3ec8f3269bbd284c06f7f455b6.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": { + "497b192764e66ae2955bba8dff8487b11aaaaf904414455868e2560e31f47211": { + "source": { + "directory": "asset.497b192764e66ae2955bba8dff8487b11aaaaf904414455868e2560e31f47211" + }, + "destinations": { + "current_account-current_region": { + "repositoryName": "cdk-hnb659fds-container-assets-${AWS::AccountId}-${AWS::Region}", + "imageTag": "497b192764e66ae2955bba8dff8487b11aaaaf904414455868e2560e31f47211", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-image-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/aws-ecs-patterns-queue-public.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/aws-ecs-patterns-queue-public.template.json new file mode 100644 index 0000000000000..c3871e30cab3d --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/aws-ecs-patterns-queue-public.template.json @@ -0,0 +1,935 @@ +{ + "Resources": { + "VPCB9E5F0B4": { + "Type": "AWS::EC2::VPC", + "Properties": { + "CidrBlock": "10.0.0.0/16", + "EnableDnsHostnames": true, + "EnableDnsSupport": true, + "InstanceTenancy": "default", + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-patterns-queue-public/VPC" + } + ] + } + }, + "VPCPublicSubnet1SubnetB4246D30": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "AvailabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.0.0/18", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "VPCPublicSubnet1RouteTableFEE4B781": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "VPCPublicSubnet1RouteTableAssociation0B0896DC": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet1RouteTableFEE4B781" + }, + "SubnetId": { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + } + } + }, + "VPCPublicSubnet1DefaultRoute91CEF279": { + "Type": "AWS::EC2::Route", + "Properties": { + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VPCIGWB7E252D3" + }, + "RouteTableId": { + "Ref": "VPCPublicSubnet1RouteTableFEE4B781" + } + }, + "DependsOn": [ + "VPCVPCGW99B986DC" + ] + }, + "VPCPublicSubnet1EIP6AD938E8": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1" + } + ] + } + }, + "VPCPublicSubnet1NATGatewayE0556630": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VPCPublicSubnet1EIP6AD938E8", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1" + } + ] + }, + "DependsOn": [ + "VPCPublicSubnet1DefaultRoute91CEF279", + "VPCPublicSubnet1RouteTableAssociation0B0896DC" + ] + }, + "VPCPublicSubnet2Subnet74179F39": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "AvailabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.64.0/18", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "VPCPublicSubnet2RouteTable6F1A15F1": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "VPCPublicSubnet2RouteTableAssociation5A808732": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" + }, + "SubnetId": { + "Ref": "VPCPublicSubnet2Subnet74179F39" + } + } + }, + "VPCPublicSubnet2DefaultRouteB7481BBA": { + "Type": "AWS::EC2::Route", + "Properties": { + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VPCIGWB7E252D3" + }, + "RouteTableId": { + "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" + } + }, + "DependsOn": [ + "VPCVPCGW99B986DC" + ] + }, + "VPCPublicSubnet2EIP4947BC00": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2" + } + ] + } + }, + "VPCPublicSubnet2NATGateway3C070193": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VPCPublicSubnet2EIP4947BC00", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VPCPublicSubnet2Subnet74179F39" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2" + } + ] + }, + "DependsOn": [ + "VPCPublicSubnet2DefaultRouteB7481BBA", + "VPCPublicSubnet2RouteTableAssociation5A808732" + ] + }, + "VPCPrivateSubnet1Subnet8BCA10E0": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "AvailabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.128.0/18", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet1" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "VPCPrivateSubnet1RouteTableBE8A6027": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet1" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "VPCPrivateSubnet1RouteTableAssociation347902D1": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" + }, + "SubnetId": { + "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" + } + } + }, + "VPCPrivateSubnet1DefaultRouteAE1D6490": { + "Type": "AWS::EC2::Route", + "Properties": { + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VPCPublicSubnet1NATGatewayE0556630" + }, + "RouteTableId": { + "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" + } + } + }, + "VPCPrivateSubnet2SubnetCFCDAA7A": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "AvailabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.192.0/18", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet2" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "VPCPrivateSubnet2RouteTable0A19E10E": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet2" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "VPCPrivateSubnet2RouteTableAssociation0C73D413": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" + }, + "SubnetId": { + "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" + } + } + }, + "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { + "Type": "AWS::EC2::Route", + "Properties": { + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VPCPublicSubnet2NATGateway3C070193" + }, + "RouteTableId": { + "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" + } + } + }, + "VPCIGWB7E252D3": { + "Type": "AWS::EC2::InternetGateway", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-patterns-queue-public/VPC" + } + ] + } + }, + "VPCVPCGW99B986DC": { + "Type": "AWS::EC2::VPCGatewayAttachment", + "Properties": { + "InternetGatewayId": { + "Ref": "VPCIGWB7E252D3" + }, + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "PublicQueueServiceEcsProcessingDeadLetterQueueBC492277": { + "Type": "AWS::SQS::Queue", + "Properties": { + "MessageRetentionPeriod": 1209600 + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "PublicQueueServiceEcsProcessingQueue84CD309D": { + "Type": "AWS::SQS::Queue", + "Properties": { + "RedrivePolicy": { + "deadLetterTargetArn": { + "Fn::GetAtt": [ + "PublicQueueServiceEcsProcessingDeadLetterQueueBC492277", + "Arn" + ] + }, + "maxReceiveCount": 3 + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "ecs-tasks.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "PublicQueueServiceQueueProcessingTaskDefTaskRoleDefaultPolicy5417957C": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "sqs:ChangeMessageVisibility", + "sqs:DeleteMessage", + "sqs:GetQueueAttributes", + "sqs:GetQueueUrl", + "sqs:ReceiveMessage" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "PublicQueueServiceEcsProcessingQueue84CD309D", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "PublicQueueServiceQueueProcessingTaskDefTaskRoleDefaultPolicy5417957C", + "Roles": [ + { + "Ref": "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F" + } + ] + } + }, + "PublicQueueServiceQueueProcessingTaskDef858327F6": { + "Type": "AWS::ECS::TaskDefinition", + "Properties": { + "ContainerDefinitions": [ + { + "Environment": [ + { + "Name": "QUEUE_NAME", + "Value": { + "Fn::GetAtt": [ + "PublicQueueServiceEcsProcessingQueue84CD309D", + "QueueName" + ] + } + } + ], + "Essential": true, + "Image": { + "Fn::Sub": "${AWS::AccountId}.dkr.ecr.${AWS::Region}.${AWS::URLSuffix}/cdk-hnb659fds-container-assets-${AWS::AccountId}-${AWS::Region}:497b192764e66ae2955bba8dff8487b11aaaaf904414455868e2560e31f47211" + }, + "LogConfiguration": { + "LogDriver": "awslogs", + "Options": { + "awslogs-group": { + "Ref": "PublicQueueServiceQueueProcessingTaskDefQueueProcessingContainerLogGroupCFF67B64" + }, + "awslogs-stream-prefix": "PublicQueueService", + "awslogs-region": { + "Ref": "AWS::Region" + } + } + }, + "Name": "QueueProcessingContainer" + } + ], + "Cpu": "256", + "ExecutionRoleArn": { + "Fn::GetAtt": [ + "PublicQueueServiceQueueProcessingTaskDefExecutionRoleE22721BA", + "Arn" + ] + }, + "Family": "awsecspatternsqueuepublicPublicQueueServiceQueueProcessingTaskDefB3738118", + "Memory": "512", + "NetworkMode": "awsvpc", + "RequiresCompatibilities": [ + "FARGATE" + ], + "TaskRoleArn": { + "Fn::GetAtt": [ + "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F", + "Arn" + ] + } + } + }, + "PublicQueueServiceQueueProcessingTaskDefQueueProcessingContainerLogGroupCFF67B64": { + "Type": "AWS::Logs::LogGroup", + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain" + }, + "PublicQueueServiceQueueProcessingTaskDefExecutionRoleE22721BA": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "ecs-tasks.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "PublicQueueServiceQueueProcessingTaskDefExecutionRoleDefaultPolicyD7FF680F": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "ecr:BatchCheckLayerAvailability", + "ecr:BatchGetImage", + "ecr:GetDownloadUrlForLayer" + ], + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":ecr:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":repository/", + { + "Fn::Sub": "cdk-hnb659fds-container-assets-${AWS::AccountId}-${AWS::Region}" + } + ] + ] + } + }, + { + "Action": "ecr:GetAuthorizationToken", + "Effect": "Allow", + "Resource": "*" + }, + { + "Action": [ + "logs:CreateLogStream", + "logs:PutLogEvents" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "PublicQueueServiceQueueProcessingTaskDefQueueProcessingContainerLogGroupCFF67B64", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "PublicQueueServiceQueueProcessingTaskDefExecutionRoleDefaultPolicyD7FF680F", + "Roles": [ + { + "Ref": "PublicQueueServiceQueueProcessingTaskDefExecutionRoleE22721BA" + } + ] + } + }, + "PublicQueueServiceQueueProcessingFargateService7DE3D65B": { + "Type": "AWS::ECS::Service", + "Properties": { + "Cluster": { + "Ref": "EcsDefaultClusterMnL3mNNYNVPC9C1EC7A3" + }, + "DeploymentConfiguration": { + "Alarms": { + "AlarmNames": [], + "Enable": false, + "Rollback": false + }, + "MaximumPercent": 200, + "MinimumHealthyPercent": 50 + }, + "EnableECSManagedTags": false, + "LaunchType": "FARGATE", + "NetworkConfiguration": { + "AwsvpcConfiguration": { + "AssignPublicIp": "ENABLED", + "SecurityGroups": [ + { + "Fn::GetAtt": [ + "PublicQueueServiceQueueProcessingFargateServiceSecurityGroupFC07A65A", + "GroupId" + ] + } + ], + "Subnets": [ + { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + }, + { + "Ref": "VPCPublicSubnet2Subnet74179F39" + } + ] + } + }, + "TaskDefinition": { + "Ref": "PublicQueueServiceQueueProcessingTaskDef858327F6" + } + }, + "DependsOn": [ + "PublicQueueServiceQueueProcessingTaskDefTaskRoleDefaultPolicy5417957C", + "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F" + ] + }, + "PublicQueueServiceQueueProcessingFargateServiceSecurityGroupFC07A65A": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "GroupDescription": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/SecurityGroup", + "SecurityGroupEgress": [ + { + "CidrIp": "0.0.0.0/0", + "Description": "Allow all outbound traffic by default", + "IpProtocol": "-1" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + }, + "DependsOn": [ + "PublicQueueServiceQueueProcessingTaskDefTaskRoleDefaultPolicy5417957C", + "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F" + ] + }, + "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetE040C118": { + "Type": "AWS::ApplicationAutoScaling::ScalableTarget", + "Properties": { + "MaxCapacity": 2, + "MinCapacity": 1, + "ResourceId": { + "Fn::Join": [ + "", + [ + "service/", + { + "Ref": "EcsDefaultClusterMnL3mNNYNVPC9C1EC7A3" + }, + "/", + { + "Fn::GetAtt": [ + "PublicQueueServiceQueueProcessingFargateService7DE3D65B", + "Name" + ] + } + ] + ] + }, + "RoleARN": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/aws-service-role/ecs.application-autoscaling.amazonaws.com/AWSServiceRoleForApplicationAutoScaling_ECSService" + ] + ] + }, + "ScalableDimension": "ecs:service:DesiredCount", + "ServiceNamespace": "ecs" + }, + "DependsOn": [ + "PublicQueueServiceQueueProcessingTaskDefTaskRoleDefaultPolicy5417957C", + "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F" + ] + }, + "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetCpuScaling559C41BF": { + "Type": "AWS::ApplicationAutoScaling::ScalingPolicy", + "Properties": { + "PolicyName": "awsecspatternsqueuepublicPublicQueueServiceQueueProcessingFargateServiceTaskCountTargetCpuScalingF36D44B7", + "PolicyType": "TargetTrackingScaling", + "ScalingTargetId": { + "Ref": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetE040C118" + }, + "TargetTrackingScalingPolicyConfiguration": { + "PredefinedMetricSpecification": { + "PredefinedMetricType": "ECSServiceAverageCPUUtilization" + }, + "TargetValue": 50 + } + }, + "DependsOn": [ + "PublicQueueServiceQueueProcessingTaskDefTaskRoleDefaultPolicy5417957C", + "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F" + ] + }, + "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerPolicyB2B27FF9": { + "Type": "AWS::ApplicationAutoScaling::ScalingPolicy", + "Properties": { + "PolicyName": "awsecspatternsqueuepublicPublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerPolicy2DB1A503", + "PolicyType": "StepScaling", + "ScalingTargetId": { + "Ref": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetE040C118" + }, + "StepScalingPolicyConfiguration": { + "AdjustmentType": "ChangeInCapacity", + "MetricAggregationType": "Maximum", + "StepAdjustments": [ + { + "MetricIntervalUpperBound": 0, + "ScalingAdjustment": -1 + } + ] + } + }, + "DependsOn": [ + "PublicQueueServiceQueueProcessingTaskDefTaskRoleDefaultPolicy5417957C", + "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F" + ] + }, + "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerAlarm5782C233": { + "Type": "AWS::CloudWatch::Alarm", + "Properties": { + "AlarmActions": [ + { + "Ref": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerPolicyB2B27FF9" + } + ], + "AlarmDescription": "Lower threshold scaling alarm", + "ComparisonOperator": "LessThanOrEqualToThreshold", + "Dimensions": [ + { + "Name": "QueueName", + "Value": { + "Fn::GetAtt": [ + "PublicQueueServiceEcsProcessingQueue84CD309D", + "QueueName" + ] + } + } + ], + "EvaluationPeriods": 1, + "MetricName": "ApproximateNumberOfMessagesVisible", + "Namespace": "AWS/SQS", + "Period": 300, + "Statistic": "Maximum", + "Threshold": 0 + }, + "DependsOn": [ + "PublicQueueServiceQueueProcessingTaskDefTaskRoleDefaultPolicy5417957C", + "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F" + ] + }, + "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperPolicyDCB40C8A": { + "Type": "AWS::ApplicationAutoScaling::ScalingPolicy", + "Properties": { + "PolicyName": "awsecspatternsqueuepublicPublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperPolicy89C3D196", + "PolicyType": "StepScaling", + "ScalingTargetId": { + "Ref": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetE040C118" + }, + "StepScalingPolicyConfiguration": { + "AdjustmentType": "ChangeInCapacity", + "MetricAggregationType": "Maximum", + "StepAdjustments": [ + { + "MetricIntervalLowerBound": 0, + "MetricIntervalUpperBound": 400, + "ScalingAdjustment": 1 + }, + { + "MetricIntervalLowerBound": 400, + "ScalingAdjustment": 5 + } + ] + } + }, + "DependsOn": [ + "PublicQueueServiceQueueProcessingTaskDefTaskRoleDefaultPolicy5417957C", + "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F" + ] + }, + "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperAlarm5D67333D": { + "Type": "AWS::CloudWatch::Alarm", + "Properties": { + "AlarmActions": [ + { + "Ref": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperPolicyDCB40C8A" + } + ], + "AlarmDescription": "Upper threshold scaling alarm", + "ComparisonOperator": "GreaterThanOrEqualToThreshold", + "Dimensions": [ + { + "Name": "QueueName", + "Value": { + "Fn::GetAtt": [ + "PublicQueueServiceEcsProcessingQueue84CD309D", + "QueueName" + ] + } + } + ], + "EvaluationPeriods": 1, + "MetricName": "ApproximateNumberOfMessagesVisible", + "Namespace": "AWS/SQS", + "Period": 300, + "Statistic": "Maximum", + "Threshold": 100 + }, + "DependsOn": [ + "PublicQueueServiceQueueProcessingTaskDefTaskRoleDefaultPolicy5417957C", + "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F" + ] + }, + "EcsDefaultClusterMnL3mNNYNVPC9C1EC7A3": { + "Type": "AWS::ECS::Cluster" + } + }, + "Outputs": { + "PublicQueueServiceSQSDeadLetterQueueBCE86DBC": { + "Value": { + "Fn::GetAtt": [ + "PublicQueueServiceEcsProcessingDeadLetterQueueBC492277", + "QueueName" + ] + } + }, + "PublicQueueServiceSQSDeadLetterQueueArn6E134EA4": { + "Value": { + "Fn::GetAtt": [ + "PublicQueueServiceEcsProcessingDeadLetterQueueBC492277", + "Arn" + ] + } + }, + "PublicQueueServiceSQSQueue4D3FBD5C": { + "Value": { + "Fn::GetAtt": [ + "PublicQueueServiceEcsProcessingQueue84CD309D", + "QueueName" + ] + } + }, + "PublicQueueServiceSQSQueueArn38014FDC": { + "Value": { + "Fn::GetAtt": [ + "PublicQueueServiceEcsProcessingQueue84CD309D", + "Arn" + ] + } + } + }, + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/cdk.out new file mode 100644 index 0000000000000..c5cb2e5de6344 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"35.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/integ.json new file mode 100644 index 0000000000000..574ac4affd690 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/integ.json @@ -0,0 +1,12 @@ +{ + "version": "35.0.0", + "testCases": { + "publicQueueProcessingFargateServiceTest/DefaultTest": { + "stacks": [ + "aws-ecs-patterns-queue-public" + ], + "assertionStack": "publicQueueProcessingFargateServiceTest/DefaultTest/DeployAssert", + "assertionStackName": "publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/manifest.json new file mode 100644 index 0000000000000..5ac0b3aab45c7 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/manifest.json @@ -0,0 +1,371 @@ +{ + "version": "35.0.0", + "artifacts": { + "aws-ecs-patterns-queue-public.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "aws-ecs-patterns-queue-public.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "aws-ecs-patterns-queue-public": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "aws-ecs-patterns-queue-public.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/bfbdcf74eec6aa8e8536b34e3725e087fcb3ef3ec8f3269bbd284c06f7f455b6.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "aws-ecs-patterns-queue-public.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "aws-ecs-patterns-queue-public.assets" + ], + "metadata": { + "/aws-ecs-patterns-queue-public/VPC/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCB9E5F0B4" + } + ], + "/aws-ecs-patterns-queue-public/VPC/PublicSubnet1/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet1SubnetB4246D30" + } + ], + "/aws-ecs-patterns-queue-public/VPC/PublicSubnet1/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet1RouteTableFEE4B781" + } + ], + "/aws-ecs-patterns-queue-public/VPC/PublicSubnet1/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet1RouteTableAssociation0B0896DC" + } + ], + "/aws-ecs-patterns-queue-public/VPC/PublicSubnet1/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet1DefaultRoute91CEF279" + } + ], + "/aws-ecs-patterns-queue-public/VPC/PublicSubnet1/EIP": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet1EIP6AD938E8" + } + ], + "/aws-ecs-patterns-queue-public/VPC/PublicSubnet1/NATGateway": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet1NATGatewayE0556630" + } + ], + "/aws-ecs-patterns-queue-public/VPC/PublicSubnet2/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet2Subnet74179F39" + } + ], + "/aws-ecs-patterns-queue-public/VPC/PublicSubnet2/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet2RouteTable6F1A15F1" + } + ], + "/aws-ecs-patterns-queue-public/VPC/PublicSubnet2/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet2RouteTableAssociation5A808732" + } + ], + "/aws-ecs-patterns-queue-public/VPC/PublicSubnet2/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet2DefaultRouteB7481BBA" + } + ], + "/aws-ecs-patterns-queue-public/VPC/PublicSubnet2/EIP": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet2EIP4947BC00" + } + ], + "/aws-ecs-patterns-queue-public/VPC/PublicSubnet2/NATGateway": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet2NATGateway3C070193" + } + ], + "/aws-ecs-patterns-queue-public/VPC/PrivateSubnet1/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet1Subnet8BCA10E0" + } + ], + "/aws-ecs-patterns-queue-public/VPC/PrivateSubnet1/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet1RouteTableBE8A6027" + } + ], + "/aws-ecs-patterns-queue-public/VPC/PrivateSubnet1/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet1RouteTableAssociation347902D1" + } + ], + "/aws-ecs-patterns-queue-public/VPC/PrivateSubnet1/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet1DefaultRouteAE1D6490" + } + ], + "/aws-ecs-patterns-queue-public/VPC/PrivateSubnet2/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet2SubnetCFCDAA7A" + } + ], + "/aws-ecs-patterns-queue-public/VPC/PrivateSubnet2/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet2RouteTable0A19E10E" + } + ], + "/aws-ecs-patterns-queue-public/VPC/PrivateSubnet2/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet2RouteTableAssociation0C73D413" + } + ], + "/aws-ecs-patterns-queue-public/VPC/PrivateSubnet2/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet2DefaultRouteF4F5CFD2" + } + ], + "/aws-ecs-patterns-queue-public/VPC/IGW": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCIGWB7E252D3" + } + ], + "/aws-ecs-patterns-queue-public/VPC/VPCGW": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCVPCGW99B986DC" + } + ], + "/aws-ecs-patterns-queue-public/PublicQueueService/EcsProcessingDeadLetterQueue/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PublicQueueServiceEcsProcessingDeadLetterQueueBC492277" + } + ], + "/aws-ecs-patterns-queue-public/PublicQueueService/EcsProcessingQueue/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PublicQueueServiceEcsProcessingQueue84CD309D" + } + ], + "/aws-ecs-patterns-queue-public/PublicQueueService/SQSDeadLetterQueue": [ + { + "type": "aws:cdk:logicalId", + "data": "PublicQueueServiceSQSDeadLetterQueueBCE86DBC" + } + ], + "/aws-ecs-patterns-queue-public/PublicQueueService/SQSDeadLetterQueueArn": [ + { + "type": "aws:cdk:logicalId", + "data": "PublicQueueServiceSQSDeadLetterQueueArn6E134EA4" + } + ], + "/aws-ecs-patterns-queue-public/PublicQueueService/SQSQueue": [ + { + "type": "aws:cdk:logicalId", + "data": "PublicQueueServiceSQSQueue4D3FBD5C" + } + ], + "/aws-ecs-patterns-queue-public/PublicQueueService/SQSQueueArn": [ + { + "type": "aws:cdk:logicalId", + "data": "PublicQueueServiceSQSQueueArn38014FDC" + } + ], + "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/TaskRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F" + } + ], + "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/TaskRole/DefaultPolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PublicQueueServiceQueueProcessingTaskDefTaskRoleDefaultPolicy5417957C" + } + ], + "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PublicQueueServiceQueueProcessingTaskDef858327F6" + } + ], + "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/QueueProcessingContainer/LogGroup/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PublicQueueServiceQueueProcessingTaskDefQueueProcessingContainerLogGroupCFF67B64" + } + ], + "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/ExecutionRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PublicQueueServiceQueueProcessingTaskDefExecutionRoleE22721BA" + } + ], + "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/ExecutionRole/DefaultPolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PublicQueueServiceQueueProcessingTaskDefExecutionRoleDefaultPolicyD7FF680F" + } + ], + "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/Service": [ + { + "type": "aws:cdk:logicalId", + "data": "PublicQueueServiceQueueProcessingFargateService7DE3D65B" + } + ], + "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/SecurityGroup/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PublicQueueServiceQueueProcessingFargateServiceSecurityGroupFC07A65A" + } + ], + "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetE040C118" + } + ], + "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/CpuScaling/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetCpuScaling559C41BF" + } + ], + "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/LowerPolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerPolicyB2B27FF9" + } + ], + "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/LowerAlarm/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerAlarm5782C233" + } + ], + "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/UpperPolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperPolicyDCB40C8A" + } + ], + "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/UpperAlarm/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperAlarm5D67333D" + } + ], + "/aws-ecs-patterns-queue-public/EcsDefaultClusterMnL3mNNYNVPC/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsDefaultClusterMnL3mNNYNVPC9C1EC7A3" + } + ], + "/aws-ecs-patterns-queue-public/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/aws-ecs-patterns-queue-public/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "aws-ecs-patterns-queue-public" + }, + "publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.assets" + ], + "metadata": { + "/publicQueueProcessingFargateServiceTest/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/publicQueueProcessingFargateServiceTest/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "publicQueueProcessingFargateServiceTest/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.assets.json new file mode 100644 index 0000000000000..ee5b4c64f1c1d --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.assets.json @@ -0,0 +1,19 @@ +{ + "version": "35.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.template.json @@ -0,0 +1,36 @@ +{ + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/tree.json new file mode 100644 index 0000000000000..26b03bfb1168f --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/tree.json @@ -0,0 +1,1608 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "aws-ecs-patterns-queue-public": { + "id": "aws-ecs-patterns-queue-public", + "path": "aws-ecs-patterns-queue-public", + "children": { + "VPC": { + "id": "VPC", + "path": "aws-ecs-patterns-queue-public/VPC", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-patterns-queue-public/VPC/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::VPC", + "aws:cdk:cloudformation:props": { + "cidrBlock": "10.0.0.0/16", + "enableDnsHostnames": true, + "enableDnsSupport": true, + "instanceTenancy": "default", + "tags": [ + { + "key": "Name", + "value": "aws-ecs-patterns-queue-public/VPC" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", + "version": "0.0.0" + } + }, + "PublicSubnet1": { + "id": "PublicSubnet1", + "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1", + "children": { + "Subnet": { + "id": "Subnet", + "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "availabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.0.0/18", + "mapPublicIpOnLaunch": true, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Public" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Public" + }, + { + "key": "Name", + "value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1" + } + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1/Acl", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1" + } + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VPCPublicSubnet1RouteTableFEE4B781" + }, + "subnetId": { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "destinationCidrBlock": "0.0.0.0/0", + "gatewayId": { + "Ref": "VPCIGWB7E252D3" + }, + "routeTableId": { + "Ref": "VPCPublicSubnet1RouteTableFEE4B781" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" + } + }, + "EIP": { + "id": "EIP", + "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1/EIP", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::EIP", + "aws:cdk:cloudformation:props": { + "domain": "vpc", + "tags": [ + { + "key": "Name", + "value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" + } + }, + "NATGateway": { + "id": "NATGateway", + "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1/NATGateway", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::NatGateway", + "aws:cdk:cloudformation:props": { + "allocationId": { + "Fn::GetAtt": [ + "VPCPublicSubnet1EIP6AD938E8", + "AllocationId" + ] + }, + "subnetId": { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + }, + "tags": [ + { + "key": "Name", + "value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" + } + }, + "PublicSubnet2": { + "id": "PublicSubnet2", + "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2", + "children": { + "Subnet": { + "id": "Subnet", + "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "availabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.64.0/18", + "mapPublicIpOnLaunch": true, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Public" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Public" + }, + { + "key": "Name", + "value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2" + } + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2/Acl", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2" + } + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" + }, + "subnetId": { + "Ref": "VPCPublicSubnet2Subnet74179F39" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "destinationCidrBlock": "0.0.0.0/0", + "gatewayId": { + "Ref": "VPCIGWB7E252D3" + }, + "routeTableId": { + "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" + } + }, + "EIP": { + "id": "EIP", + "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2/EIP", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::EIP", + "aws:cdk:cloudformation:props": { + "domain": "vpc", + "tags": [ + { + "key": "Name", + "value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" + } + }, + "NATGateway": { + "id": "NATGateway", + "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2/NATGateway", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::NatGateway", + "aws:cdk:cloudformation:props": { + "allocationId": { + "Fn::GetAtt": [ + "VPCPublicSubnet2EIP4947BC00", + "AllocationId" + ] + }, + "subnetId": { + "Ref": "VPCPublicSubnet2Subnet74179F39" + }, + "tags": [ + { + "key": "Name", + "value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" + } + }, + "PrivateSubnet1": { + "id": "PrivateSubnet1", + "path": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet1", + "children": { + "Subnet": { + "id": "Subnet", + "path": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet1/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "availabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.128.0/18", + "mapPublicIpOnLaunch": false, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Private" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Private" + }, + { + "key": "Name", + "value": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet1" + } + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet1/Acl", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet1/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet1" + } + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet1/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" + }, + "subnetId": { + "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet1/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "destinationCidrBlock": "0.0.0.0/0", + "natGatewayId": { + "Ref": "VPCPublicSubnet1NATGatewayE0556630" + }, + "routeTableId": { + "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" + } + }, + "PrivateSubnet2": { + "id": "PrivateSubnet2", + "path": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet2", + "children": { + "Subnet": { + "id": "Subnet", + "path": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet2/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "availabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.192.0/18", + "mapPublicIpOnLaunch": false, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Private" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Private" + }, + { + "key": "Name", + "value": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet2" + } + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet2/Acl", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet2/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet2" + } + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet2/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" + }, + "subnetId": { + "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet2/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "destinationCidrBlock": "0.0.0.0/0", + "natGatewayId": { + "Ref": "VPCPublicSubnet2NATGateway3C070193" + }, + "routeTableId": { + "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" + } + }, + "IGW": { + "id": "IGW", + "path": "aws-ecs-patterns-queue-public/VPC/IGW", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::InternetGateway", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "aws-ecs-patterns-queue-public/VPC" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", + "version": "0.0.0" + } + }, + "VPCGW": { + "id": "VPCGW", + "path": "aws-ecs-patterns-queue-public/VPC/VPCGW", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::VPCGatewayAttachment", + "aws:cdk:cloudformation:props": { + "internetGatewayId": { + "Ref": "VPCIGWB7E252D3" + }, + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.Vpc", + "version": "0.0.0" + } + }, + "PublicQueueService": { + "id": "PublicQueueService", + "path": "aws-ecs-patterns-queue-public/PublicQueueService", + "children": { + "EcsProcessingDeadLetterQueue": { + "id": "EcsProcessingDeadLetterQueue", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/EcsProcessingDeadLetterQueue", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/EcsProcessingDeadLetterQueue/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SQS::Queue", + "aws:cdk:cloudformation:props": { + "messageRetentionPeriod": 1209600 + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sqs.Queue", + "version": "0.0.0" + } + }, + "EcsProcessingQueue": { + "id": "EcsProcessingQueue", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/EcsProcessingQueue", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/EcsProcessingQueue/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SQS::Queue", + "aws:cdk:cloudformation:props": { + "redrivePolicy": { + "deadLetterTargetArn": { + "Fn::GetAtt": [ + "PublicQueueServiceEcsProcessingDeadLetterQueueBC492277", + "Arn" + ] + }, + "maxReceiveCount": 3 + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sqs.Queue", + "version": "0.0.0" + } + }, + "SQSDeadLetterQueue": { + "id": "SQSDeadLetterQueue", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/SQSDeadLetterQueue", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnOutput", + "version": "0.0.0" + } + }, + "SQSDeadLetterQueueArn": { + "id": "SQSDeadLetterQueueArn", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/SQSDeadLetterQueueArn", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnOutput", + "version": "0.0.0" + } + }, + "SQSQueue": { + "id": "SQSQueue", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/SQSQueue", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnOutput", + "version": "0.0.0" + } + }, + "SQSQueueArn": { + "id": "SQSQueueArn", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/SQSQueueArn", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnOutput", + "version": "0.0.0" + } + }, + "QueueProcessingTaskDef": { + "id": "QueueProcessingTaskDef", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef", + "children": { + "TaskRole": { + "id": "TaskRole", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/TaskRole", + "children": { + "ImportTaskRole": { + "id": "ImportTaskRole", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/TaskRole/ImportTaskRole", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/TaskRole/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "ecs-tasks.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" + } + }, + "DefaultPolicy": { + "id": "DefaultPolicy", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/TaskRole/DefaultPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/TaskRole/DefaultPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "sqs:ChangeMessageVisibility", + "sqs:DeleteMessage", + "sqs:GetQueueAttributes", + "sqs:GetQueueUrl", + "sqs:ReceiveMessage" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "PublicQueueServiceEcsProcessingQueue84CD309D", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "PublicQueueServiceQueueProcessingTaskDefTaskRoleDefaultPolicy5417957C", + "roles": [ + { + "Ref": "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ECS::TaskDefinition", + "aws:cdk:cloudformation:props": { + "containerDefinitions": [ + { + "essential": true, + "image": { + "Fn::Sub": "${AWS::AccountId}.dkr.ecr.${AWS::Region}.${AWS::URLSuffix}/cdk-hnb659fds-container-assets-${AWS::AccountId}-${AWS::Region}:497b192764e66ae2955bba8dff8487b11aaaaf904414455868e2560e31f47211" + }, + "name": "QueueProcessingContainer", + "logConfiguration": { + "logDriver": "awslogs", + "options": { + "awslogs-group": { + "Ref": "PublicQueueServiceQueueProcessingTaskDefQueueProcessingContainerLogGroupCFF67B64" + }, + "awslogs-stream-prefix": "PublicQueueService", + "awslogs-region": { + "Ref": "AWS::Region" + } + } + }, + "environment": [ + { + "name": "QUEUE_NAME", + "value": { + "Fn::GetAtt": [ + "PublicQueueServiceEcsProcessingQueue84CD309D", + "QueueName" + ] + } + } + ] + } + ], + "cpu": "256", + "executionRoleArn": { + "Fn::GetAtt": [ + "PublicQueueServiceQueueProcessingTaskDefExecutionRoleE22721BA", + "Arn" + ] + }, + "family": "awsecspatternsqueuepublicPublicQueueServiceQueueProcessingTaskDefB3738118", + "memory": "512", + "networkMode": "awsvpc", + "requiresCompatibilities": [ + "FARGATE" + ], + "taskRoleArn": { + "Fn::GetAtt": [ + "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F", + "Arn" + ] + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", + "version": "0.0.0" + } + }, + "QueueProcessingContainer": { + "id": "QueueProcessingContainer", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/QueueProcessingContainer", + "children": { + "AssetImage": { + "id": "AssetImage", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/QueueProcessingContainer/AssetImage", + "children": { + "Staging": { + "id": "Staging", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/QueueProcessingContainer/AssetImage/Staging", + "constructInfo": { + "fqn": "aws-cdk-lib.AssetStaging", + "version": "0.0.0" + } + }, + "Repository": { + "id": "Repository", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/QueueProcessingContainer/AssetImage/Repository", + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ecr.RepositoryBase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ecr_assets.DockerImageAsset", + "version": "0.0.0" + } + }, + "LogGroup": { + "id": "LogGroup", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/QueueProcessingContainer/LogGroup", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/QueueProcessingContainer/LogGroup/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Logs::LogGroup", + "aws:cdk:cloudformation:props": {} + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_logs.LogGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", + "version": "0.0.0" + } + }, + "ExecutionRole": { + "id": "ExecutionRole", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/ExecutionRole", + "children": { + "ImportExecutionRole": { + "id": "ImportExecutionRole", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/ExecutionRole/ImportExecutionRole", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/ExecutionRole/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "ecs-tasks.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" + } + }, + "DefaultPolicy": { + "id": "DefaultPolicy", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/ExecutionRole/DefaultPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/ExecutionRole/DefaultPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecr:BatchCheckLayerAvailability", + "ecr:BatchGetImage", + "ecr:GetDownloadUrlForLayer" + ], + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":ecr:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":repository/", + { + "Fn::Sub": "cdk-hnb659fds-container-assets-${AWS::AccountId}-${AWS::Region}" + } + ] + ] + } + }, + { + "Action": "ecr:GetAuthorizationToken", + "Effect": "Allow", + "Resource": "*" + }, + { + "Action": [ + "logs:CreateLogStream", + "logs:PutLogEvents" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "PublicQueueServiceQueueProcessingTaskDefQueueProcessingContainerLogGroupCFF67B64", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "PublicQueueServiceQueueProcessingTaskDefExecutionRoleDefaultPolicyD7FF680F", + "roles": [ + { + "Ref": "PublicQueueServiceQueueProcessingTaskDefExecutionRoleE22721BA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ecs.FargateTaskDefinition", + "version": "0.0.0" + } + }, + "QueueProcessingFargateService": { + "id": "QueueProcessingFargateService", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService", + "children": { + "Service": { + "id": "Service", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/Service", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ECS::Service", + "aws:cdk:cloudformation:props": { + "cluster": { + "Ref": "EcsDefaultClusterMnL3mNNYNVPC9C1EC7A3" + }, + "deploymentConfiguration": { + "maximumPercent": 200, + "minimumHealthyPercent": 50, + "alarms": { + "alarmNames": [], + "enable": false, + "rollback": false + } + }, + "enableEcsManagedTags": false, + "launchType": "FARGATE", + "networkConfiguration": { + "awsvpcConfiguration": { + "assignPublicIp": "ENABLED", + "subnets": [ + { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + }, + { + "Ref": "VPCPublicSubnet2Subnet74179F39" + } + ], + "securityGroups": [ + { + "Fn::GetAtt": [ + "PublicQueueServiceQueueProcessingFargateServiceSecurityGroupFC07A65A", + "GroupId" + ] + } + ] + } + }, + "taskDefinition": { + "Ref": "PublicQueueServiceQueueProcessingTaskDef858327F6" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ecs.CfnService", + "version": "0.0.0" + } + }, + "SecurityGroup": { + "id": "SecurityGroup", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/SecurityGroup", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/SecurityGroup/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SecurityGroup", + "aws:cdk:cloudformation:props": { + "groupDescription": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/SecurityGroup", + "securityGroupEgress": [ + { + "cidrIp": "0.0.0.0/0", + "description": "Allow all outbound traffic by default", + "ipProtocol": "-1" + } + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", + "version": "0.0.0" + } + }, + "ScalingRole": { + "id": "ScalingRole", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/ScalingRole", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "TaskCount": { + "id": "TaskCount", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount", + "children": { + "Target": { + "id": "Target", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ApplicationAutoScaling::ScalableTarget", + "aws:cdk:cloudformation:props": { + "maxCapacity": 2, + "minCapacity": 1, + "resourceId": { + "Fn::Join": [ + "", + [ + "service/", + { + "Ref": "EcsDefaultClusterMnL3mNNYNVPC9C1EC7A3" + }, + "/", + { + "Fn::GetAtt": [ + "PublicQueueServiceQueueProcessingFargateService7DE3D65B", + "Name" + ] + } + ] + ] + }, + "roleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/aws-service-role/ecs.application-autoscaling.amazonaws.com/AWSServiceRoleForApplicationAutoScaling_ECSService" + ] + ] + }, + "scalableDimension": "ecs:service:DesiredCount", + "serviceNamespace": "ecs" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_applicationautoscaling.CfnScalableTarget", + "version": "0.0.0" + } + }, + "CpuScaling": { + "id": "CpuScaling", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/CpuScaling", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/CpuScaling/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ApplicationAutoScaling::ScalingPolicy", + "aws:cdk:cloudformation:props": { + "policyName": "awsecspatternsqueuepublicPublicQueueServiceQueueProcessingFargateServiceTaskCountTargetCpuScalingF36D44B7", + "policyType": "TargetTrackingScaling", + "scalingTargetId": { + "Ref": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetE040C118" + }, + "targetTrackingScalingPolicyConfiguration": { + "predefinedMetricSpecification": { + "predefinedMetricType": "ECSServiceAverageCPUUtilization" + }, + "targetValue": 50 + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_applicationautoscaling.CfnScalingPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_applicationautoscaling.TargetTrackingScalingPolicy", + "version": "0.0.0" + } + }, + "QueueMessagesVisibleScaling": { + "id": "QueueMessagesVisibleScaling", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling", + "children": { + "LowerPolicy": { + "id": "LowerPolicy", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/LowerPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/LowerPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ApplicationAutoScaling::ScalingPolicy", + "aws:cdk:cloudformation:props": { + "policyName": "awsecspatternsqueuepublicPublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerPolicy2DB1A503", + "policyType": "StepScaling", + "scalingTargetId": { + "Ref": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetE040C118" + }, + "stepScalingPolicyConfiguration": { + "adjustmentType": "ChangeInCapacity", + "metricAggregationType": "Maximum", + "stepAdjustments": [ + { + "metricIntervalUpperBound": 0, + "scalingAdjustment": -1 + } + ] + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_applicationautoscaling.CfnScalingPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_applicationautoscaling.StepScalingAction", + "version": "0.0.0" + } + }, + "LowerAlarm": { + "id": "LowerAlarm", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/LowerAlarm", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/LowerAlarm/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::CloudWatch::Alarm", + "aws:cdk:cloudformation:props": { + "alarmActions": [ + { + "Ref": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerPolicyB2B27FF9" + } + ], + "alarmDescription": "Lower threshold scaling alarm", + "comparisonOperator": "LessThanOrEqualToThreshold", + "dimensions": [ + { + "name": "QueueName", + "value": { + "Fn::GetAtt": [ + "PublicQueueServiceEcsProcessingQueue84CD309D", + "QueueName" + ] + } + } + ], + "evaluationPeriods": 1, + "metricName": "ApproximateNumberOfMessagesVisible", + "namespace": "AWS/SQS", + "period": 300, + "statistic": "Maximum", + "threshold": 0 + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", + "version": "0.0.0" + } + }, + "UpperPolicy": { + "id": "UpperPolicy", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/UpperPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/UpperPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ApplicationAutoScaling::ScalingPolicy", + "aws:cdk:cloudformation:props": { + "policyName": "awsecspatternsqueuepublicPublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperPolicy89C3D196", + "policyType": "StepScaling", + "scalingTargetId": { + "Ref": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetE040C118" + }, + "stepScalingPolicyConfiguration": { + "adjustmentType": "ChangeInCapacity", + "metricAggregationType": "Maximum", + "stepAdjustments": [ + { + "metricIntervalLowerBound": 0, + "metricIntervalUpperBound": 400, + "scalingAdjustment": 1 + }, + { + "metricIntervalLowerBound": 400, + "scalingAdjustment": 5 + } + ] + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_applicationautoscaling.CfnScalingPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_applicationautoscaling.StepScalingAction", + "version": "0.0.0" + } + }, + "UpperAlarm": { + "id": "UpperAlarm", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/UpperAlarm", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/UpperAlarm/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::CloudWatch::Alarm", + "aws:cdk:cloudformation:props": { + "alarmActions": [ + { + "Ref": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperPolicyDCB40C8A" + } + ], + "alarmDescription": "Upper threshold scaling alarm", + "comparisonOperator": "GreaterThanOrEqualToThreshold", + "dimensions": [ + { + "name": "QueueName", + "value": { + "Fn::GetAtt": [ + "PublicQueueServiceEcsProcessingQueue84CD309D", + "QueueName" + ] + } + } + ], + "evaluationPeriods": 1, + "metricName": "ApproximateNumberOfMessagesVisible", + "namespace": "AWS/SQS", + "period": 300, + "statistic": "Maximum", + "threshold": 100 + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_applicationautoscaling.StepScalingPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_applicationautoscaling.ScalableTarget", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ecs.ScalableTaskCount", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ecs.FargateService", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ecs_patterns.QueueProcessingFargateService", + "version": "0.0.0" + } + }, + "EcsDefaultClusterMnL3mNNYNVPC": { + "id": "EcsDefaultClusterMnL3mNNYNVPC", + "path": "aws-ecs-patterns-queue-public/EcsDefaultClusterMnL3mNNYNVPC", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-patterns-queue-public/EcsDefaultClusterMnL3mNNYNVPC/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ECS::Cluster", + "aws:cdk:cloudformation:props": {} + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ecs.Cluster", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "aws-ecs-patterns-queue-public/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "aws-ecs-patterns-queue-public/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + }, + "publicQueueProcessingFargateServiceTest": { + "id": "publicQueueProcessingFargateServiceTest", + "path": "publicQueueProcessingFargateServiceTest", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "publicQueueProcessingFargateServiceTest/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "publicQueueProcessingFargateServiceTest/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "publicQueueProcessingFargateServiceTest/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "publicQueueProcessingFargateServiceTest/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "publicQueueProcessingFargateServiceTest/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", + "version": "0.0.0" + } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.ts new file mode 100644 index 0000000000000..db3436d4e3632 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.ts @@ -0,0 +1,24 @@ +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 { QueueProcessingFargateService } from 'aws-cdk-lib/aws-ecs-patterns'; + +const app = new App(); +const stack = new Stack(app, 'aws-ecs-patterns-queue-public'); +const vpc = new ec2.Vpc(stack, 'VPC', { restrictDefaultSecurityGroup: false }); + +new QueueProcessingFargateService(stack, 'PublicQueueService', { + vpc, + memoryLimitMiB: 512, + image: new ecs.AssetImage(path.join(__dirname, '..', 'sqs-reader')), + assignPublicIp: true, + cpuTargetUtilizationPercent: 90, +}); + +new integ.IntegTest(app, 'publicQueueProcessingFargateServiceTest', { + testCases: [stack], +}); + +app.synth(); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/asset.497b192764e66ae2955bba8dff8487b11aaaaf904414455868e2560e31f47211/Dockerfile b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/asset.497b192764e66ae2955bba8dff8487b11aaaaf904414455868e2560e31f47211/Dockerfile new file mode 100644 index 0000000000000..a57d7f921cd45 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/asset.497b192764e66ae2955bba8dff8487b11aaaaf904414455868e2560e31f47211/Dockerfile @@ -0,0 +1,10 @@ +FROM public.ecr.aws/lambda/python:3.6 + +RUN pip3 install boto3 + +ENV QUEUE_NAME $QUEUE_NAME + +WORKDIR /src +ADD . /src + +ENTRYPOINT ["python3", "index.py"] diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/asset.497b192764e66ae2955bba8dff8487b11aaaaf904414455868e2560e31f47211/index.py b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/asset.497b192764e66ae2955bba8dff8487b11aaaaf904414455868e2560e31f47211/index.py new file mode 100644 index 0000000000000..8b53f5149cb24 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/asset.497b192764e66ae2955bba8dff8487b11aaaaf904414455868e2560e31f47211/index.py @@ -0,0 +1,22 @@ +#!/usr/bin/python +import os +import boto3 + +QUEUE_NAME = os.environ.get('QUEUE_NAME') +print('QUEUE_NAME ' + QUEUE_NAME) + +if __name__ == '__main__': + client = boto3.client('sqs') + queue_url = client.get_queue_url(QueueName=QUEUE_NAME)['QueueUrl'] + print('queue_url ' + queue_url) + while True: + response = client.receive_message( + QueueUrl=queue_url, + WaitTimeSeconds=10, + ) + if response and 'Messages' in response: + for msg in response['Messages']: + print(msg['Body']) + entries = [{'Id': x['MessageId'], 'ReceiptHandle': x['ReceiptHandle']} for x in response['Messages']] + client.delete_message_batch(QueueUrl=queue_url, Entries=entries) + diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/aws-ecs-patterns-queue-public.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/aws-ecs-patterns-queue-public.assets.json new file mode 100644 index 0000000000000..047105d8db592 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/aws-ecs-patterns-queue-public.assets.json @@ -0,0 +1,32 @@ +{ + "version": "35.0.0", + "files": { + "de27e0196849f378a6db88b6e11fa6815affcc924c483173a0c4673bf725f76c": { + "source": { + "path": "aws-ecs-patterns-queue-public.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "de27e0196849f378a6db88b6e11fa6815affcc924c483173a0c4673bf725f76c.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": { + "497b192764e66ae2955bba8dff8487b11aaaaf904414455868e2560e31f47211": { + "source": { + "directory": "asset.497b192764e66ae2955bba8dff8487b11aaaaf904414455868e2560e31f47211" + }, + "destinations": { + "current_account-current_region": { + "repositoryName": "cdk-hnb659fds-container-assets-${AWS::AccountId}-${AWS::Region}", + "imageTag": "497b192764e66ae2955bba8dff8487b11aaaaf904414455868e2560e31f47211", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-image-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/aws-ecs-patterns-queue-public.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/aws-ecs-patterns-queue-public.template.json new file mode 100644 index 0000000000000..32dfaa117d64e --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/aws-ecs-patterns-queue-public.template.json @@ -0,0 +1,915 @@ +{ + "Resources": { + "VPCB9E5F0B4": { + "Type": "AWS::EC2::VPC", + "Properties": { + "CidrBlock": "10.0.0.0/16", + "EnableDnsHostnames": true, + "EnableDnsSupport": true, + "InstanceTenancy": "default", + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-patterns-queue-public/VPC" + } + ] + } + }, + "VPCPublicSubnet1SubnetB4246D30": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "AvailabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.0.0/18", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "VPCPublicSubnet1RouteTableFEE4B781": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "VPCPublicSubnet1RouteTableAssociation0B0896DC": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet1RouteTableFEE4B781" + }, + "SubnetId": { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + } + } + }, + "VPCPublicSubnet1DefaultRoute91CEF279": { + "Type": "AWS::EC2::Route", + "Properties": { + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VPCIGWB7E252D3" + }, + "RouteTableId": { + "Ref": "VPCPublicSubnet1RouteTableFEE4B781" + } + }, + "DependsOn": [ + "VPCVPCGW99B986DC" + ] + }, + "VPCPublicSubnet1EIP6AD938E8": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1" + } + ] + } + }, + "VPCPublicSubnet1NATGatewayE0556630": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VPCPublicSubnet1EIP6AD938E8", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1" + } + ] + }, + "DependsOn": [ + "VPCPublicSubnet1DefaultRoute91CEF279", + "VPCPublicSubnet1RouteTableAssociation0B0896DC" + ] + }, + "VPCPublicSubnet2Subnet74179F39": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "AvailabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.64.0/18", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "VPCPublicSubnet2RouteTable6F1A15F1": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "VPCPublicSubnet2RouteTableAssociation5A808732": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" + }, + "SubnetId": { + "Ref": "VPCPublicSubnet2Subnet74179F39" + } + } + }, + "VPCPublicSubnet2DefaultRouteB7481BBA": { + "Type": "AWS::EC2::Route", + "Properties": { + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VPCIGWB7E252D3" + }, + "RouteTableId": { + "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" + } + }, + "DependsOn": [ + "VPCVPCGW99B986DC" + ] + }, + "VPCPublicSubnet2EIP4947BC00": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2" + } + ] + } + }, + "VPCPublicSubnet2NATGateway3C070193": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VPCPublicSubnet2EIP4947BC00", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VPCPublicSubnet2Subnet74179F39" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2" + } + ] + }, + "DependsOn": [ + "VPCPublicSubnet2DefaultRouteB7481BBA", + "VPCPublicSubnet2RouteTableAssociation5A808732" + ] + }, + "VPCPrivateSubnet1Subnet8BCA10E0": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "AvailabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.128.0/18", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet1" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "VPCPrivateSubnet1RouteTableBE8A6027": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet1" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "VPCPrivateSubnet1RouteTableAssociation347902D1": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" + }, + "SubnetId": { + "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" + } + } + }, + "VPCPrivateSubnet1DefaultRouteAE1D6490": { + "Type": "AWS::EC2::Route", + "Properties": { + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VPCPublicSubnet1NATGatewayE0556630" + }, + "RouteTableId": { + "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" + } + } + }, + "VPCPrivateSubnet2SubnetCFCDAA7A": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "AvailabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.192.0/18", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet2" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "VPCPrivateSubnet2RouteTable0A19E10E": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet2" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "VPCPrivateSubnet2RouteTableAssociation0C73D413": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" + }, + "SubnetId": { + "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" + } + } + }, + "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { + "Type": "AWS::EC2::Route", + "Properties": { + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VPCPublicSubnet2NATGateway3C070193" + }, + "RouteTableId": { + "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" + } + } + }, + "VPCIGWB7E252D3": { + "Type": "AWS::EC2::InternetGateway", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-patterns-queue-public/VPC" + } + ] + } + }, + "VPCVPCGW99B986DC": { + "Type": "AWS::EC2::VPCGatewayAttachment", + "Properties": { + "InternetGatewayId": { + "Ref": "VPCIGWB7E252D3" + }, + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "PublicQueueServiceEcsProcessingDeadLetterQueueBC492277": { + "Type": "AWS::SQS::Queue", + "Properties": { + "MessageRetentionPeriod": 1209600 + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "PublicQueueServiceEcsProcessingQueue84CD309D": { + "Type": "AWS::SQS::Queue", + "Properties": { + "RedrivePolicy": { + "deadLetterTargetArn": { + "Fn::GetAtt": [ + "PublicQueueServiceEcsProcessingDeadLetterQueueBC492277", + "Arn" + ] + }, + "maxReceiveCount": 3 + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "ecs-tasks.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "PublicQueueServiceQueueProcessingTaskDefTaskRoleDefaultPolicy5417957C": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "sqs:ChangeMessageVisibility", + "sqs:DeleteMessage", + "sqs:GetQueueAttributes", + "sqs:GetQueueUrl", + "sqs:ReceiveMessage" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "PublicQueueServiceEcsProcessingQueue84CD309D", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "PublicQueueServiceQueueProcessingTaskDefTaskRoleDefaultPolicy5417957C", + "Roles": [ + { + "Ref": "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F" + } + ] + } + }, + "PublicQueueServiceQueueProcessingTaskDef858327F6": { + "Type": "AWS::ECS::TaskDefinition", + "Properties": { + "ContainerDefinitions": [ + { + "Environment": [ + { + "Name": "QUEUE_NAME", + "Value": { + "Fn::GetAtt": [ + "PublicQueueServiceEcsProcessingQueue84CD309D", + "QueueName" + ] + } + } + ], + "Essential": true, + "Image": { + "Fn::Sub": "${AWS::AccountId}.dkr.ecr.${AWS::Region}.${AWS::URLSuffix}/cdk-hnb659fds-container-assets-${AWS::AccountId}-${AWS::Region}:497b192764e66ae2955bba8dff8487b11aaaaf904414455868e2560e31f47211" + }, + "LogConfiguration": { + "LogDriver": "awslogs", + "Options": { + "awslogs-group": { + "Ref": "PublicQueueServiceQueueProcessingTaskDefQueueProcessingContainerLogGroupCFF67B64" + }, + "awslogs-stream-prefix": "PublicQueueService", + "awslogs-region": { + "Ref": "AWS::Region" + } + } + }, + "Name": "QueueProcessingContainer" + } + ], + "Cpu": "256", + "ExecutionRoleArn": { + "Fn::GetAtt": [ + "PublicQueueServiceQueueProcessingTaskDefExecutionRoleE22721BA", + "Arn" + ] + }, + "Family": "awsecspatternsqueuepublicPublicQueueServiceQueueProcessingTaskDefB3738118", + "Memory": "512", + "NetworkMode": "awsvpc", + "RequiresCompatibilities": [ + "FARGATE" + ], + "TaskRoleArn": { + "Fn::GetAtt": [ + "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F", + "Arn" + ] + } + } + }, + "PublicQueueServiceQueueProcessingTaskDefQueueProcessingContainerLogGroupCFF67B64": { + "Type": "AWS::Logs::LogGroup", + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain" + }, + "PublicQueueServiceQueueProcessingTaskDefExecutionRoleE22721BA": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "ecs-tasks.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "PublicQueueServiceQueueProcessingTaskDefExecutionRoleDefaultPolicyD7FF680F": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "ecr:BatchCheckLayerAvailability", + "ecr:BatchGetImage", + "ecr:GetDownloadUrlForLayer" + ], + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":ecr:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":repository/", + { + "Fn::Sub": "cdk-hnb659fds-container-assets-${AWS::AccountId}-${AWS::Region}" + } + ] + ] + } + }, + { + "Action": "ecr:GetAuthorizationToken", + "Effect": "Allow", + "Resource": "*" + }, + { + "Action": [ + "logs:CreateLogStream", + "logs:PutLogEvents" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "PublicQueueServiceQueueProcessingTaskDefQueueProcessingContainerLogGroupCFF67B64", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "PublicQueueServiceQueueProcessingTaskDefExecutionRoleDefaultPolicyD7FF680F", + "Roles": [ + { + "Ref": "PublicQueueServiceQueueProcessingTaskDefExecutionRoleE22721BA" + } + ] + } + }, + "PublicQueueServiceQueueProcessingFargateService7DE3D65B": { + "Type": "AWS::ECS::Service", + "Properties": { + "Cluster": { + "Ref": "EcsDefaultClusterMnL3mNNYNVPC9C1EC7A3" + }, + "DeploymentConfiguration": { + "Alarms": { + "AlarmNames": [], + "Enable": false, + "Rollback": false + }, + "MaximumPercent": 200, + "MinimumHealthyPercent": 50 + }, + "EnableECSManagedTags": false, + "LaunchType": "FARGATE", + "NetworkConfiguration": { + "AwsvpcConfiguration": { + "AssignPublicIp": "ENABLED", + "SecurityGroups": [ + { + "Fn::GetAtt": [ + "PublicQueueServiceQueueProcessingFargateServiceSecurityGroupFC07A65A", + "GroupId" + ] + } + ], + "Subnets": [ + { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + }, + { + "Ref": "VPCPublicSubnet2Subnet74179F39" + } + ] + } + }, + "TaskDefinition": { + "Ref": "PublicQueueServiceQueueProcessingTaskDef858327F6" + } + }, + "DependsOn": [ + "PublicQueueServiceQueueProcessingTaskDefTaskRoleDefaultPolicy5417957C", + "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F" + ] + }, + "PublicQueueServiceQueueProcessingFargateServiceSecurityGroupFC07A65A": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "GroupDescription": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/SecurityGroup", + "SecurityGroupEgress": [ + { + "CidrIp": "0.0.0.0/0", + "Description": "Allow all outbound traffic by default", + "IpProtocol": "-1" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + }, + "DependsOn": [ + "PublicQueueServiceQueueProcessingTaskDefTaskRoleDefaultPolicy5417957C", + "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F" + ] + }, + "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetE040C118": { + "Type": "AWS::ApplicationAutoScaling::ScalableTarget", + "Properties": { + "MaxCapacity": 2, + "MinCapacity": 1, + "ResourceId": { + "Fn::Join": [ + "", + [ + "service/", + { + "Ref": "EcsDefaultClusterMnL3mNNYNVPC9C1EC7A3" + }, + "/", + { + "Fn::GetAtt": [ + "PublicQueueServiceQueueProcessingFargateService7DE3D65B", + "Name" + ] + } + ] + ] + }, + "RoleARN": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/aws-service-role/ecs.application-autoscaling.amazonaws.com/AWSServiceRoleForApplicationAutoScaling_ECSService" + ] + ] + }, + "ScalableDimension": "ecs:service:DesiredCount", + "ServiceNamespace": "ecs" + }, + "DependsOn": [ + "PublicQueueServiceQueueProcessingTaskDefTaskRoleDefaultPolicy5417957C", + "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F" + ] + }, + "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerPolicyB2B27FF9": { + "Type": "AWS::ApplicationAutoScaling::ScalingPolicy", + "Properties": { + "PolicyName": "awsecspatternsqueuepublicPublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerPolicy2DB1A503", + "PolicyType": "StepScaling", + "ScalingTargetId": { + "Ref": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetE040C118" + }, + "StepScalingPolicyConfiguration": { + "AdjustmentType": "ChangeInCapacity", + "MetricAggregationType": "Maximum", + "StepAdjustments": [ + { + "MetricIntervalUpperBound": 0, + "ScalingAdjustment": -1 + } + ] + } + }, + "DependsOn": [ + "PublicQueueServiceQueueProcessingTaskDefTaskRoleDefaultPolicy5417957C", + "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F" + ] + }, + "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerAlarm5782C233": { + "Type": "AWS::CloudWatch::Alarm", + "Properties": { + "AlarmActions": [ + { + "Ref": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerPolicyB2B27FF9" + } + ], + "AlarmDescription": "Lower threshold scaling alarm", + "ComparisonOperator": "LessThanOrEqualToThreshold", + "Dimensions": [ + { + "Name": "QueueName", + "Value": { + "Fn::GetAtt": [ + "PublicQueueServiceEcsProcessingQueue84CD309D", + "QueueName" + ] + } + } + ], + "EvaluationPeriods": 1, + "MetricName": "ApproximateNumberOfMessagesVisible", + "Namespace": "AWS/SQS", + "Period": 300, + "Statistic": "Maximum", + "Threshold": 0 + }, + "DependsOn": [ + "PublicQueueServiceQueueProcessingTaskDefTaskRoleDefaultPolicy5417957C", + "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F" + ] + }, + "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperPolicyDCB40C8A": { + "Type": "AWS::ApplicationAutoScaling::ScalingPolicy", + "Properties": { + "PolicyName": "awsecspatternsqueuepublicPublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperPolicy89C3D196", + "PolicyType": "StepScaling", + "ScalingTargetId": { + "Ref": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetE040C118" + }, + "StepScalingPolicyConfiguration": { + "AdjustmentType": "ChangeInCapacity", + "MetricAggregationType": "Maximum", + "StepAdjustments": [ + { + "MetricIntervalLowerBound": 0, + "MetricIntervalUpperBound": 400, + "ScalingAdjustment": 1 + }, + { + "MetricIntervalLowerBound": 400, + "ScalingAdjustment": 5 + } + ] + } + }, + "DependsOn": [ + "PublicQueueServiceQueueProcessingTaskDefTaskRoleDefaultPolicy5417957C", + "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F" + ] + }, + "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperAlarm5D67333D": { + "Type": "AWS::CloudWatch::Alarm", + "Properties": { + "AlarmActions": [ + { + "Ref": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperPolicyDCB40C8A" + } + ], + "AlarmDescription": "Upper threshold scaling alarm", + "ComparisonOperator": "GreaterThanOrEqualToThreshold", + "Dimensions": [ + { + "Name": "QueueName", + "Value": { + "Fn::GetAtt": [ + "PublicQueueServiceEcsProcessingQueue84CD309D", + "QueueName" + ] + } + } + ], + "EvaluationPeriods": 1, + "MetricName": "ApproximateNumberOfMessagesVisible", + "Namespace": "AWS/SQS", + "Period": 300, + "Statistic": "Maximum", + "Threshold": 100 + }, + "DependsOn": [ + "PublicQueueServiceQueueProcessingTaskDefTaskRoleDefaultPolicy5417957C", + "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F" + ] + }, + "EcsDefaultClusterMnL3mNNYNVPC9C1EC7A3": { + "Type": "AWS::ECS::Cluster" + } + }, + "Outputs": { + "PublicQueueServiceSQSDeadLetterQueueBCE86DBC": { + "Value": { + "Fn::GetAtt": [ + "PublicQueueServiceEcsProcessingDeadLetterQueueBC492277", + "QueueName" + ] + } + }, + "PublicQueueServiceSQSDeadLetterQueueArn6E134EA4": { + "Value": { + "Fn::GetAtt": [ + "PublicQueueServiceEcsProcessingDeadLetterQueueBC492277", + "Arn" + ] + } + }, + "PublicQueueServiceSQSQueue4D3FBD5C": { + "Value": { + "Fn::GetAtt": [ + "PublicQueueServiceEcsProcessingQueue84CD309D", + "QueueName" + ] + } + }, + "PublicQueueServiceSQSQueueArn38014FDC": { + "Value": { + "Fn::GetAtt": [ + "PublicQueueServiceEcsProcessingQueue84CD309D", + "Arn" + ] + } + } + }, + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/cdk.out new file mode 100644 index 0000000000000..c5cb2e5de6344 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"35.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/integ.json new file mode 100644 index 0000000000000..574ac4affd690 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/integ.json @@ -0,0 +1,12 @@ +{ + "version": "35.0.0", + "testCases": { + "publicQueueProcessingFargateServiceTest/DefaultTest": { + "stacks": [ + "aws-ecs-patterns-queue-public" + ], + "assertionStack": "publicQueueProcessingFargateServiceTest/DefaultTest/DeployAssert", + "assertionStackName": "publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/manifest.json new file mode 100644 index 0000000000000..352ed12c0f352 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/manifest.json @@ -0,0 +1,365 @@ +{ + "version": "35.0.0", + "artifacts": { + "aws-ecs-patterns-queue-public.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "aws-ecs-patterns-queue-public.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "aws-ecs-patterns-queue-public": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "aws-ecs-patterns-queue-public.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/de27e0196849f378a6db88b6e11fa6815affcc924c483173a0c4673bf725f76c.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "aws-ecs-patterns-queue-public.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "aws-ecs-patterns-queue-public.assets" + ], + "metadata": { + "/aws-ecs-patterns-queue-public/VPC/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCB9E5F0B4" + } + ], + "/aws-ecs-patterns-queue-public/VPC/PublicSubnet1/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet1SubnetB4246D30" + } + ], + "/aws-ecs-patterns-queue-public/VPC/PublicSubnet1/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet1RouteTableFEE4B781" + } + ], + "/aws-ecs-patterns-queue-public/VPC/PublicSubnet1/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet1RouteTableAssociation0B0896DC" + } + ], + "/aws-ecs-patterns-queue-public/VPC/PublicSubnet1/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet1DefaultRoute91CEF279" + } + ], + "/aws-ecs-patterns-queue-public/VPC/PublicSubnet1/EIP": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet1EIP6AD938E8" + } + ], + "/aws-ecs-patterns-queue-public/VPC/PublicSubnet1/NATGateway": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet1NATGatewayE0556630" + } + ], + "/aws-ecs-patterns-queue-public/VPC/PublicSubnet2/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet2Subnet74179F39" + } + ], + "/aws-ecs-patterns-queue-public/VPC/PublicSubnet2/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet2RouteTable6F1A15F1" + } + ], + "/aws-ecs-patterns-queue-public/VPC/PublicSubnet2/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet2RouteTableAssociation5A808732" + } + ], + "/aws-ecs-patterns-queue-public/VPC/PublicSubnet2/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet2DefaultRouteB7481BBA" + } + ], + "/aws-ecs-patterns-queue-public/VPC/PublicSubnet2/EIP": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet2EIP4947BC00" + } + ], + "/aws-ecs-patterns-queue-public/VPC/PublicSubnet2/NATGateway": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet2NATGateway3C070193" + } + ], + "/aws-ecs-patterns-queue-public/VPC/PrivateSubnet1/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet1Subnet8BCA10E0" + } + ], + "/aws-ecs-patterns-queue-public/VPC/PrivateSubnet1/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet1RouteTableBE8A6027" + } + ], + "/aws-ecs-patterns-queue-public/VPC/PrivateSubnet1/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet1RouteTableAssociation347902D1" + } + ], + "/aws-ecs-patterns-queue-public/VPC/PrivateSubnet1/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet1DefaultRouteAE1D6490" + } + ], + "/aws-ecs-patterns-queue-public/VPC/PrivateSubnet2/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet2SubnetCFCDAA7A" + } + ], + "/aws-ecs-patterns-queue-public/VPC/PrivateSubnet2/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet2RouteTable0A19E10E" + } + ], + "/aws-ecs-patterns-queue-public/VPC/PrivateSubnet2/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet2RouteTableAssociation0C73D413" + } + ], + "/aws-ecs-patterns-queue-public/VPC/PrivateSubnet2/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet2DefaultRouteF4F5CFD2" + } + ], + "/aws-ecs-patterns-queue-public/VPC/IGW": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCIGWB7E252D3" + } + ], + "/aws-ecs-patterns-queue-public/VPC/VPCGW": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCVPCGW99B986DC" + } + ], + "/aws-ecs-patterns-queue-public/PublicQueueService/EcsProcessingDeadLetterQueue/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PublicQueueServiceEcsProcessingDeadLetterQueueBC492277" + } + ], + "/aws-ecs-patterns-queue-public/PublicQueueService/EcsProcessingQueue/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PublicQueueServiceEcsProcessingQueue84CD309D" + } + ], + "/aws-ecs-patterns-queue-public/PublicQueueService/SQSDeadLetterQueue": [ + { + "type": "aws:cdk:logicalId", + "data": "PublicQueueServiceSQSDeadLetterQueueBCE86DBC" + } + ], + "/aws-ecs-patterns-queue-public/PublicQueueService/SQSDeadLetterQueueArn": [ + { + "type": "aws:cdk:logicalId", + "data": "PublicQueueServiceSQSDeadLetterQueueArn6E134EA4" + } + ], + "/aws-ecs-patterns-queue-public/PublicQueueService/SQSQueue": [ + { + "type": "aws:cdk:logicalId", + "data": "PublicQueueServiceSQSQueue4D3FBD5C" + } + ], + "/aws-ecs-patterns-queue-public/PublicQueueService/SQSQueueArn": [ + { + "type": "aws:cdk:logicalId", + "data": "PublicQueueServiceSQSQueueArn38014FDC" + } + ], + "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/TaskRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F" + } + ], + "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/TaskRole/DefaultPolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PublicQueueServiceQueueProcessingTaskDefTaskRoleDefaultPolicy5417957C" + } + ], + "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PublicQueueServiceQueueProcessingTaskDef858327F6" + } + ], + "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/QueueProcessingContainer/LogGroup/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PublicQueueServiceQueueProcessingTaskDefQueueProcessingContainerLogGroupCFF67B64" + } + ], + "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/ExecutionRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PublicQueueServiceQueueProcessingTaskDefExecutionRoleE22721BA" + } + ], + "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/ExecutionRole/DefaultPolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PublicQueueServiceQueueProcessingTaskDefExecutionRoleDefaultPolicyD7FF680F" + } + ], + "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/Service": [ + { + "type": "aws:cdk:logicalId", + "data": "PublicQueueServiceQueueProcessingFargateService7DE3D65B" + } + ], + "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/SecurityGroup/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PublicQueueServiceQueueProcessingFargateServiceSecurityGroupFC07A65A" + } + ], + "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetE040C118" + } + ], + "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/LowerPolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerPolicyB2B27FF9" + } + ], + "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/LowerAlarm/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerAlarm5782C233" + } + ], + "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/UpperPolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperPolicyDCB40C8A" + } + ], + "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/UpperAlarm/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperAlarm5D67333D" + } + ], + "/aws-ecs-patterns-queue-public/EcsDefaultClusterMnL3mNNYNVPC/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsDefaultClusterMnL3mNNYNVPC9C1EC7A3" + } + ], + "/aws-ecs-patterns-queue-public/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/aws-ecs-patterns-queue-public/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "aws-ecs-patterns-queue-public" + }, + "publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.assets" + ], + "metadata": { + "/publicQueueProcessingFargateServiceTest/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/publicQueueProcessingFargateServiceTest/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "publicQueueProcessingFargateServiceTest/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.assets.json new file mode 100644 index 0000000000000..ee5b4c64f1c1d --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.assets.json @@ -0,0 +1,19 @@ +{ + "version": "35.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.template.json @@ -0,0 +1,36 @@ +{ + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/tree.json new file mode 100644 index 0000000000000..dc3d2ec10ed69 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/tree.json @@ -0,0 +1,1574 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "aws-ecs-patterns-queue-public": { + "id": "aws-ecs-patterns-queue-public", + "path": "aws-ecs-patterns-queue-public", + "children": { + "VPC": { + "id": "VPC", + "path": "aws-ecs-patterns-queue-public/VPC", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-patterns-queue-public/VPC/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::VPC", + "aws:cdk:cloudformation:props": { + "cidrBlock": "10.0.0.0/16", + "enableDnsHostnames": true, + "enableDnsSupport": true, + "instanceTenancy": "default", + "tags": [ + { + "key": "Name", + "value": "aws-ecs-patterns-queue-public/VPC" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", + "version": "0.0.0" + } + }, + "PublicSubnet1": { + "id": "PublicSubnet1", + "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1", + "children": { + "Subnet": { + "id": "Subnet", + "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "availabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.0.0/18", + "mapPublicIpOnLaunch": true, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Public" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Public" + }, + { + "key": "Name", + "value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1" + } + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1/Acl", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1" + } + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VPCPublicSubnet1RouteTableFEE4B781" + }, + "subnetId": { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "destinationCidrBlock": "0.0.0.0/0", + "gatewayId": { + "Ref": "VPCIGWB7E252D3" + }, + "routeTableId": { + "Ref": "VPCPublicSubnet1RouteTableFEE4B781" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" + } + }, + "EIP": { + "id": "EIP", + "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1/EIP", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::EIP", + "aws:cdk:cloudformation:props": { + "domain": "vpc", + "tags": [ + { + "key": "Name", + "value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" + } + }, + "NATGateway": { + "id": "NATGateway", + "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1/NATGateway", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::NatGateway", + "aws:cdk:cloudformation:props": { + "allocationId": { + "Fn::GetAtt": [ + "VPCPublicSubnet1EIP6AD938E8", + "AllocationId" + ] + }, + "subnetId": { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + }, + "tags": [ + { + "key": "Name", + "value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" + } + }, + "PublicSubnet2": { + "id": "PublicSubnet2", + "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2", + "children": { + "Subnet": { + "id": "Subnet", + "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "availabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.64.0/18", + "mapPublicIpOnLaunch": true, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Public" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Public" + }, + { + "key": "Name", + "value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2" + } + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2/Acl", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2" + } + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" + }, + "subnetId": { + "Ref": "VPCPublicSubnet2Subnet74179F39" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "destinationCidrBlock": "0.0.0.0/0", + "gatewayId": { + "Ref": "VPCIGWB7E252D3" + }, + "routeTableId": { + "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" + } + }, + "EIP": { + "id": "EIP", + "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2/EIP", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::EIP", + "aws:cdk:cloudformation:props": { + "domain": "vpc", + "tags": [ + { + "key": "Name", + "value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" + } + }, + "NATGateway": { + "id": "NATGateway", + "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2/NATGateway", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::NatGateway", + "aws:cdk:cloudformation:props": { + "allocationId": { + "Fn::GetAtt": [ + "VPCPublicSubnet2EIP4947BC00", + "AllocationId" + ] + }, + "subnetId": { + "Ref": "VPCPublicSubnet2Subnet74179F39" + }, + "tags": [ + { + "key": "Name", + "value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" + } + }, + "PrivateSubnet1": { + "id": "PrivateSubnet1", + "path": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet1", + "children": { + "Subnet": { + "id": "Subnet", + "path": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet1/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "availabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.128.0/18", + "mapPublicIpOnLaunch": false, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Private" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Private" + }, + { + "key": "Name", + "value": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet1" + } + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet1/Acl", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet1/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet1" + } + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet1/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" + }, + "subnetId": { + "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet1/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "destinationCidrBlock": "0.0.0.0/0", + "natGatewayId": { + "Ref": "VPCPublicSubnet1NATGatewayE0556630" + }, + "routeTableId": { + "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" + } + }, + "PrivateSubnet2": { + "id": "PrivateSubnet2", + "path": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet2", + "children": { + "Subnet": { + "id": "Subnet", + "path": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet2/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "availabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.192.0/18", + "mapPublicIpOnLaunch": false, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Private" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Private" + }, + { + "key": "Name", + "value": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet2" + } + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet2/Acl", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet2/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet2" + } + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet2/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" + }, + "subnetId": { + "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet2/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "destinationCidrBlock": "0.0.0.0/0", + "natGatewayId": { + "Ref": "VPCPublicSubnet2NATGateway3C070193" + }, + "routeTableId": { + "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" + } + }, + "IGW": { + "id": "IGW", + "path": "aws-ecs-patterns-queue-public/VPC/IGW", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::InternetGateway", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "aws-ecs-patterns-queue-public/VPC" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", + "version": "0.0.0" + } + }, + "VPCGW": { + "id": "VPCGW", + "path": "aws-ecs-patterns-queue-public/VPC/VPCGW", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::VPCGatewayAttachment", + "aws:cdk:cloudformation:props": { + "internetGatewayId": { + "Ref": "VPCIGWB7E252D3" + }, + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.Vpc", + "version": "0.0.0" + } + }, + "PublicQueueService": { + "id": "PublicQueueService", + "path": "aws-ecs-patterns-queue-public/PublicQueueService", + "children": { + "EcsProcessingDeadLetterQueue": { + "id": "EcsProcessingDeadLetterQueue", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/EcsProcessingDeadLetterQueue", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/EcsProcessingDeadLetterQueue/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SQS::Queue", + "aws:cdk:cloudformation:props": { + "messageRetentionPeriod": 1209600 + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sqs.Queue", + "version": "0.0.0" + } + }, + "EcsProcessingQueue": { + "id": "EcsProcessingQueue", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/EcsProcessingQueue", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/EcsProcessingQueue/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SQS::Queue", + "aws:cdk:cloudformation:props": { + "redrivePolicy": { + "deadLetterTargetArn": { + "Fn::GetAtt": [ + "PublicQueueServiceEcsProcessingDeadLetterQueueBC492277", + "Arn" + ] + }, + "maxReceiveCount": 3 + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sqs.Queue", + "version": "0.0.0" + } + }, + "SQSDeadLetterQueue": { + "id": "SQSDeadLetterQueue", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/SQSDeadLetterQueue", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnOutput", + "version": "0.0.0" + } + }, + "SQSDeadLetterQueueArn": { + "id": "SQSDeadLetterQueueArn", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/SQSDeadLetterQueueArn", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnOutput", + "version": "0.0.0" + } + }, + "SQSQueue": { + "id": "SQSQueue", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/SQSQueue", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnOutput", + "version": "0.0.0" + } + }, + "SQSQueueArn": { + "id": "SQSQueueArn", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/SQSQueueArn", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnOutput", + "version": "0.0.0" + } + }, + "QueueProcessingTaskDef": { + "id": "QueueProcessingTaskDef", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef", + "children": { + "TaskRole": { + "id": "TaskRole", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/TaskRole", + "children": { + "ImportTaskRole": { + "id": "ImportTaskRole", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/TaskRole/ImportTaskRole", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/TaskRole/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "ecs-tasks.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" + } + }, + "DefaultPolicy": { + "id": "DefaultPolicy", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/TaskRole/DefaultPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/TaskRole/DefaultPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "sqs:ChangeMessageVisibility", + "sqs:DeleteMessage", + "sqs:GetQueueAttributes", + "sqs:GetQueueUrl", + "sqs:ReceiveMessage" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "PublicQueueServiceEcsProcessingQueue84CD309D", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "PublicQueueServiceQueueProcessingTaskDefTaskRoleDefaultPolicy5417957C", + "roles": [ + { + "Ref": "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ECS::TaskDefinition", + "aws:cdk:cloudformation:props": { + "containerDefinitions": [ + { + "essential": true, + "image": { + "Fn::Sub": "${AWS::AccountId}.dkr.ecr.${AWS::Region}.${AWS::URLSuffix}/cdk-hnb659fds-container-assets-${AWS::AccountId}-${AWS::Region}:497b192764e66ae2955bba8dff8487b11aaaaf904414455868e2560e31f47211" + }, + "name": "QueueProcessingContainer", + "logConfiguration": { + "logDriver": "awslogs", + "options": { + "awslogs-group": { + "Ref": "PublicQueueServiceQueueProcessingTaskDefQueueProcessingContainerLogGroupCFF67B64" + }, + "awslogs-stream-prefix": "PublicQueueService", + "awslogs-region": { + "Ref": "AWS::Region" + } + } + }, + "environment": [ + { + "name": "QUEUE_NAME", + "value": { + "Fn::GetAtt": [ + "PublicQueueServiceEcsProcessingQueue84CD309D", + "QueueName" + ] + } + } + ] + } + ], + "cpu": "256", + "executionRoleArn": { + "Fn::GetAtt": [ + "PublicQueueServiceQueueProcessingTaskDefExecutionRoleE22721BA", + "Arn" + ] + }, + "family": "awsecspatternsqueuepublicPublicQueueServiceQueueProcessingTaskDefB3738118", + "memory": "512", + "networkMode": "awsvpc", + "requiresCompatibilities": [ + "FARGATE" + ], + "taskRoleArn": { + "Fn::GetAtt": [ + "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F", + "Arn" + ] + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", + "version": "0.0.0" + } + }, + "QueueProcessingContainer": { + "id": "QueueProcessingContainer", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/QueueProcessingContainer", + "children": { + "AssetImage": { + "id": "AssetImage", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/QueueProcessingContainer/AssetImage", + "children": { + "Staging": { + "id": "Staging", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/QueueProcessingContainer/AssetImage/Staging", + "constructInfo": { + "fqn": "aws-cdk-lib.AssetStaging", + "version": "0.0.0" + } + }, + "Repository": { + "id": "Repository", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/QueueProcessingContainer/AssetImage/Repository", + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ecr.RepositoryBase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ecr_assets.DockerImageAsset", + "version": "0.0.0" + } + }, + "LogGroup": { + "id": "LogGroup", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/QueueProcessingContainer/LogGroup", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/QueueProcessingContainer/LogGroup/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Logs::LogGroup", + "aws:cdk:cloudformation:props": {} + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_logs.LogGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", + "version": "0.0.0" + } + }, + "ExecutionRole": { + "id": "ExecutionRole", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/ExecutionRole", + "children": { + "ImportExecutionRole": { + "id": "ImportExecutionRole", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/ExecutionRole/ImportExecutionRole", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/ExecutionRole/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "ecs-tasks.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" + } + }, + "DefaultPolicy": { + "id": "DefaultPolicy", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/ExecutionRole/DefaultPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/ExecutionRole/DefaultPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecr:BatchCheckLayerAvailability", + "ecr:BatchGetImage", + "ecr:GetDownloadUrlForLayer" + ], + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":ecr:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":repository/", + { + "Fn::Sub": "cdk-hnb659fds-container-assets-${AWS::AccountId}-${AWS::Region}" + } + ] + ] + } + }, + { + "Action": "ecr:GetAuthorizationToken", + "Effect": "Allow", + "Resource": "*" + }, + { + "Action": [ + "logs:CreateLogStream", + "logs:PutLogEvents" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "PublicQueueServiceQueueProcessingTaskDefQueueProcessingContainerLogGroupCFF67B64", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "PublicQueueServiceQueueProcessingTaskDefExecutionRoleDefaultPolicyD7FF680F", + "roles": [ + { + "Ref": "PublicQueueServiceQueueProcessingTaskDefExecutionRoleE22721BA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ecs.FargateTaskDefinition", + "version": "0.0.0" + } + }, + "QueueProcessingFargateService": { + "id": "QueueProcessingFargateService", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService", + "children": { + "Service": { + "id": "Service", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/Service", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ECS::Service", + "aws:cdk:cloudformation:props": { + "cluster": { + "Ref": "EcsDefaultClusterMnL3mNNYNVPC9C1EC7A3" + }, + "deploymentConfiguration": { + "maximumPercent": 200, + "minimumHealthyPercent": 50, + "alarms": { + "alarmNames": [], + "enable": false, + "rollback": false + } + }, + "enableEcsManagedTags": false, + "launchType": "FARGATE", + "networkConfiguration": { + "awsvpcConfiguration": { + "assignPublicIp": "ENABLED", + "subnets": [ + { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + }, + { + "Ref": "VPCPublicSubnet2Subnet74179F39" + } + ], + "securityGroups": [ + { + "Fn::GetAtt": [ + "PublicQueueServiceQueueProcessingFargateServiceSecurityGroupFC07A65A", + "GroupId" + ] + } + ] + } + }, + "taskDefinition": { + "Ref": "PublicQueueServiceQueueProcessingTaskDef858327F6" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ecs.CfnService", + "version": "0.0.0" + } + }, + "SecurityGroup": { + "id": "SecurityGroup", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/SecurityGroup", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/SecurityGroup/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SecurityGroup", + "aws:cdk:cloudformation:props": { + "groupDescription": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/SecurityGroup", + "securityGroupEgress": [ + { + "cidrIp": "0.0.0.0/0", + "description": "Allow all outbound traffic by default", + "ipProtocol": "-1" + } + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", + "version": "0.0.0" + } + }, + "ScalingRole": { + "id": "ScalingRole", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/ScalingRole", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "TaskCount": { + "id": "TaskCount", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount", + "children": { + "Target": { + "id": "Target", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ApplicationAutoScaling::ScalableTarget", + "aws:cdk:cloudformation:props": { + "maxCapacity": 2, + "minCapacity": 1, + "resourceId": { + "Fn::Join": [ + "", + [ + "service/", + { + "Ref": "EcsDefaultClusterMnL3mNNYNVPC9C1EC7A3" + }, + "/", + { + "Fn::GetAtt": [ + "PublicQueueServiceQueueProcessingFargateService7DE3D65B", + "Name" + ] + } + ] + ] + }, + "roleArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/aws-service-role/ecs.application-autoscaling.amazonaws.com/AWSServiceRoleForApplicationAutoScaling_ECSService" + ] + ] + }, + "scalableDimension": "ecs:service:DesiredCount", + "serviceNamespace": "ecs" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_applicationautoscaling.CfnScalableTarget", + "version": "0.0.0" + } + }, + "QueueMessagesVisibleScaling": { + "id": "QueueMessagesVisibleScaling", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling", + "children": { + "LowerPolicy": { + "id": "LowerPolicy", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/LowerPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/LowerPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ApplicationAutoScaling::ScalingPolicy", + "aws:cdk:cloudformation:props": { + "policyName": "awsecspatternsqueuepublicPublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerPolicy2DB1A503", + "policyType": "StepScaling", + "scalingTargetId": { + "Ref": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetE040C118" + }, + "stepScalingPolicyConfiguration": { + "adjustmentType": "ChangeInCapacity", + "metricAggregationType": "Maximum", + "stepAdjustments": [ + { + "metricIntervalUpperBound": 0, + "scalingAdjustment": -1 + } + ] + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_applicationautoscaling.CfnScalingPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_applicationautoscaling.StepScalingAction", + "version": "0.0.0" + } + }, + "LowerAlarm": { + "id": "LowerAlarm", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/LowerAlarm", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/LowerAlarm/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::CloudWatch::Alarm", + "aws:cdk:cloudformation:props": { + "alarmActions": [ + { + "Ref": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerPolicyB2B27FF9" + } + ], + "alarmDescription": "Lower threshold scaling alarm", + "comparisonOperator": "LessThanOrEqualToThreshold", + "dimensions": [ + { + "name": "QueueName", + "value": { + "Fn::GetAtt": [ + "PublicQueueServiceEcsProcessingQueue84CD309D", + "QueueName" + ] + } + } + ], + "evaluationPeriods": 1, + "metricName": "ApproximateNumberOfMessagesVisible", + "namespace": "AWS/SQS", + "period": 300, + "statistic": "Maximum", + "threshold": 0 + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", + "version": "0.0.0" + } + }, + "UpperPolicy": { + "id": "UpperPolicy", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/UpperPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/UpperPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ApplicationAutoScaling::ScalingPolicy", + "aws:cdk:cloudformation:props": { + "policyName": "awsecspatternsqueuepublicPublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperPolicy89C3D196", + "policyType": "StepScaling", + "scalingTargetId": { + "Ref": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetE040C118" + }, + "stepScalingPolicyConfiguration": { + "adjustmentType": "ChangeInCapacity", + "metricAggregationType": "Maximum", + "stepAdjustments": [ + { + "metricIntervalLowerBound": 0, + "metricIntervalUpperBound": 400, + "scalingAdjustment": 1 + }, + { + "metricIntervalLowerBound": 400, + "scalingAdjustment": 5 + } + ] + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_applicationautoscaling.CfnScalingPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_applicationautoscaling.StepScalingAction", + "version": "0.0.0" + } + }, + "UpperAlarm": { + "id": "UpperAlarm", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/UpperAlarm", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/UpperAlarm/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::CloudWatch::Alarm", + "aws:cdk:cloudformation:props": { + "alarmActions": [ + { + "Ref": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperPolicyDCB40C8A" + } + ], + "alarmDescription": "Upper threshold scaling alarm", + "comparisonOperator": "GreaterThanOrEqualToThreshold", + "dimensions": [ + { + "name": "QueueName", + "value": { + "Fn::GetAtt": [ + "PublicQueueServiceEcsProcessingQueue84CD309D", + "QueueName" + ] + } + } + ], + "evaluationPeriods": 1, + "metricName": "ApproximateNumberOfMessagesVisible", + "namespace": "AWS/SQS", + "period": 300, + "statistic": "Maximum", + "threshold": 100 + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_applicationautoscaling.StepScalingPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_applicationautoscaling.ScalableTarget", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ecs.ScalableTaskCount", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ecs.FargateService", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ecs_patterns.QueueProcessingFargateService", + "version": "0.0.0" + } + }, + "EcsDefaultClusterMnL3mNNYNVPC": { + "id": "EcsDefaultClusterMnL3mNNYNVPC", + "path": "aws-ecs-patterns-queue-public/EcsDefaultClusterMnL3mNNYNVPC", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-patterns-queue-public/EcsDefaultClusterMnL3mNNYNVPC/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ECS::Cluster", + "aws:cdk:cloudformation:props": {} + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ecs.Cluster", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "aws-ecs-patterns-queue-public/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "aws-ecs-patterns-queue-public/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + }, + "publicQueueProcessingFargateServiceTest": { + "id": "publicQueueProcessingFargateServiceTest", + "path": "publicQueueProcessingFargateServiceTest", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "publicQueueProcessingFargateServiceTest/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "publicQueueProcessingFargateServiceTest/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "publicQueueProcessingFargateServiceTest/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "publicQueueProcessingFargateServiceTest/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "publicQueueProcessingFargateServiceTest/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", + "version": "0.0.0" + } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.ts new file mode 100644 index 0000000000000..babf0a4a2cbb8 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.ts @@ -0,0 +1,24 @@ +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 { QueueProcessingFargateService } from 'aws-cdk-lib/aws-ecs-patterns'; + +const app = new App(); +const stack = new Stack(app, 'aws-ecs-patterns-queue-public'); +const vpc = new ec2.Vpc(stack, 'VPC', { restrictDefaultSecurityGroup: false }); + +new QueueProcessingFargateService(stack, 'PublicQueueService', { + vpc, + memoryLimitMiB: 512, + image: new ecs.AssetImage(path.join(__dirname, '..', 'sqs-reader')), + assignPublicIp: true, + disableCpuBasedScaling: true, +}); + +new integ.IntegTest(app, 'publicQueueProcessingFargateServiceTest', { + testCases: [stack], +}); + +app.synth(); diff --git a/packages/aws-cdk-lib/aws-ecs-patterns/lib/base/queue-processing-service-base.ts b/packages/aws-cdk-lib/aws-ecs-patterns/lib/base/queue-processing-service-base.ts index 96919446335b3..67bf8ab6ff951 100644 --- a/packages/aws-cdk-lib/aws-ecs-patterns/lib/base/queue-processing-service-base.ts +++ b/packages/aws-cdk-lib/aws-ecs-patterns/lib/base/queue-processing-service-base.ts @@ -227,14 +227,14 @@ export interface QueueProcessingServiceBaseProps { * * @default - false */ - readonly disableCpuBasedScaling?: boolean + readonly disableCpuBasedScaling?: boolean; /** * The target CPU utilization percentage for CPU based scaling strategy when enabled. * * @default - 50 */ - readonly targetUtilizationPercent?: number + readonly cpuTargetUtilizationPercent?: number; } /** @@ -298,13 +298,13 @@ export abstract class QueueProcessingServiceBase extends Construct { * * @default - false */ - public readonly disableCpuBasedScaling: boolean = false + public readonly disableCpuBasedScaling?: boolean; /** * The target CPU utilization percentage for CPU based scaling strategy when enabled. * * @default - 50 */ - public readonly targetUtilizationPercent: number = 50 + public readonly cpuTargetUtilizationPercent?: number; /** * Constructs a new instance of the QueueProcessingServiceBase class. @@ -352,7 +352,7 @@ export abstract class QueueProcessingServiceBase extends Construct { this.environment = { ...(props.environment || {}), QUEUE_NAME: this.sqsQueue.queueName }; this.secrets = props.secrets; this.disableCpuBasedScaling = props.disableCpuBasedScaling ?? false; - this.targetUtilizationPercent = props.targetUtilizationPercent ?? 50; + this.cpuTargetUtilizationPercent = props.cpuTargetUtilizationPercent ?? 50; this.desiredCount = props.desiredTaskCount ?? 1; @@ -388,7 +388,7 @@ export abstract class QueueProcessingServiceBase extends Construct { if (!this.disableCpuBasedScaling) { scalingTarget.scaleOnCpuUtilization('CpuScaling', { - targetUtilizationPercent: this.targetUtilizationPercent, + targetUtilizationPercent: this.cpuTargetUtilizationPercent ?? 50, }); } scalingTarget.scaleOnMetric('QueueMessagesVisibleScaling', { diff --git a/packages/aws-cdk-lib/aws-ecs-patterns/test/fargate/queue-processing-fargate-service.test.ts b/packages/aws-cdk-lib/aws-ecs-patterns/test/fargate/queue-processing-fargate-service.test.ts index 3e4ebf5acca30..bb8ca7c3890d9 100644 --- a/packages/aws-cdk-lib/aws-ecs-patterns/test/fargate/queue-processing-fargate-service.test.ts +++ b/packages/aws-cdk-lib/aws-ecs-patterns/test/fargate/queue-processing-fargate-service.test.ts @@ -487,7 +487,7 @@ testDeprecated('test Fargate queue worker service construct - with optional prop }); }); -testDeprecated('test Fargate queue worker service construct - with cpu scaling strategy disabled', () => { +test('test Fargate queue worker service construct - with cpu scaling strategy disabled', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'VPC'); @@ -577,6 +577,113 @@ testDeprecated('test Fargate queue worker service construct - with cpu scaling s ], Family: 'fargate-task-family', }); + + // THEN - No CPU target tracking policy is created + Template.fromStack(stack).resourcePropertiesCountIs('AWS::ApplicationAutoScaling::ScalingPolicy', { + PolicyType: 'TargetTrackingScaling', + }, 0); +}); + +testDeprecated('test Fargate queue worker service construct - with custom cpu scaling target', () => { + // GIVEN + const stack = new cdk.Stack(); + const vpc = new ec2.Vpc(stack, 'VPC'); + const cluster = new ecs.Cluster(stack, 'Cluster', { vpc }); + cluster.addAsgCapacityProvider(new AsgCapacityProvider(stack, 'DefaultAutoScalingGroupProvider', { + autoScalingGroup: new AutoScalingGroup(stack, 'DefaultAutoScalingGroup', { + vpc, + instanceType: new ec2.InstanceType('t2.micro'), + machineImage: MachineImage.latestAmazonLinux(), + }), + })); + const queue = new sqs.Queue(stack, 'fargate-test-queue', { + queueName: 'fargate-test-sqs-queue', + }); + + // WHEN + new ecsPatterns.QueueProcessingFargateService(stack, 'Service', { + cluster, + memoryLimitMiB: 512, + image: ecs.ContainerImage.fromRegistry('test'), + command: ['-c', '4', 'amazon.com'], + enableLogging: false, + environment: { + TEST_ENVIRONMENT_VARIABLE1: 'test environment variable 1 value', + TEST_ENVIRONMENT_VARIABLE2: 'test environment variable 2 value', + }, + queue, + maxScalingCapacity: 5, + minHealthyPercent: 60, + maxHealthyPercent: 150, + serviceName: 'fargate-test-service', + family: 'fargate-task-family', + platformVersion: ecs.FargatePlatformVersion.VERSION1_4, + circuitBreaker: { rollback: true }, + cpuTargetUtilizationPercent: 80, + }); + + // THEN - QueueWorker is of FARGATE launch type, an SQS queue is created and all optional properties are set. + Template.fromStack(stack).hasResourceProperties('AWS::ECS::Service', { + DeploymentConfiguration: { + MinimumHealthyPercent: 60, + MaximumPercent: 150, + DeploymentCircuitBreaker: { + Enable: true, + Rollback: true, + }, + }, + LaunchType: 'FARGATE', + ServiceName: 'fargate-test-service', + PlatformVersion: ecs.FargatePlatformVersion.VERSION1_4, + DeploymentController: { + Type: 'ECS', + }, + }); + + Template.fromStack(stack).hasResourceProperties('AWS::SQS::Queue', { QueueName: 'fargate-test-sqs-queue' }); + + Template.fromStack(stack).hasResourceProperties('AWS::ECS::TaskDefinition', { + ContainerDefinitions: [ + Match.objectLike({ + Command: [ + '-c', + '4', + 'amazon.com', + ], + Environment: [ + { + Name: 'TEST_ENVIRONMENT_VARIABLE1', + Value: 'test environment variable 1 value', + }, + { + Name: 'TEST_ENVIRONMENT_VARIABLE2', + Value: 'test environment variable 2 value', + }, + { + Name: 'QUEUE_NAME', + Value: { + 'Fn::GetAtt': [ + 'fargatetestqueue28B43841', + 'QueueName', + ], + }, + }, + ], + Image: 'test', + }), + ], + Family: 'fargate-task-family', + }); + + // THEN - CPU target tracking policy is created + Template.fromStack(stack).resourcePropertiesCountIs('AWS::ApplicationAutoScaling::ScalingPolicy', { + PolicyType: 'TargetTrackingScaling', + }, 1); + + // AND - CPU target utilization set + Template.fromStack(stack).resourcePropertiesCountIs('AWS::ApplicationAutoScaling::ScalingPolicy', { + PolicyType: 'TargetTrackingScaling', + }, 1); }); test('can set custom containerName', () => { From 2606c1917ab24390866fe9959da6af3c07e84142 Mon Sep 17 00:00:00 2001 From: Anurag Mohapatra Date: Fri, 15 Dec 2023 22:18:46 +0000 Subject: [PATCH 03/14] Fix integration testing --- .../Dockerfile | 2 +- .../index.py | 0 ...erns-queue-custom-cpu-scaling.assets.json} | 12 +- ...ns-queue-custom-cpu-scaling.template.json} | 164 +++++------ ...faultTestDeployAssert7FDCD114.assets.json} | 2 +- ...ultTestDeployAssert7FDCD114.template.json} | 0 .../integ.json | 8 +- .../manifest.json | 166 +++++------ .../tree.json | 274 +++++++++--------- ...sing-fargate-service-custom-cpu-scaling.ts | 6 +- .../Dockerfile | 2 +- .../index.py | 0 ...patterns-queue-no-cpu-scaling.assets.json} | 12 +- ...tterns-queue-no-cpu-scaling.template.json} | 154 +++++----- .../integ.json | 8 +- .../manifest.json | 162 +++++------ ...faultTestDeployAssertE4E4F855.assets.json} | 2 +- ...ultTestDeployAssertE4E4F855.template.json} | 0 .../tree.json | 266 ++++++++--------- ...ocessing-fargate-service-no-cpu-scaling.ts | 6 +- .../aws-cdk-lib/aws-ecs-patterns/README.md | 23 +- 21 files changed, 645 insertions(+), 624 deletions(-) rename packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/{asset.497b192764e66ae2955bba8dff8487b11aaaaf904414455868e2560e31f47211 => asset.8be39d348c20f7e58a373abbd1152069e18da130e51bf52c89bd82a38d0e51d7}/Dockerfile (76%) rename packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/{asset.497b192764e66ae2955bba8dff8487b11aaaaf904414455868e2560e31f47211 => asset.8be39d348c20f7e58a373abbd1152069e18da130e51bf52c89bd82a38d0e51d7}/index.py (100%) rename packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/{aws-ecs-patterns-queue-public.assets.json => aws-ecs-patterns-queue-custom-cpu-scaling.assets.json} (61%) rename packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/{aws-ecs-patterns-queue-public.template.json => aws-ecs-patterns-queue-custom-cpu-scaling.template.json} (69%) rename packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/{publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.assets.json => customCpuScalingQueueProcessingFargateServiceTestDefaultTestDeployAssert7FDCD114.assets.json} (84%) rename packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/{publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.template.json => customCpuScalingQueueProcessingFargateServiceTestDefaultTestDeployAssert7FDCD114.template.json} (100%) rename packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/{asset.497b192764e66ae2955bba8dff8487b11aaaaf904414455868e2560e31f47211 => asset.8be39d348c20f7e58a373abbd1152069e18da130e51bf52c89bd82a38d0e51d7}/Dockerfile (76%) rename packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/{asset.497b192764e66ae2955bba8dff8487b11aaaaf904414455868e2560e31f47211 => asset.8be39d348c20f7e58a373abbd1152069e18da130e51bf52c89bd82a38d0e51d7}/index.py (100%) rename packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/{aws-ecs-patterns-queue-public.assets.json => aws-ecs-patterns-queue-no-cpu-scaling.assets.json} (61%) rename packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/{aws-ecs-patterns-queue-public.template.json => aws-ecs-patterns-queue-no-cpu-scaling.template.json} (71%) rename packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/{publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.assets.json => noCpuScalingQueueProcessingFargateServiceTestDefaultTestDeployAssertE4E4F855.assets.json} (84%) rename packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/{publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.template.json => noCpuScalingQueueProcessingFargateServiceTestDefaultTestDeployAssertE4E4F855.template.json} (100%) diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/asset.497b192764e66ae2955bba8dff8487b11aaaaf904414455868e2560e31f47211/Dockerfile b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/asset.8be39d348c20f7e58a373abbd1152069e18da130e51bf52c89bd82a38d0e51d7/Dockerfile similarity index 76% rename from packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/asset.497b192764e66ae2955bba8dff8487b11aaaaf904414455868e2560e31f47211/Dockerfile rename to packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/asset.8be39d348c20f7e58a373abbd1152069e18da130e51bf52c89bd82a38d0e51d7/Dockerfile index a57d7f921cd45..cb97d79b264ce 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/asset.497b192764e66ae2955bba8dff8487b11aaaaf904414455868e2560e31f47211/Dockerfile +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/asset.8be39d348c20f7e58a373abbd1152069e18da130e51bf52c89bd82a38d0e51d7/Dockerfile @@ -7,4 +7,4 @@ ENV QUEUE_NAME $QUEUE_NAME WORKDIR /src ADD . /src -ENTRYPOINT ["python3", "index.py"] +ENTRYPOINT ["python3","index.py"] diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/asset.497b192764e66ae2955bba8dff8487b11aaaaf904414455868e2560e31f47211/index.py b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/asset.8be39d348c20f7e58a373abbd1152069e18da130e51bf52c89bd82a38d0e51d7/index.py similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/asset.497b192764e66ae2955bba8dff8487b11aaaaf904414455868e2560e31f47211/index.py rename to packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/asset.8be39d348c20f7e58a373abbd1152069e18da130e51bf52c89bd82a38d0e51d7/index.py diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/aws-ecs-patterns-queue-public.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/aws-ecs-patterns-queue-custom-cpu-scaling.assets.json similarity index 61% rename from packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/aws-ecs-patterns-queue-public.assets.json rename to packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/aws-ecs-patterns-queue-custom-cpu-scaling.assets.json index 65191079254f6..f8769a0d663b0 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/aws-ecs-patterns-queue-public.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/aws-ecs-patterns-queue-custom-cpu-scaling.assets.json @@ -1,29 +1,29 @@ { "version": "35.0.0", "files": { - "bfbdcf74eec6aa8e8536b34e3725e087fcb3ef3ec8f3269bbd284c06f7f455b6": { + "ad92d86b073f46ad1972fdd95afc6e295fcae2d8e486324ce74b33d75836f10c": { "source": { - "path": "aws-ecs-patterns-queue-public.template.json", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling.template.json", "packaging": "file" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "bfbdcf74eec6aa8e8536b34e3725e087fcb3ef3ec8f3269bbd284c06f7f455b6.json", + "objectKey": "ad92d86b073f46ad1972fdd95afc6e295fcae2d8e486324ce74b33d75836f10c.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } } }, "dockerImages": { - "497b192764e66ae2955bba8dff8487b11aaaaf904414455868e2560e31f47211": { + "8be39d348c20f7e58a373abbd1152069e18da130e51bf52c89bd82a38d0e51d7": { "source": { - "directory": "asset.497b192764e66ae2955bba8dff8487b11aaaaf904414455868e2560e31f47211" + "directory": "asset.8be39d348c20f7e58a373abbd1152069e18da130e51bf52c89bd82a38d0e51d7" }, "destinations": { "current_account-current_region": { "repositoryName": "cdk-hnb659fds-container-assets-${AWS::AccountId}-${AWS::Region}", - "imageTag": "497b192764e66ae2955bba8dff8487b11aaaaf904414455868e2560e31f47211", + "imageTag": "8be39d348c20f7e58a373abbd1152069e18da130e51bf52c89bd82a38d0e51d7", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-image-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/aws-ecs-patterns-queue-public.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/aws-ecs-patterns-queue-custom-cpu-scaling.template.json similarity index 69% rename from packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/aws-ecs-patterns-queue-public.template.json rename to packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/aws-ecs-patterns-queue-custom-cpu-scaling.template.json index c3871e30cab3d..c4207497f3220 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/aws-ecs-patterns-queue-public.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/aws-ecs-patterns-queue-custom-cpu-scaling.template.json @@ -10,7 +10,7 @@ "Tags": [ { "Key": "Name", - "Value": "aws-ecs-patterns-queue-public/VPC" + "Value": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC" } ] } @@ -39,7 +39,7 @@ }, { "Key": "Name", - "Value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1" + "Value": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PublicSubnet1" } ], "VpcId": { @@ -53,7 +53,7 @@ "Tags": [ { "Key": "Name", - "Value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1" + "Value": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PublicSubnet1" } ], "VpcId": { @@ -94,7 +94,7 @@ "Tags": [ { "Key": "Name", - "Value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1" + "Value": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PublicSubnet1" } ] } @@ -114,7 +114,7 @@ "Tags": [ { "Key": "Name", - "Value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1" + "Value": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PublicSubnet1" } ] }, @@ -147,7 +147,7 @@ }, { "Key": "Name", - "Value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2" + "Value": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PublicSubnet2" } ], "VpcId": { @@ -161,7 +161,7 @@ "Tags": [ { "Key": "Name", - "Value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2" + "Value": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PublicSubnet2" } ], "VpcId": { @@ -202,7 +202,7 @@ "Tags": [ { "Key": "Name", - "Value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2" + "Value": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PublicSubnet2" } ] } @@ -222,7 +222,7 @@ "Tags": [ { "Key": "Name", - "Value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2" + "Value": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PublicSubnet2" } ] }, @@ -255,7 +255,7 @@ }, { "Key": "Name", - "Value": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet1" + "Value": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PrivateSubnet1" } ], "VpcId": { @@ -269,7 +269,7 @@ "Tags": [ { "Key": "Name", - "Value": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet1" + "Value": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PrivateSubnet1" } ], "VpcId": { @@ -324,7 +324,7 @@ }, { "Key": "Name", - "Value": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet2" + "Value": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PrivateSubnet2" } ], "VpcId": { @@ -338,7 +338,7 @@ "Tags": [ { "Key": "Name", - "Value": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet2" + "Value": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PrivateSubnet2" } ], "VpcId": { @@ -375,7 +375,7 @@ "Tags": [ { "Key": "Name", - "Value": "aws-ecs-patterns-queue-public/VPC" + "Value": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC" } ] } @@ -391,7 +391,7 @@ } } }, - "PublicQueueServiceEcsProcessingDeadLetterQueueBC492277": { + "awsecspatternsqueuecustomcpuscalingEcsProcessingDeadLetterQueue018F2F89": { "Type": "AWS::SQS::Queue", "Properties": { "MessageRetentionPeriod": 1209600 @@ -399,13 +399,13 @@ "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" }, - "PublicQueueServiceEcsProcessingQueue84CD309D": { + "awsecspatternsqueuecustomcpuscalingEcsProcessingQueue2AF4CB2C": { "Type": "AWS::SQS::Queue", "Properties": { "RedrivePolicy": { "deadLetterTargetArn": { "Fn::GetAtt": [ - "PublicQueueServiceEcsProcessingDeadLetterQueueBC492277", + "awsecspatternsqueuecustomcpuscalingEcsProcessingDeadLetterQueue018F2F89", "Arn" ] }, @@ -415,7 +415,7 @@ "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" }, - "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F": { + "awsecspatternsqueuecustomcpuscalingQueueProcessingTaskDefTaskRole397465C3": { "Type": "AWS::IAM::Role", "Properties": { "AssumeRolePolicyDocument": { @@ -432,7 +432,7 @@ } } }, - "PublicQueueServiceQueueProcessingTaskDefTaskRoleDefaultPolicy5417957C": { + "awsecspatternsqueuecustomcpuscalingQueueProcessingTaskDefTaskRoleDefaultPolicyFF70EC56": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -448,7 +448,7 @@ "Effect": "Allow", "Resource": { "Fn::GetAtt": [ - "PublicQueueServiceEcsProcessingQueue84CD309D", + "awsecspatternsqueuecustomcpuscalingEcsProcessingQueue2AF4CB2C", "Arn" ] } @@ -456,15 +456,15 @@ ], "Version": "2012-10-17" }, - "PolicyName": "PublicQueueServiceQueueProcessingTaskDefTaskRoleDefaultPolicy5417957C", + "PolicyName": "awsecspatternsqueuecustomcpuscalingQueueProcessingTaskDefTaskRoleDefaultPolicyFF70EC56", "Roles": [ { - "Ref": "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F" + "Ref": "awsecspatternsqueuecustomcpuscalingQueueProcessingTaskDefTaskRole397465C3" } ] } }, - "PublicQueueServiceQueueProcessingTaskDef858327F6": { + "awsecspatternsqueuecustomcpuscalingQueueProcessingTaskDef7D327EDA": { "Type": "AWS::ECS::TaskDefinition", "Properties": { "ContainerDefinitions": [ @@ -474,7 +474,7 @@ "Name": "QUEUE_NAME", "Value": { "Fn::GetAtt": [ - "PublicQueueServiceEcsProcessingQueue84CD309D", + "awsecspatternsqueuecustomcpuscalingEcsProcessingQueue2AF4CB2C", "QueueName" ] } @@ -482,15 +482,15 @@ ], "Essential": true, "Image": { - "Fn::Sub": "${AWS::AccountId}.dkr.ecr.${AWS::Region}.${AWS::URLSuffix}/cdk-hnb659fds-container-assets-${AWS::AccountId}-${AWS::Region}:497b192764e66ae2955bba8dff8487b11aaaaf904414455868e2560e31f47211" + "Fn::Sub": "${AWS::AccountId}.dkr.ecr.${AWS::Region}.${AWS::URLSuffix}/cdk-hnb659fds-container-assets-${AWS::AccountId}-${AWS::Region}:8be39d348c20f7e58a373abbd1152069e18da130e51bf52c89bd82a38d0e51d7" }, "LogConfiguration": { "LogDriver": "awslogs", "Options": { "awslogs-group": { - "Ref": "PublicQueueServiceQueueProcessingTaskDefQueueProcessingContainerLogGroupCFF67B64" + "Ref": "awsecspatternsqueuecustomcpuscalingQueueProcessingTaskDefQueueProcessingContainerLogGroup706DABB2" }, - "awslogs-stream-prefix": "PublicQueueService", + "awslogs-stream-prefix": "aws-ecs-patterns-queue-custom-cpu-scaling", "awslogs-region": { "Ref": "AWS::Region" } @@ -502,11 +502,11 @@ "Cpu": "256", "ExecutionRoleArn": { "Fn::GetAtt": [ - "PublicQueueServiceQueueProcessingTaskDefExecutionRoleE22721BA", + "awsecspatternsqueuecustomcpuscalingQueueProcessingTaskDefExecutionRole3F91D316", "Arn" ] }, - "Family": "awsecspatternsqueuepublicPublicQueueServiceQueueProcessingTaskDefB3738118", + "Family": "awsecspatternsqueuecustomcpuscalingQueueProcessingTaskDef1A053021", "Memory": "512", "NetworkMode": "awsvpc", "RequiresCompatibilities": [ @@ -514,18 +514,18 @@ ], "TaskRoleArn": { "Fn::GetAtt": [ - "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F", + "awsecspatternsqueuecustomcpuscalingQueueProcessingTaskDefTaskRole397465C3", "Arn" ] } } }, - "PublicQueueServiceQueueProcessingTaskDefQueueProcessingContainerLogGroupCFF67B64": { + "awsecspatternsqueuecustomcpuscalingQueueProcessingTaskDefQueueProcessingContainerLogGroup706DABB2": { "Type": "AWS::Logs::LogGroup", "UpdateReplacePolicy": "Retain", "DeletionPolicy": "Retain" }, - "PublicQueueServiceQueueProcessingTaskDefExecutionRoleE22721BA": { + "awsecspatternsqueuecustomcpuscalingQueueProcessingTaskDefExecutionRole3F91D316": { "Type": "AWS::IAM::Role", "Properties": { "AssumeRolePolicyDocument": { @@ -542,7 +542,7 @@ } } }, - "PublicQueueServiceQueueProcessingTaskDefExecutionRoleDefaultPolicyD7FF680F": { + "awsecspatternsqueuecustomcpuscalingQueueProcessingTaskDefExecutionRoleDefaultPolicy25E1F570": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -591,7 +591,7 @@ "Effect": "Allow", "Resource": { "Fn::GetAtt": [ - "PublicQueueServiceQueueProcessingTaskDefQueueProcessingContainerLogGroupCFF67B64", + "awsecspatternsqueuecustomcpuscalingQueueProcessingTaskDefQueueProcessingContainerLogGroup706DABB2", "Arn" ] } @@ -599,15 +599,15 @@ ], "Version": "2012-10-17" }, - "PolicyName": "PublicQueueServiceQueueProcessingTaskDefExecutionRoleDefaultPolicyD7FF680F", + "PolicyName": "awsecspatternsqueuecustomcpuscalingQueueProcessingTaskDefExecutionRoleDefaultPolicy25E1F570", "Roles": [ { - "Ref": "PublicQueueServiceQueueProcessingTaskDefExecutionRoleE22721BA" + "Ref": "awsecspatternsqueuecustomcpuscalingQueueProcessingTaskDefExecutionRole3F91D316" } ] } }, - "PublicQueueServiceQueueProcessingFargateService7DE3D65B": { + "awsecspatternsqueuecustomcpuscalingQueueProcessingFargateService88A0B9F9": { "Type": "AWS::ECS::Service", "Properties": { "Cluster": { @@ -630,7 +630,7 @@ "SecurityGroups": [ { "Fn::GetAtt": [ - "PublicQueueServiceQueueProcessingFargateServiceSecurityGroupFC07A65A", + "awsecspatternsqueuecustomcpuscalingQueueProcessingFargateServiceSecurityGroup48C94096", "GroupId" ] } @@ -646,18 +646,18 @@ } }, "TaskDefinition": { - "Ref": "PublicQueueServiceQueueProcessingTaskDef858327F6" + "Ref": "awsecspatternsqueuecustomcpuscalingQueueProcessingTaskDef7D327EDA" } }, "DependsOn": [ - "PublicQueueServiceQueueProcessingTaskDefTaskRoleDefaultPolicy5417957C", - "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F" + "awsecspatternsqueuecustomcpuscalingQueueProcessingTaskDefTaskRoleDefaultPolicyFF70EC56", + "awsecspatternsqueuecustomcpuscalingQueueProcessingTaskDefTaskRole397465C3" ] }, - "PublicQueueServiceQueueProcessingFargateServiceSecurityGroupFC07A65A": { + "awsecspatternsqueuecustomcpuscalingQueueProcessingFargateServiceSecurityGroup48C94096": { "Type": "AWS::EC2::SecurityGroup", "Properties": { - "GroupDescription": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/SecurityGroup", + "GroupDescription": "aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingFargateService/SecurityGroup", "SecurityGroupEgress": [ { "CidrIp": "0.0.0.0/0", @@ -670,11 +670,11 @@ } }, "DependsOn": [ - "PublicQueueServiceQueueProcessingTaskDefTaskRoleDefaultPolicy5417957C", - "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F" + "awsecspatternsqueuecustomcpuscalingQueueProcessingTaskDefTaskRoleDefaultPolicyFF70EC56", + "awsecspatternsqueuecustomcpuscalingQueueProcessingTaskDefTaskRole397465C3" ] }, - "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetE040C118": { + "awsecspatternsqueuecustomcpuscalingQueueProcessingFargateServiceTaskCountTargetEA4C3C9A": { "Type": "AWS::ApplicationAutoScaling::ScalableTarget", "Properties": { "MaxCapacity": 2, @@ -690,7 +690,7 @@ "/", { "Fn::GetAtt": [ - "PublicQueueServiceQueueProcessingFargateService7DE3D65B", + "awsecspatternsqueuecustomcpuscalingQueueProcessingFargateService88A0B9F9", "Name" ] } @@ -717,17 +717,17 @@ "ServiceNamespace": "ecs" }, "DependsOn": [ - "PublicQueueServiceQueueProcessingTaskDefTaskRoleDefaultPolicy5417957C", - "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F" + "awsecspatternsqueuecustomcpuscalingQueueProcessingTaskDefTaskRoleDefaultPolicyFF70EC56", + "awsecspatternsqueuecustomcpuscalingQueueProcessingTaskDefTaskRole397465C3" ] }, - "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetCpuScaling559C41BF": { + "awsecspatternsqueuecustomcpuscalingQueueProcessingFargateServiceTaskCountTargetCpuScalingF32A6EB0": { "Type": "AWS::ApplicationAutoScaling::ScalingPolicy", "Properties": { - "PolicyName": "awsecspatternsqueuepublicPublicQueueServiceQueueProcessingFargateServiceTaskCountTargetCpuScalingF36D44B7", + "PolicyName": "awsecspatternsqueuecustomcpuscalingQueueProcessingFargateServiceTaskCountTargetCpuScaling743D6A56", "PolicyType": "TargetTrackingScaling", "ScalingTargetId": { - "Ref": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetE040C118" + "Ref": "awsecspatternsqueuecustomcpuscalingQueueProcessingFargateServiceTaskCountTargetEA4C3C9A" }, "TargetTrackingScalingPolicyConfiguration": { "PredefinedMetricSpecification": { @@ -737,17 +737,17 @@ } }, "DependsOn": [ - "PublicQueueServiceQueueProcessingTaskDefTaskRoleDefaultPolicy5417957C", - "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F" + "awsecspatternsqueuecustomcpuscalingQueueProcessingTaskDefTaskRoleDefaultPolicyFF70EC56", + "awsecspatternsqueuecustomcpuscalingQueueProcessingTaskDefTaskRole397465C3" ] }, - "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerPolicyB2B27FF9": { + "awsecspatternsqueuecustomcpuscalingQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerPolicy081DB979": { "Type": "AWS::ApplicationAutoScaling::ScalingPolicy", "Properties": { - "PolicyName": "awsecspatternsqueuepublicPublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerPolicy2DB1A503", + "PolicyName": "awsecspatternsqueuecustomcpuscalingQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerPolicy592B357B", "PolicyType": "StepScaling", "ScalingTargetId": { - "Ref": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetE040C118" + "Ref": "awsecspatternsqueuecustomcpuscalingQueueProcessingFargateServiceTaskCountTargetEA4C3C9A" }, "StepScalingPolicyConfiguration": { "AdjustmentType": "ChangeInCapacity", @@ -761,16 +761,16 @@ } }, "DependsOn": [ - "PublicQueueServiceQueueProcessingTaskDefTaskRoleDefaultPolicy5417957C", - "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F" + "awsecspatternsqueuecustomcpuscalingQueueProcessingTaskDefTaskRoleDefaultPolicyFF70EC56", + "awsecspatternsqueuecustomcpuscalingQueueProcessingTaskDefTaskRole397465C3" ] }, - "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerAlarm5782C233": { + "awsecspatternsqueuecustomcpuscalingQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerAlarm53129CF0": { "Type": "AWS::CloudWatch::Alarm", "Properties": { "AlarmActions": [ { - "Ref": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerPolicyB2B27FF9" + "Ref": "awsecspatternsqueuecustomcpuscalingQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerPolicy081DB979" } ], "AlarmDescription": "Lower threshold scaling alarm", @@ -780,7 +780,7 @@ "Name": "QueueName", "Value": { "Fn::GetAtt": [ - "PublicQueueServiceEcsProcessingQueue84CD309D", + "awsecspatternsqueuecustomcpuscalingEcsProcessingQueue2AF4CB2C", "QueueName" ] } @@ -794,17 +794,17 @@ "Threshold": 0 }, "DependsOn": [ - "PublicQueueServiceQueueProcessingTaskDefTaskRoleDefaultPolicy5417957C", - "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F" + "awsecspatternsqueuecustomcpuscalingQueueProcessingTaskDefTaskRoleDefaultPolicyFF70EC56", + "awsecspatternsqueuecustomcpuscalingQueueProcessingTaskDefTaskRole397465C3" ] }, - "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperPolicyDCB40C8A": { + "awsecspatternsqueuecustomcpuscalingQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperPolicyF6102775": { "Type": "AWS::ApplicationAutoScaling::ScalingPolicy", "Properties": { - "PolicyName": "awsecspatternsqueuepublicPublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperPolicy89C3D196", + "PolicyName": "awsecspatternsqueuecustomcpuscalingQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperPolicyA55AB219", "PolicyType": "StepScaling", "ScalingTargetId": { - "Ref": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetE040C118" + "Ref": "awsecspatternsqueuecustomcpuscalingQueueProcessingFargateServiceTaskCountTargetEA4C3C9A" }, "StepScalingPolicyConfiguration": { "AdjustmentType": "ChangeInCapacity", @@ -823,16 +823,16 @@ } }, "DependsOn": [ - "PublicQueueServiceQueueProcessingTaskDefTaskRoleDefaultPolicy5417957C", - "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F" + "awsecspatternsqueuecustomcpuscalingQueueProcessingTaskDefTaskRoleDefaultPolicyFF70EC56", + "awsecspatternsqueuecustomcpuscalingQueueProcessingTaskDefTaskRole397465C3" ] }, - "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperAlarm5D67333D": { + "awsecspatternsqueuecustomcpuscalingQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperAlarm9397ABFA": { "Type": "AWS::CloudWatch::Alarm", "Properties": { "AlarmActions": [ { - "Ref": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperPolicyDCB40C8A" + "Ref": "awsecspatternsqueuecustomcpuscalingQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperPolicyF6102775" } ], "AlarmDescription": "Upper threshold scaling alarm", @@ -842,7 +842,7 @@ "Name": "QueueName", "Value": { "Fn::GetAtt": [ - "PublicQueueServiceEcsProcessingQueue84CD309D", + "awsecspatternsqueuecustomcpuscalingEcsProcessingQueue2AF4CB2C", "QueueName" ] } @@ -856,8 +856,8 @@ "Threshold": 100 }, "DependsOn": [ - "PublicQueueServiceQueueProcessingTaskDefTaskRoleDefaultPolicy5417957C", - "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F" + "awsecspatternsqueuecustomcpuscalingQueueProcessingTaskDefTaskRoleDefaultPolicyFF70EC56", + "awsecspatternsqueuecustomcpuscalingQueueProcessingTaskDefTaskRole397465C3" ] }, "EcsDefaultClusterMnL3mNNYNVPC9C1EC7A3": { @@ -865,34 +865,34 @@ } }, "Outputs": { - "PublicQueueServiceSQSDeadLetterQueueBCE86DBC": { + "awsecspatternsqueuecustomcpuscalingSQSDeadLetterQueue94103AB7": { "Value": { "Fn::GetAtt": [ - "PublicQueueServiceEcsProcessingDeadLetterQueueBC492277", + "awsecspatternsqueuecustomcpuscalingEcsProcessingDeadLetterQueue018F2F89", "QueueName" ] } }, - "PublicQueueServiceSQSDeadLetterQueueArn6E134EA4": { + "awsecspatternsqueuecustomcpuscalingSQSDeadLetterQueueArn45AA7A61": { "Value": { "Fn::GetAtt": [ - "PublicQueueServiceEcsProcessingDeadLetterQueueBC492277", + "awsecspatternsqueuecustomcpuscalingEcsProcessingDeadLetterQueue018F2F89", "Arn" ] } }, - "PublicQueueServiceSQSQueue4D3FBD5C": { + "awsecspatternsqueuecustomcpuscalingSQSQueue56D4C1AB": { "Value": { "Fn::GetAtt": [ - "PublicQueueServiceEcsProcessingQueue84CD309D", + "awsecspatternsqueuecustomcpuscalingEcsProcessingQueue2AF4CB2C", "QueueName" ] } }, - "PublicQueueServiceSQSQueueArn38014FDC": { + "awsecspatternsqueuecustomcpuscalingSQSQueueArnA165EB72": { "Value": { "Fn::GetAtt": [ - "PublicQueueServiceEcsProcessingQueue84CD309D", + "awsecspatternsqueuecustomcpuscalingEcsProcessingQueue2AF4CB2C", "Arn" ] } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/customCpuScalingQueueProcessingFargateServiceTestDefaultTestDeployAssert7FDCD114.assets.json similarity index 84% rename from packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.assets.json rename to packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/customCpuScalingQueueProcessingFargateServiceTestDefaultTestDeployAssert7FDCD114.assets.json index ee5b4c64f1c1d..ef62c8b5c29d0 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/customCpuScalingQueueProcessingFargateServiceTestDefaultTestDeployAssert7FDCD114.assets.json @@ -3,7 +3,7 @@ "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { - "path": "publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.template.json", + "path": "customCpuScalingQueueProcessingFargateServiceTestDefaultTestDeployAssert7FDCD114.template.json", "packaging": "file" }, "destinations": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/customCpuScalingQueueProcessingFargateServiceTestDefaultTestDeployAssert7FDCD114.template.json similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.template.json rename to packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/customCpuScalingQueueProcessingFargateServiceTestDefaultTestDeployAssert7FDCD114.template.json diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/integ.json index 574ac4affd690..bdeba54301a3f 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/integ.json @@ -1,12 +1,12 @@ { "version": "35.0.0", "testCases": { - "publicQueueProcessingFargateServiceTest/DefaultTest": { + "customCpuScalingQueueProcessingFargateServiceTest/DefaultTest": { "stacks": [ - "aws-ecs-patterns-queue-public" + "aws-ecs-patterns-queue-custom-cpu-scaling" ], - "assertionStack": "publicQueueProcessingFargateServiceTest/DefaultTest/DeployAssert", - "assertionStackName": "publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6" + "assertionStack": "customCpuScalingQueueProcessingFargateServiceTest/DefaultTest/DeployAssert", + "assertionStackName": "customCpuScalingQueueProcessingFargateServiceTestDefaultTestDeployAssert7FDCD114" } } } \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/manifest.json index 5ac0b3aab45c7..1ded70301ef94 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/manifest.json @@ -1,28 +1,28 @@ { "version": "35.0.0", "artifacts": { - "aws-ecs-patterns-queue-public.assets": { + "aws-ecs-patterns-queue-custom-cpu-scaling.assets": { "type": "cdk:asset-manifest", "properties": { - "file": "aws-ecs-patterns-queue-public.assets.json", + "file": "aws-ecs-patterns-queue-custom-cpu-scaling.assets.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" } }, - "aws-ecs-patterns-queue-public": { + "aws-ecs-patterns-queue-custom-cpu-scaling": { "type": "aws:cloudformation:stack", "environment": "aws://unknown-account/unknown-region", "properties": { - "templateFile": "aws-ecs-patterns-queue-public.template.json", + "templateFile": "aws-ecs-patterns-queue-custom-cpu-scaling.template.json", "terminationProtection": false, "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/bfbdcf74eec6aa8e8536b34e3725e087fcb3ef3ec8f3269bbd284c06f7f455b6.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/ad92d86b073f46ad1972fdd95afc6e295fcae2d8e486324ce74b33d75836f10c.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ - "aws-ecs-patterns-queue-public.assets" + "aws-ecs-patterns-queue-custom-cpu-scaling.assets" ], "lookupRole": { "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", @@ -31,301 +31,301 @@ } }, "dependencies": [ - "aws-ecs-patterns-queue-public.assets" + "aws-ecs-patterns-queue-custom-cpu-scaling.assets" ], "metadata": { - "/aws-ecs-patterns-queue-public/VPC/Resource": [ + "/aws-ecs-patterns-queue-custom-cpu-scaling/VPC/Resource": [ { "type": "aws:cdk:logicalId", "data": "VPCB9E5F0B4" } ], - "/aws-ecs-patterns-queue-public/VPC/PublicSubnet1/Subnet": [ + "/aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PublicSubnet1/Subnet": [ { "type": "aws:cdk:logicalId", "data": "VPCPublicSubnet1SubnetB4246D30" } ], - "/aws-ecs-patterns-queue-public/VPC/PublicSubnet1/RouteTable": [ + "/aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PublicSubnet1/RouteTable": [ { "type": "aws:cdk:logicalId", "data": "VPCPublicSubnet1RouteTableFEE4B781" } ], - "/aws-ecs-patterns-queue-public/VPC/PublicSubnet1/RouteTableAssociation": [ + "/aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PublicSubnet1/RouteTableAssociation": [ { "type": "aws:cdk:logicalId", "data": "VPCPublicSubnet1RouteTableAssociation0B0896DC" } ], - "/aws-ecs-patterns-queue-public/VPC/PublicSubnet1/DefaultRoute": [ + "/aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PublicSubnet1/DefaultRoute": [ { "type": "aws:cdk:logicalId", "data": "VPCPublicSubnet1DefaultRoute91CEF279" } ], - "/aws-ecs-patterns-queue-public/VPC/PublicSubnet1/EIP": [ + "/aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PublicSubnet1/EIP": [ { "type": "aws:cdk:logicalId", "data": "VPCPublicSubnet1EIP6AD938E8" } ], - "/aws-ecs-patterns-queue-public/VPC/PublicSubnet1/NATGateway": [ + "/aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PublicSubnet1/NATGateway": [ { "type": "aws:cdk:logicalId", "data": "VPCPublicSubnet1NATGatewayE0556630" } ], - "/aws-ecs-patterns-queue-public/VPC/PublicSubnet2/Subnet": [ + "/aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PublicSubnet2/Subnet": [ { "type": "aws:cdk:logicalId", "data": "VPCPublicSubnet2Subnet74179F39" } ], - "/aws-ecs-patterns-queue-public/VPC/PublicSubnet2/RouteTable": [ + "/aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PublicSubnet2/RouteTable": [ { "type": "aws:cdk:logicalId", "data": "VPCPublicSubnet2RouteTable6F1A15F1" } ], - "/aws-ecs-patterns-queue-public/VPC/PublicSubnet2/RouteTableAssociation": [ + "/aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PublicSubnet2/RouteTableAssociation": [ { "type": "aws:cdk:logicalId", "data": "VPCPublicSubnet2RouteTableAssociation5A808732" } ], - "/aws-ecs-patterns-queue-public/VPC/PublicSubnet2/DefaultRoute": [ + "/aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PublicSubnet2/DefaultRoute": [ { "type": "aws:cdk:logicalId", "data": "VPCPublicSubnet2DefaultRouteB7481BBA" } ], - "/aws-ecs-patterns-queue-public/VPC/PublicSubnet2/EIP": [ + "/aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PublicSubnet2/EIP": [ { "type": "aws:cdk:logicalId", "data": "VPCPublicSubnet2EIP4947BC00" } ], - "/aws-ecs-patterns-queue-public/VPC/PublicSubnet2/NATGateway": [ + "/aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PublicSubnet2/NATGateway": [ { "type": "aws:cdk:logicalId", "data": "VPCPublicSubnet2NATGateway3C070193" } ], - "/aws-ecs-patterns-queue-public/VPC/PrivateSubnet1/Subnet": [ + "/aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PrivateSubnet1/Subnet": [ { "type": "aws:cdk:logicalId", "data": "VPCPrivateSubnet1Subnet8BCA10E0" } ], - "/aws-ecs-patterns-queue-public/VPC/PrivateSubnet1/RouteTable": [ + "/aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PrivateSubnet1/RouteTable": [ { "type": "aws:cdk:logicalId", "data": "VPCPrivateSubnet1RouteTableBE8A6027" } ], - "/aws-ecs-patterns-queue-public/VPC/PrivateSubnet1/RouteTableAssociation": [ + "/aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PrivateSubnet1/RouteTableAssociation": [ { "type": "aws:cdk:logicalId", "data": "VPCPrivateSubnet1RouteTableAssociation347902D1" } ], - "/aws-ecs-patterns-queue-public/VPC/PrivateSubnet1/DefaultRoute": [ + "/aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PrivateSubnet1/DefaultRoute": [ { "type": "aws:cdk:logicalId", "data": "VPCPrivateSubnet1DefaultRouteAE1D6490" } ], - "/aws-ecs-patterns-queue-public/VPC/PrivateSubnet2/Subnet": [ + "/aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PrivateSubnet2/Subnet": [ { "type": "aws:cdk:logicalId", "data": "VPCPrivateSubnet2SubnetCFCDAA7A" } ], - "/aws-ecs-patterns-queue-public/VPC/PrivateSubnet2/RouteTable": [ + "/aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PrivateSubnet2/RouteTable": [ { "type": "aws:cdk:logicalId", "data": "VPCPrivateSubnet2RouteTable0A19E10E" } ], - "/aws-ecs-patterns-queue-public/VPC/PrivateSubnet2/RouteTableAssociation": [ + "/aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PrivateSubnet2/RouteTableAssociation": [ { "type": "aws:cdk:logicalId", "data": "VPCPrivateSubnet2RouteTableAssociation0C73D413" } ], - "/aws-ecs-patterns-queue-public/VPC/PrivateSubnet2/DefaultRoute": [ + "/aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PrivateSubnet2/DefaultRoute": [ { "type": "aws:cdk:logicalId", "data": "VPCPrivateSubnet2DefaultRouteF4F5CFD2" } ], - "/aws-ecs-patterns-queue-public/VPC/IGW": [ + "/aws-ecs-patterns-queue-custom-cpu-scaling/VPC/IGW": [ { "type": "aws:cdk:logicalId", "data": "VPCIGWB7E252D3" } ], - "/aws-ecs-patterns-queue-public/VPC/VPCGW": [ + "/aws-ecs-patterns-queue-custom-cpu-scaling/VPC/VPCGW": [ { "type": "aws:cdk:logicalId", "data": "VPCVPCGW99B986DC" } ], - "/aws-ecs-patterns-queue-public/PublicQueueService/EcsProcessingDeadLetterQueue/Resource": [ + "/aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/EcsProcessingDeadLetterQueue/Resource": [ { "type": "aws:cdk:logicalId", - "data": "PublicQueueServiceEcsProcessingDeadLetterQueueBC492277" + "data": "awsecspatternsqueuecustomcpuscalingEcsProcessingDeadLetterQueue018F2F89" } ], - "/aws-ecs-patterns-queue-public/PublicQueueService/EcsProcessingQueue/Resource": [ + "/aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/EcsProcessingQueue/Resource": [ { "type": "aws:cdk:logicalId", - "data": "PublicQueueServiceEcsProcessingQueue84CD309D" + "data": "awsecspatternsqueuecustomcpuscalingEcsProcessingQueue2AF4CB2C" } ], - "/aws-ecs-patterns-queue-public/PublicQueueService/SQSDeadLetterQueue": [ + "/aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/SQSDeadLetterQueue": [ { "type": "aws:cdk:logicalId", - "data": "PublicQueueServiceSQSDeadLetterQueueBCE86DBC" + "data": "awsecspatternsqueuecustomcpuscalingSQSDeadLetterQueue94103AB7" } ], - "/aws-ecs-patterns-queue-public/PublicQueueService/SQSDeadLetterQueueArn": [ + "/aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/SQSDeadLetterQueueArn": [ { "type": "aws:cdk:logicalId", - "data": "PublicQueueServiceSQSDeadLetterQueueArn6E134EA4" + "data": "awsecspatternsqueuecustomcpuscalingSQSDeadLetterQueueArn45AA7A61" } ], - "/aws-ecs-patterns-queue-public/PublicQueueService/SQSQueue": [ + "/aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/SQSQueue": [ { "type": "aws:cdk:logicalId", - "data": "PublicQueueServiceSQSQueue4D3FBD5C" + "data": "awsecspatternsqueuecustomcpuscalingSQSQueue56D4C1AB" } ], - "/aws-ecs-patterns-queue-public/PublicQueueService/SQSQueueArn": [ + "/aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/SQSQueueArn": [ { "type": "aws:cdk:logicalId", - "data": "PublicQueueServiceSQSQueueArn38014FDC" + "data": "awsecspatternsqueuecustomcpuscalingSQSQueueArnA165EB72" } ], - "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/TaskRole/Resource": [ + "/aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingTaskDef/TaskRole/Resource": [ { "type": "aws:cdk:logicalId", - "data": "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F" + "data": "awsecspatternsqueuecustomcpuscalingQueueProcessingTaskDefTaskRole397465C3" } ], - "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/TaskRole/DefaultPolicy/Resource": [ + "/aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingTaskDef/TaskRole/DefaultPolicy/Resource": [ { "type": "aws:cdk:logicalId", - "data": "PublicQueueServiceQueueProcessingTaskDefTaskRoleDefaultPolicy5417957C" + "data": "awsecspatternsqueuecustomcpuscalingQueueProcessingTaskDefTaskRoleDefaultPolicyFF70EC56" } ], - "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/Resource": [ + "/aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingTaskDef/Resource": [ { "type": "aws:cdk:logicalId", - "data": "PublicQueueServiceQueueProcessingTaskDef858327F6" + "data": "awsecspatternsqueuecustomcpuscalingQueueProcessingTaskDef7D327EDA" } ], - "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/QueueProcessingContainer/LogGroup/Resource": [ + "/aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingTaskDef/QueueProcessingContainer/LogGroup/Resource": [ { "type": "aws:cdk:logicalId", - "data": "PublicQueueServiceQueueProcessingTaskDefQueueProcessingContainerLogGroupCFF67B64" + "data": "awsecspatternsqueuecustomcpuscalingQueueProcessingTaskDefQueueProcessingContainerLogGroup706DABB2" } ], - "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/ExecutionRole/Resource": [ + "/aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingTaskDef/ExecutionRole/Resource": [ { "type": "aws:cdk:logicalId", - "data": "PublicQueueServiceQueueProcessingTaskDefExecutionRoleE22721BA" + "data": "awsecspatternsqueuecustomcpuscalingQueueProcessingTaskDefExecutionRole3F91D316" } ], - "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/ExecutionRole/DefaultPolicy/Resource": [ + "/aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingTaskDef/ExecutionRole/DefaultPolicy/Resource": [ { "type": "aws:cdk:logicalId", - "data": "PublicQueueServiceQueueProcessingTaskDefExecutionRoleDefaultPolicyD7FF680F" + "data": "awsecspatternsqueuecustomcpuscalingQueueProcessingTaskDefExecutionRoleDefaultPolicy25E1F570" } ], - "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/Service": [ + "/aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingFargateService/Service": [ { "type": "aws:cdk:logicalId", - "data": "PublicQueueServiceQueueProcessingFargateService7DE3D65B" + "data": "awsecspatternsqueuecustomcpuscalingQueueProcessingFargateService88A0B9F9" } ], - "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/SecurityGroup/Resource": [ + "/aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingFargateService/SecurityGroup/Resource": [ { "type": "aws:cdk:logicalId", - "data": "PublicQueueServiceQueueProcessingFargateServiceSecurityGroupFC07A65A" + "data": "awsecspatternsqueuecustomcpuscalingQueueProcessingFargateServiceSecurityGroup48C94096" } ], - "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/Resource": [ + "/aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingFargateService/TaskCount/Target/Resource": [ { "type": "aws:cdk:logicalId", - "data": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetE040C118" + "data": "awsecspatternsqueuecustomcpuscalingQueueProcessingFargateServiceTaskCountTargetEA4C3C9A" } ], - "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/CpuScaling/Resource": [ + "/aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingFargateService/TaskCount/Target/CpuScaling/Resource": [ { "type": "aws:cdk:logicalId", - "data": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetCpuScaling559C41BF" + "data": "awsecspatternsqueuecustomcpuscalingQueueProcessingFargateServiceTaskCountTargetCpuScalingF32A6EB0" } ], - "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/LowerPolicy/Resource": [ + "/aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/LowerPolicy/Resource": [ { "type": "aws:cdk:logicalId", - "data": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerPolicyB2B27FF9" + "data": "awsecspatternsqueuecustomcpuscalingQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerPolicy081DB979" } ], - "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/LowerAlarm/Resource": [ + "/aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/LowerAlarm/Resource": [ { "type": "aws:cdk:logicalId", - "data": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerAlarm5782C233" + "data": "awsecspatternsqueuecustomcpuscalingQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerAlarm53129CF0" } ], - "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/UpperPolicy/Resource": [ + "/aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/UpperPolicy/Resource": [ { "type": "aws:cdk:logicalId", - "data": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperPolicyDCB40C8A" + "data": "awsecspatternsqueuecustomcpuscalingQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperPolicyF6102775" } ], - "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/UpperAlarm/Resource": [ + "/aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/UpperAlarm/Resource": [ { "type": "aws:cdk:logicalId", - "data": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperAlarm5D67333D" + "data": "awsecspatternsqueuecustomcpuscalingQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperAlarm9397ABFA" } ], - "/aws-ecs-patterns-queue-public/EcsDefaultClusterMnL3mNNYNVPC/Resource": [ + "/aws-ecs-patterns-queue-custom-cpu-scaling/EcsDefaultClusterMnL3mNNYNVPC/Resource": [ { "type": "aws:cdk:logicalId", "data": "EcsDefaultClusterMnL3mNNYNVPC9C1EC7A3" } ], - "/aws-ecs-patterns-queue-public/BootstrapVersion": [ + "/aws-ecs-patterns-queue-custom-cpu-scaling/BootstrapVersion": [ { "type": "aws:cdk:logicalId", "data": "BootstrapVersion" } ], - "/aws-ecs-patterns-queue-public/CheckBootstrapVersion": [ + "/aws-ecs-patterns-queue-custom-cpu-scaling/CheckBootstrapVersion": [ { "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } ] }, - "displayName": "aws-ecs-patterns-queue-public" + "displayName": "aws-ecs-patterns-queue-custom-cpu-scaling" }, - "publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.assets": { + "customCpuScalingQueueProcessingFargateServiceTestDefaultTestDeployAssert7FDCD114.assets": { "type": "cdk:asset-manifest", "properties": { - "file": "publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.assets.json", + "file": "customCpuScalingQueueProcessingFargateServiceTestDefaultTestDeployAssert7FDCD114.assets.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" } }, - "publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6": { + "customCpuScalingQueueProcessingFargateServiceTestDefaultTestDeployAssert7FDCD114": { "type": "aws:cloudformation:stack", "environment": "aws://unknown-account/unknown-region", "properties": { - "templateFile": "publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.template.json", + "templateFile": "customCpuScalingQueueProcessingFargateServiceTestDefaultTestDeployAssert7FDCD114.template.json", "terminationProtection": false, "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", @@ -334,7 +334,7 @@ "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ - "publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.assets" + "customCpuScalingQueueProcessingFargateServiceTestDefaultTestDeployAssert7FDCD114.assets" ], "lookupRole": { "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", @@ -343,23 +343,23 @@ } }, "dependencies": [ - "publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.assets" + "customCpuScalingQueueProcessingFargateServiceTestDefaultTestDeployAssert7FDCD114.assets" ], "metadata": { - "/publicQueueProcessingFargateServiceTest/DefaultTest/DeployAssert/BootstrapVersion": [ + "/customCpuScalingQueueProcessingFargateServiceTest/DefaultTest/DeployAssert/BootstrapVersion": [ { "type": "aws:cdk:logicalId", "data": "BootstrapVersion" } ], - "/publicQueueProcessingFargateServiceTest/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + "/customCpuScalingQueueProcessingFargateServiceTest/DefaultTest/DeployAssert/CheckBootstrapVersion": [ { "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } ] }, - "displayName": "publicQueueProcessingFargateServiceTest/DefaultTest/DeployAssert" + "displayName": "customCpuScalingQueueProcessingFargateServiceTest/DefaultTest/DeployAssert" }, "Tree": { "type": "cdk:tree", diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/tree.json index 26b03bfb1168f..fbdbd5d85dbaf 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/tree.json @@ -4,17 +4,17 @@ "id": "App", "path": "", "children": { - "aws-ecs-patterns-queue-public": { - "id": "aws-ecs-patterns-queue-public", - "path": "aws-ecs-patterns-queue-public", + "aws-ecs-patterns-queue-custom-cpu-scaling": { + "id": "aws-ecs-patterns-queue-custom-cpu-scaling", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling", "children": { "VPC": { "id": "VPC", - "path": "aws-ecs-patterns-queue-public/VPC", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC", "children": { "Resource": { "id": "Resource", - "path": "aws-ecs-patterns-queue-public/VPC/Resource", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::VPC", "aws:cdk:cloudformation:props": { @@ -25,7 +25,7 @@ "tags": [ { "key": "Name", - "value": "aws-ecs-patterns-queue-public/VPC" + "value": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC" } ] } @@ -37,11 +37,11 @@ }, "PublicSubnet1": { "id": "PublicSubnet1", - "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PublicSubnet1", "children": { "Subnet": { "id": "Subnet", - "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1/Subnet", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PublicSubnet1/Subnet", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", "aws:cdk:cloudformation:props": { @@ -66,7 +66,7 @@ }, { "key": "Name", - "value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1" + "value": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PublicSubnet1" } ], "vpcId": { @@ -81,7 +81,7 @@ }, "Acl": { "id": "Acl", - "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1/Acl", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", "version": "0.0.0" @@ -89,14 +89,14 @@ }, "RouteTable": { "id": "RouteTable", - "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1/RouteTable", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PublicSubnet1/RouteTable", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", "aws:cdk:cloudformation:props": { "tags": [ { "key": "Name", - "value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1" + "value": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PublicSubnet1" } ], "vpcId": { @@ -111,7 +111,7 @@ }, "RouteTableAssociation": { "id": "RouteTableAssociation", - "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1/RouteTableAssociation", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PublicSubnet1/RouteTableAssociation", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", "aws:cdk:cloudformation:props": { @@ -130,7 +130,7 @@ }, "DefaultRoute": { "id": "DefaultRoute", - "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1/DefaultRoute", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PublicSubnet1/DefaultRoute", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Route", "aws:cdk:cloudformation:props": { @@ -150,7 +150,7 @@ }, "EIP": { "id": "EIP", - "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1/EIP", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PublicSubnet1/EIP", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::EIP", "aws:cdk:cloudformation:props": { @@ -158,7 +158,7 @@ "tags": [ { "key": "Name", - "value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1" + "value": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PublicSubnet1" } ] } @@ -170,7 +170,7 @@ }, "NATGateway": { "id": "NATGateway", - "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1/NATGateway", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PublicSubnet1/NATGateway", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::NatGateway", "aws:cdk:cloudformation:props": { @@ -186,7 +186,7 @@ "tags": [ { "key": "Name", - "value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1" + "value": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PublicSubnet1" } ] } @@ -204,11 +204,11 @@ }, "PublicSubnet2": { "id": "PublicSubnet2", - "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PublicSubnet2", "children": { "Subnet": { "id": "Subnet", - "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2/Subnet", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PublicSubnet2/Subnet", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", "aws:cdk:cloudformation:props": { @@ -233,7 +233,7 @@ }, { "key": "Name", - "value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2" + "value": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PublicSubnet2" } ], "vpcId": { @@ -248,7 +248,7 @@ }, "Acl": { "id": "Acl", - "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2/Acl", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", "version": "0.0.0" @@ -256,14 +256,14 @@ }, "RouteTable": { "id": "RouteTable", - "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2/RouteTable", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PublicSubnet2/RouteTable", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", "aws:cdk:cloudformation:props": { "tags": [ { "key": "Name", - "value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2" + "value": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PublicSubnet2" } ], "vpcId": { @@ -278,7 +278,7 @@ }, "RouteTableAssociation": { "id": "RouteTableAssociation", - "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2/RouteTableAssociation", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PublicSubnet2/RouteTableAssociation", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", "aws:cdk:cloudformation:props": { @@ -297,7 +297,7 @@ }, "DefaultRoute": { "id": "DefaultRoute", - "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2/DefaultRoute", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PublicSubnet2/DefaultRoute", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Route", "aws:cdk:cloudformation:props": { @@ -317,7 +317,7 @@ }, "EIP": { "id": "EIP", - "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2/EIP", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PublicSubnet2/EIP", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::EIP", "aws:cdk:cloudformation:props": { @@ -325,7 +325,7 @@ "tags": [ { "key": "Name", - "value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2" + "value": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PublicSubnet2" } ] } @@ -337,7 +337,7 @@ }, "NATGateway": { "id": "NATGateway", - "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2/NATGateway", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PublicSubnet2/NATGateway", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::NatGateway", "aws:cdk:cloudformation:props": { @@ -353,7 +353,7 @@ "tags": [ { "key": "Name", - "value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2" + "value": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PublicSubnet2" } ] } @@ -371,11 +371,11 @@ }, "PrivateSubnet1": { "id": "PrivateSubnet1", - "path": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet1", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PrivateSubnet1", "children": { "Subnet": { "id": "Subnet", - "path": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet1/Subnet", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PrivateSubnet1/Subnet", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", "aws:cdk:cloudformation:props": { @@ -400,7 +400,7 @@ }, { "key": "Name", - "value": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet1" + "value": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PrivateSubnet1" } ], "vpcId": { @@ -415,7 +415,7 @@ }, "Acl": { "id": "Acl", - "path": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet1/Acl", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", "version": "0.0.0" @@ -423,14 +423,14 @@ }, "RouteTable": { "id": "RouteTable", - "path": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet1/RouteTable", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PrivateSubnet1/RouteTable", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", "aws:cdk:cloudformation:props": { "tags": [ { "key": "Name", - "value": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet1" + "value": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PrivateSubnet1" } ], "vpcId": { @@ -445,7 +445,7 @@ }, "RouteTableAssociation": { "id": "RouteTableAssociation", - "path": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet1/RouteTableAssociation", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PrivateSubnet1/RouteTableAssociation", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", "aws:cdk:cloudformation:props": { @@ -464,7 +464,7 @@ }, "DefaultRoute": { "id": "DefaultRoute", - "path": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet1/DefaultRoute", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PrivateSubnet1/DefaultRoute", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Route", "aws:cdk:cloudformation:props": { @@ -490,11 +490,11 @@ }, "PrivateSubnet2": { "id": "PrivateSubnet2", - "path": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet2", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PrivateSubnet2", "children": { "Subnet": { "id": "Subnet", - "path": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet2/Subnet", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PrivateSubnet2/Subnet", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", "aws:cdk:cloudformation:props": { @@ -519,7 +519,7 @@ }, { "key": "Name", - "value": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet2" + "value": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PrivateSubnet2" } ], "vpcId": { @@ -534,7 +534,7 @@ }, "Acl": { "id": "Acl", - "path": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet2/Acl", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", "version": "0.0.0" @@ -542,14 +542,14 @@ }, "RouteTable": { "id": "RouteTable", - "path": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet2/RouteTable", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PrivateSubnet2/RouteTable", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", "aws:cdk:cloudformation:props": { "tags": [ { "key": "Name", - "value": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet2" + "value": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PrivateSubnet2" } ], "vpcId": { @@ -564,7 +564,7 @@ }, "RouteTableAssociation": { "id": "RouteTableAssociation", - "path": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet2/RouteTableAssociation", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PrivateSubnet2/RouteTableAssociation", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", "aws:cdk:cloudformation:props": { @@ -583,7 +583,7 @@ }, "DefaultRoute": { "id": "DefaultRoute", - "path": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet2/DefaultRoute", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/PrivateSubnet2/DefaultRoute", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Route", "aws:cdk:cloudformation:props": { @@ -609,14 +609,14 @@ }, "IGW": { "id": "IGW", - "path": "aws-ecs-patterns-queue-public/VPC/IGW", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/IGW", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::InternetGateway", "aws:cdk:cloudformation:props": { "tags": [ { "key": "Name", - "value": "aws-ecs-patterns-queue-public/VPC" + "value": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC" } ] } @@ -628,7 +628,7 @@ }, "VPCGW": { "id": "VPCGW", - "path": "aws-ecs-patterns-queue-public/VPC/VPCGW", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/VPC/VPCGW", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::VPCGatewayAttachment", "aws:cdk:cloudformation:props": { @@ -651,17 +651,17 @@ "version": "0.0.0" } }, - "PublicQueueService": { - "id": "PublicQueueService", - "path": "aws-ecs-patterns-queue-public/PublicQueueService", + "aws-ecs-patterns-queue-custom-cpu-scaling": { + "id": "aws-ecs-patterns-queue-custom-cpu-scaling", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling", "children": { "EcsProcessingDeadLetterQueue": { "id": "EcsProcessingDeadLetterQueue", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/EcsProcessingDeadLetterQueue", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/EcsProcessingDeadLetterQueue", "children": { "Resource": { "id": "Resource", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/EcsProcessingDeadLetterQueue/Resource", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/EcsProcessingDeadLetterQueue/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::SQS::Queue", "aws:cdk:cloudformation:props": { @@ -681,18 +681,18 @@ }, "EcsProcessingQueue": { "id": "EcsProcessingQueue", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/EcsProcessingQueue", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/EcsProcessingQueue", "children": { "Resource": { "id": "Resource", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/EcsProcessingQueue/Resource", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/EcsProcessingQueue/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::SQS::Queue", "aws:cdk:cloudformation:props": { "redrivePolicy": { "deadLetterTargetArn": { "Fn::GetAtt": [ - "PublicQueueServiceEcsProcessingDeadLetterQueueBC492277", + "awsecspatternsqueuecustomcpuscalingEcsProcessingDeadLetterQueue018F2F89", "Arn" ] }, @@ -713,7 +713,7 @@ }, "SQSDeadLetterQueue": { "id": "SQSDeadLetterQueue", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/SQSDeadLetterQueue", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/SQSDeadLetterQueue", "constructInfo": { "fqn": "aws-cdk-lib.CfnOutput", "version": "0.0.0" @@ -721,7 +721,7 @@ }, "SQSDeadLetterQueueArn": { "id": "SQSDeadLetterQueueArn", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/SQSDeadLetterQueueArn", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/SQSDeadLetterQueueArn", "constructInfo": { "fqn": "aws-cdk-lib.CfnOutput", "version": "0.0.0" @@ -729,7 +729,7 @@ }, "SQSQueue": { "id": "SQSQueue", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/SQSQueue", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/SQSQueue", "constructInfo": { "fqn": "aws-cdk-lib.CfnOutput", "version": "0.0.0" @@ -737,7 +737,7 @@ }, "SQSQueueArn": { "id": "SQSQueueArn", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/SQSQueueArn", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/SQSQueueArn", "constructInfo": { "fqn": "aws-cdk-lib.CfnOutput", "version": "0.0.0" @@ -745,15 +745,15 @@ }, "QueueProcessingTaskDef": { "id": "QueueProcessingTaskDef", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingTaskDef", "children": { "TaskRole": { "id": "TaskRole", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/TaskRole", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingTaskDef/TaskRole", "children": { "ImportTaskRole": { "id": "ImportTaskRole", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/TaskRole/ImportTaskRole", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingTaskDef/TaskRole/ImportTaskRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", "version": "0.0.0" @@ -761,7 +761,7 @@ }, "Resource": { "id": "Resource", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/TaskRole/Resource", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingTaskDef/TaskRole/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::IAM::Role", "aws:cdk:cloudformation:props": { @@ -786,11 +786,11 @@ }, "DefaultPolicy": { "id": "DefaultPolicy", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/TaskRole/DefaultPolicy", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingTaskDef/TaskRole/DefaultPolicy", "children": { "Resource": { "id": "Resource", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/TaskRole/DefaultPolicy/Resource", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingTaskDef/TaskRole/DefaultPolicy/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::IAM::Policy", "aws:cdk:cloudformation:props": { @@ -807,7 +807,7 @@ "Effect": "Allow", "Resource": { "Fn::GetAtt": [ - "PublicQueueServiceEcsProcessingQueue84CD309D", + "awsecspatternsqueuecustomcpuscalingEcsProcessingQueue2AF4CB2C", "Arn" ] } @@ -815,10 +815,10 @@ ], "Version": "2012-10-17" }, - "policyName": "PublicQueueServiceQueueProcessingTaskDefTaskRoleDefaultPolicy5417957C", + "policyName": "awsecspatternsqueuecustomcpuscalingQueueProcessingTaskDefTaskRoleDefaultPolicyFF70EC56", "roles": [ { - "Ref": "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F" + "Ref": "awsecspatternsqueuecustomcpuscalingQueueProcessingTaskDefTaskRole397465C3" } ] } @@ -842,7 +842,7 @@ }, "Resource": { "id": "Resource", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/Resource", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingTaskDef/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::ECS::TaskDefinition", "aws:cdk:cloudformation:props": { @@ -850,16 +850,16 @@ { "essential": true, "image": { - "Fn::Sub": "${AWS::AccountId}.dkr.ecr.${AWS::Region}.${AWS::URLSuffix}/cdk-hnb659fds-container-assets-${AWS::AccountId}-${AWS::Region}:497b192764e66ae2955bba8dff8487b11aaaaf904414455868e2560e31f47211" + "Fn::Sub": "${AWS::AccountId}.dkr.ecr.${AWS::Region}.${AWS::URLSuffix}/cdk-hnb659fds-container-assets-${AWS::AccountId}-${AWS::Region}:8be39d348c20f7e58a373abbd1152069e18da130e51bf52c89bd82a38d0e51d7" }, "name": "QueueProcessingContainer", "logConfiguration": { "logDriver": "awslogs", "options": { "awslogs-group": { - "Ref": "PublicQueueServiceQueueProcessingTaskDefQueueProcessingContainerLogGroupCFF67B64" + "Ref": "awsecspatternsqueuecustomcpuscalingQueueProcessingTaskDefQueueProcessingContainerLogGroup706DABB2" }, - "awslogs-stream-prefix": "PublicQueueService", + "awslogs-stream-prefix": "aws-ecs-patterns-queue-custom-cpu-scaling", "awslogs-region": { "Ref": "AWS::Region" } @@ -870,7 +870,7 @@ "name": "QUEUE_NAME", "value": { "Fn::GetAtt": [ - "PublicQueueServiceEcsProcessingQueue84CD309D", + "awsecspatternsqueuecustomcpuscalingEcsProcessingQueue2AF4CB2C", "QueueName" ] } @@ -881,11 +881,11 @@ "cpu": "256", "executionRoleArn": { "Fn::GetAtt": [ - "PublicQueueServiceQueueProcessingTaskDefExecutionRoleE22721BA", + "awsecspatternsqueuecustomcpuscalingQueueProcessingTaskDefExecutionRole3F91D316", "Arn" ] }, - "family": "awsecspatternsqueuepublicPublicQueueServiceQueueProcessingTaskDefB3738118", + "family": "awsecspatternsqueuecustomcpuscalingQueueProcessingTaskDef1A053021", "memory": "512", "networkMode": "awsvpc", "requiresCompatibilities": [ @@ -893,7 +893,7 @@ ], "taskRoleArn": { "Fn::GetAtt": [ - "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F", + "awsecspatternsqueuecustomcpuscalingQueueProcessingTaskDefTaskRole397465C3", "Arn" ] } @@ -906,15 +906,15 @@ }, "QueueProcessingContainer": { "id": "QueueProcessingContainer", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/QueueProcessingContainer", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingTaskDef/QueueProcessingContainer", "children": { "AssetImage": { "id": "AssetImage", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/QueueProcessingContainer/AssetImage", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingTaskDef/QueueProcessingContainer/AssetImage", "children": { "Staging": { "id": "Staging", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/QueueProcessingContainer/AssetImage/Staging", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingTaskDef/QueueProcessingContainer/AssetImage/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", "version": "0.0.0" @@ -922,7 +922,7 @@ }, "Repository": { "id": "Repository", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/QueueProcessingContainer/AssetImage/Repository", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingTaskDef/QueueProcessingContainer/AssetImage/Repository", "constructInfo": { "fqn": "aws-cdk-lib.aws_ecr.RepositoryBase", "version": "0.0.0" @@ -936,11 +936,11 @@ }, "LogGroup": { "id": "LogGroup", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/QueueProcessingContainer/LogGroup", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingTaskDef/QueueProcessingContainer/LogGroup", "children": { "Resource": { "id": "Resource", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/QueueProcessingContainer/LogGroup/Resource", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingTaskDef/QueueProcessingContainer/LogGroup/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::Logs::LogGroup", "aws:cdk:cloudformation:props": {} @@ -964,11 +964,11 @@ }, "ExecutionRole": { "id": "ExecutionRole", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/ExecutionRole", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingTaskDef/ExecutionRole", "children": { "ImportExecutionRole": { "id": "ImportExecutionRole", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/ExecutionRole/ImportExecutionRole", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingTaskDef/ExecutionRole/ImportExecutionRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", "version": "0.0.0" @@ -976,7 +976,7 @@ }, "Resource": { "id": "Resource", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/ExecutionRole/Resource", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingTaskDef/ExecutionRole/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::IAM::Role", "aws:cdk:cloudformation:props": { @@ -1001,11 +1001,11 @@ }, "DefaultPolicy": { "id": "DefaultPolicy", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/ExecutionRole/DefaultPolicy", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingTaskDef/ExecutionRole/DefaultPolicy", "children": { "Resource": { "id": "Resource", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/ExecutionRole/DefaultPolicy/Resource", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingTaskDef/ExecutionRole/DefaultPolicy/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::IAM::Policy", "aws:cdk:cloudformation:props": { @@ -1055,7 +1055,7 @@ "Effect": "Allow", "Resource": { "Fn::GetAtt": [ - "PublicQueueServiceQueueProcessingTaskDefQueueProcessingContainerLogGroupCFF67B64", + "awsecspatternsqueuecustomcpuscalingQueueProcessingTaskDefQueueProcessingContainerLogGroup706DABB2", "Arn" ] } @@ -1063,10 +1063,10 @@ ], "Version": "2012-10-17" }, - "policyName": "PublicQueueServiceQueueProcessingTaskDefExecutionRoleDefaultPolicyD7FF680F", + "policyName": "awsecspatternsqueuecustomcpuscalingQueueProcessingTaskDefExecutionRoleDefaultPolicy25E1F570", "roles": [ { - "Ref": "PublicQueueServiceQueueProcessingTaskDefExecutionRoleE22721BA" + "Ref": "awsecspatternsqueuecustomcpuscalingQueueProcessingTaskDefExecutionRole3F91D316" } ] } @@ -1096,11 +1096,11 @@ }, "QueueProcessingFargateService": { "id": "QueueProcessingFargateService", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingFargateService", "children": { "Service": { "id": "Service", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/Service", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingFargateService/Service", "attributes": { "aws:cdk:cloudformation:type": "AWS::ECS::Service", "aws:cdk:cloudformation:props": { @@ -1132,7 +1132,7 @@ "securityGroups": [ { "Fn::GetAtt": [ - "PublicQueueServiceQueueProcessingFargateServiceSecurityGroupFC07A65A", + "awsecspatternsqueuecustomcpuscalingQueueProcessingFargateServiceSecurityGroup48C94096", "GroupId" ] } @@ -1140,7 +1140,7 @@ } }, "taskDefinition": { - "Ref": "PublicQueueServiceQueueProcessingTaskDef858327F6" + "Ref": "awsecspatternsqueuecustomcpuscalingQueueProcessingTaskDef7D327EDA" } } }, @@ -1151,15 +1151,15 @@ }, "SecurityGroup": { "id": "SecurityGroup", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/SecurityGroup", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingFargateService/SecurityGroup", "children": { "Resource": { "id": "Resource", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/SecurityGroup/Resource", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingFargateService/SecurityGroup/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::SecurityGroup", "aws:cdk:cloudformation:props": { - "groupDescription": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/SecurityGroup", + "groupDescription": "aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingFargateService/SecurityGroup", "securityGroupEgress": [ { "cidrIp": "0.0.0.0/0", @@ -1185,7 +1185,7 @@ }, "ScalingRole": { "id": "ScalingRole", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/ScalingRole", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingFargateService/ScalingRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", "version": "0.0.0" @@ -1193,15 +1193,15 @@ }, "TaskCount": { "id": "TaskCount", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingFargateService/TaskCount", "children": { "Target": { "id": "Target", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingFargateService/TaskCount/Target", "children": { "Resource": { "id": "Resource", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/Resource", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingFargateService/TaskCount/Target/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::ApplicationAutoScaling::ScalableTarget", "aws:cdk:cloudformation:props": { @@ -1218,7 +1218,7 @@ "/", { "Fn::GetAtt": [ - "PublicQueueServiceQueueProcessingFargateService7DE3D65B", + "awsecspatternsqueuecustomcpuscalingQueueProcessingFargateService88A0B9F9", "Name" ] } @@ -1252,18 +1252,18 @@ }, "CpuScaling": { "id": "CpuScaling", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/CpuScaling", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingFargateService/TaskCount/Target/CpuScaling", "children": { "Resource": { "id": "Resource", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/CpuScaling/Resource", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingFargateService/TaskCount/Target/CpuScaling/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::ApplicationAutoScaling::ScalingPolicy", "aws:cdk:cloudformation:props": { - "policyName": "awsecspatternsqueuepublicPublicQueueServiceQueueProcessingFargateServiceTaskCountTargetCpuScalingF36D44B7", + "policyName": "awsecspatternsqueuecustomcpuscalingQueueProcessingFargateServiceTaskCountTargetCpuScaling743D6A56", "policyType": "TargetTrackingScaling", "scalingTargetId": { - "Ref": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetE040C118" + "Ref": "awsecspatternsqueuecustomcpuscalingQueueProcessingFargateServiceTaskCountTargetEA4C3C9A" }, "targetTrackingScalingPolicyConfiguration": { "predefinedMetricSpecification": { @@ -1286,22 +1286,22 @@ }, "QueueMessagesVisibleScaling": { "id": "QueueMessagesVisibleScaling", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling", "children": { "LowerPolicy": { "id": "LowerPolicy", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/LowerPolicy", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/LowerPolicy", "children": { "Resource": { "id": "Resource", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/LowerPolicy/Resource", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/LowerPolicy/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::ApplicationAutoScaling::ScalingPolicy", "aws:cdk:cloudformation:props": { - "policyName": "awsecspatternsqueuepublicPublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerPolicy2DB1A503", + "policyName": "awsecspatternsqueuecustomcpuscalingQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerPolicy592B357B", "policyType": "StepScaling", "scalingTargetId": { - "Ref": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetE040C118" + "Ref": "awsecspatternsqueuecustomcpuscalingQueueProcessingFargateServiceTaskCountTargetEA4C3C9A" }, "stepScalingPolicyConfiguration": { "adjustmentType": "ChangeInCapacity", @@ -1328,17 +1328,17 @@ }, "LowerAlarm": { "id": "LowerAlarm", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/LowerAlarm", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/LowerAlarm", "children": { "Resource": { "id": "Resource", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/LowerAlarm/Resource", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/LowerAlarm/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::CloudWatch::Alarm", "aws:cdk:cloudformation:props": { "alarmActions": [ { - "Ref": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerPolicyB2B27FF9" + "Ref": "awsecspatternsqueuecustomcpuscalingQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerPolicy081DB979" } ], "alarmDescription": "Lower threshold scaling alarm", @@ -1348,7 +1348,7 @@ "name": "QueueName", "value": { "Fn::GetAtt": [ - "PublicQueueServiceEcsProcessingQueue84CD309D", + "awsecspatternsqueuecustomcpuscalingEcsProcessingQueue2AF4CB2C", "QueueName" ] } @@ -1375,18 +1375,18 @@ }, "UpperPolicy": { "id": "UpperPolicy", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/UpperPolicy", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/UpperPolicy", "children": { "Resource": { "id": "Resource", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/UpperPolicy/Resource", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/UpperPolicy/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::ApplicationAutoScaling::ScalingPolicy", "aws:cdk:cloudformation:props": { - "policyName": "awsecspatternsqueuepublicPublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperPolicy89C3D196", + "policyName": "awsecspatternsqueuecustomcpuscalingQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperPolicyA55AB219", "policyType": "StepScaling", "scalingTargetId": { - "Ref": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetE040C118" + "Ref": "awsecspatternsqueuecustomcpuscalingQueueProcessingFargateServiceTaskCountTargetEA4C3C9A" }, "stepScalingPolicyConfiguration": { "adjustmentType": "ChangeInCapacity", @@ -1418,17 +1418,17 @@ }, "UpperAlarm": { "id": "UpperAlarm", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/UpperAlarm", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/UpperAlarm", "children": { "Resource": { "id": "Resource", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/UpperAlarm/Resource", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/aws-ecs-patterns-queue-custom-cpu-scaling/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/UpperAlarm/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::CloudWatch::Alarm", "aws:cdk:cloudformation:props": { "alarmActions": [ { - "Ref": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperPolicyDCB40C8A" + "Ref": "awsecspatternsqueuecustomcpuscalingQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperPolicyF6102775" } ], "alarmDescription": "Upper threshold scaling alarm", @@ -1438,7 +1438,7 @@ "name": "QueueName", "value": { "Fn::GetAtt": [ - "PublicQueueServiceEcsProcessingQueue84CD309D", + "awsecspatternsqueuecustomcpuscalingEcsProcessingQueue2AF4CB2C", "QueueName" ] } @@ -1495,11 +1495,11 @@ }, "EcsDefaultClusterMnL3mNNYNVPC": { "id": "EcsDefaultClusterMnL3mNNYNVPC", - "path": "aws-ecs-patterns-queue-public/EcsDefaultClusterMnL3mNNYNVPC", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/EcsDefaultClusterMnL3mNNYNVPC", "children": { "Resource": { "id": "Resource", - "path": "aws-ecs-patterns-queue-public/EcsDefaultClusterMnL3mNNYNVPC/Resource", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/EcsDefaultClusterMnL3mNNYNVPC/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::ECS::Cluster", "aws:cdk:cloudformation:props": {} @@ -1517,7 +1517,7 @@ }, "BootstrapVersion": { "id": "BootstrapVersion", - "path": "aws-ecs-patterns-queue-public/BootstrapVersion", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", "version": "0.0.0" @@ -1525,7 +1525,7 @@ }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", - "path": "aws-ecs-patterns-queue-public/CheckBootstrapVersion", + "path": "aws-ecs-patterns-queue-custom-cpu-scaling/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", "version": "0.0.0" @@ -1537,17 +1537,17 @@ "version": "0.0.0" } }, - "publicQueueProcessingFargateServiceTest": { - "id": "publicQueueProcessingFargateServiceTest", - "path": "publicQueueProcessingFargateServiceTest", + "customCpuScalingQueueProcessingFargateServiceTest": { + "id": "customCpuScalingQueueProcessingFargateServiceTest", + "path": "customCpuScalingQueueProcessingFargateServiceTest", "children": { "DefaultTest": { "id": "DefaultTest", - "path": "publicQueueProcessingFargateServiceTest/DefaultTest", + "path": "customCpuScalingQueueProcessingFargateServiceTest/DefaultTest", "children": { "Default": { "id": "Default", - "path": "publicQueueProcessingFargateServiceTest/DefaultTest/Default", + "path": "customCpuScalingQueueProcessingFargateServiceTest/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", "version": "10.3.0" @@ -1555,11 +1555,11 @@ }, "DeployAssert": { "id": "DeployAssert", - "path": "publicQueueProcessingFargateServiceTest/DefaultTest/DeployAssert", + "path": "customCpuScalingQueueProcessingFargateServiceTest/DefaultTest/DeployAssert", "children": { "BootstrapVersion": { "id": "BootstrapVersion", - "path": "publicQueueProcessingFargateServiceTest/DefaultTest/DeployAssert/BootstrapVersion", + "path": "customCpuScalingQueueProcessingFargateServiceTest/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", "version": "0.0.0" @@ -1567,7 +1567,7 @@ }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", - "path": "publicQueueProcessingFargateServiceTest/DefaultTest/DeployAssert/CheckBootstrapVersion", + "path": "customCpuScalingQueueProcessingFargateServiceTest/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", "version": "0.0.0" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.ts index db3436d4e3632..a1bd11b6c8b8b 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.ts @@ -6,10 +6,10 @@ import * as integ from '@aws-cdk/integ-tests-alpha'; import { QueueProcessingFargateService } from 'aws-cdk-lib/aws-ecs-patterns'; const app = new App(); -const stack = new Stack(app, 'aws-ecs-patterns-queue-public'); +const stack = new Stack(app, 'aws-ecs-patterns-queue-custom-cpu-scaling'); const vpc = new ec2.Vpc(stack, 'VPC', { restrictDefaultSecurityGroup: false }); -new QueueProcessingFargateService(stack, 'PublicQueueService', { +new QueueProcessingFargateService(stack, 'aws-ecs-patterns-queue-custom-cpu-scaling', { vpc, memoryLimitMiB: 512, image: new ecs.AssetImage(path.join(__dirname, '..', 'sqs-reader')), @@ -17,7 +17,7 @@ new QueueProcessingFargateService(stack, 'PublicQueueService', { cpuTargetUtilizationPercent: 90, }); -new integ.IntegTest(app, 'publicQueueProcessingFargateServiceTest', { +new integ.IntegTest(app, 'customCpuScalingQueueProcessingFargateServiceTest', { testCases: [stack], }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/asset.497b192764e66ae2955bba8dff8487b11aaaaf904414455868e2560e31f47211/Dockerfile b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/asset.8be39d348c20f7e58a373abbd1152069e18da130e51bf52c89bd82a38d0e51d7/Dockerfile similarity index 76% rename from packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/asset.497b192764e66ae2955bba8dff8487b11aaaaf904414455868e2560e31f47211/Dockerfile rename to packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/asset.8be39d348c20f7e58a373abbd1152069e18da130e51bf52c89bd82a38d0e51d7/Dockerfile index a57d7f921cd45..cb97d79b264ce 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/asset.497b192764e66ae2955bba8dff8487b11aaaaf904414455868e2560e31f47211/Dockerfile +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/asset.8be39d348c20f7e58a373abbd1152069e18da130e51bf52c89bd82a38d0e51d7/Dockerfile @@ -7,4 +7,4 @@ ENV QUEUE_NAME $QUEUE_NAME WORKDIR /src ADD . /src -ENTRYPOINT ["python3", "index.py"] +ENTRYPOINT ["python3","index.py"] diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/asset.497b192764e66ae2955bba8dff8487b11aaaaf904414455868e2560e31f47211/index.py b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/asset.8be39d348c20f7e58a373abbd1152069e18da130e51bf52c89bd82a38d0e51d7/index.py similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/asset.497b192764e66ae2955bba8dff8487b11aaaaf904414455868e2560e31f47211/index.py rename to packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/asset.8be39d348c20f7e58a373abbd1152069e18da130e51bf52c89bd82a38d0e51d7/index.py diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/aws-ecs-patterns-queue-public.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/aws-ecs-patterns-queue-no-cpu-scaling.assets.json similarity index 61% rename from packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/aws-ecs-patterns-queue-public.assets.json rename to packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/aws-ecs-patterns-queue-no-cpu-scaling.assets.json index 047105d8db592..9b1b4c087badb 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/aws-ecs-patterns-queue-public.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/aws-ecs-patterns-queue-no-cpu-scaling.assets.json @@ -1,29 +1,29 @@ { "version": "35.0.0", "files": { - "de27e0196849f378a6db88b6e11fa6815affcc924c483173a0c4673bf725f76c": { + "ed04a572a615b5b3c73d8d5a4f2ec2099e056827facc63c4cfe504e6d0640065": { "source": { - "path": "aws-ecs-patterns-queue-public.template.json", + "path": "aws-ecs-patterns-queue-no-cpu-scaling.template.json", "packaging": "file" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "de27e0196849f378a6db88b6e11fa6815affcc924c483173a0c4673bf725f76c.json", + "objectKey": "ed04a572a615b5b3c73d8d5a4f2ec2099e056827facc63c4cfe504e6d0640065.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } } }, "dockerImages": { - "497b192764e66ae2955bba8dff8487b11aaaaf904414455868e2560e31f47211": { + "8be39d348c20f7e58a373abbd1152069e18da130e51bf52c89bd82a38d0e51d7": { "source": { - "directory": "asset.497b192764e66ae2955bba8dff8487b11aaaaf904414455868e2560e31f47211" + "directory": "asset.8be39d348c20f7e58a373abbd1152069e18da130e51bf52c89bd82a38d0e51d7" }, "destinations": { "current_account-current_region": { "repositoryName": "cdk-hnb659fds-container-assets-${AWS::AccountId}-${AWS::Region}", - "imageTag": "497b192764e66ae2955bba8dff8487b11aaaaf904414455868e2560e31f47211", + "imageTag": "8be39d348c20f7e58a373abbd1152069e18da130e51bf52c89bd82a38d0e51d7", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-image-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/aws-ecs-patterns-queue-public.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/aws-ecs-patterns-queue-no-cpu-scaling.template.json similarity index 71% rename from packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/aws-ecs-patterns-queue-public.template.json rename to packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/aws-ecs-patterns-queue-no-cpu-scaling.template.json index 32dfaa117d64e..e51ffe313577c 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/aws-ecs-patterns-queue-public.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/aws-ecs-patterns-queue-no-cpu-scaling.template.json @@ -10,7 +10,7 @@ "Tags": [ { "Key": "Name", - "Value": "aws-ecs-patterns-queue-public/VPC" + "Value": "aws-ecs-patterns-queue-no-cpu-scaling/VPC" } ] } @@ -39,7 +39,7 @@ }, { "Key": "Name", - "Value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1" + "Value": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PublicSubnet1" } ], "VpcId": { @@ -53,7 +53,7 @@ "Tags": [ { "Key": "Name", - "Value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1" + "Value": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PublicSubnet1" } ], "VpcId": { @@ -94,7 +94,7 @@ "Tags": [ { "Key": "Name", - "Value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1" + "Value": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PublicSubnet1" } ] } @@ -114,7 +114,7 @@ "Tags": [ { "Key": "Name", - "Value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1" + "Value": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PublicSubnet1" } ] }, @@ -147,7 +147,7 @@ }, { "Key": "Name", - "Value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2" + "Value": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PublicSubnet2" } ], "VpcId": { @@ -161,7 +161,7 @@ "Tags": [ { "Key": "Name", - "Value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2" + "Value": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PublicSubnet2" } ], "VpcId": { @@ -202,7 +202,7 @@ "Tags": [ { "Key": "Name", - "Value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2" + "Value": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PublicSubnet2" } ] } @@ -222,7 +222,7 @@ "Tags": [ { "Key": "Name", - "Value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2" + "Value": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PublicSubnet2" } ] }, @@ -255,7 +255,7 @@ }, { "Key": "Name", - "Value": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet1" + "Value": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PrivateSubnet1" } ], "VpcId": { @@ -269,7 +269,7 @@ "Tags": [ { "Key": "Name", - "Value": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet1" + "Value": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PrivateSubnet1" } ], "VpcId": { @@ -324,7 +324,7 @@ }, { "Key": "Name", - "Value": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet2" + "Value": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PrivateSubnet2" } ], "VpcId": { @@ -338,7 +338,7 @@ "Tags": [ { "Key": "Name", - "Value": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet2" + "Value": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PrivateSubnet2" } ], "VpcId": { @@ -375,7 +375,7 @@ "Tags": [ { "Key": "Name", - "Value": "aws-ecs-patterns-queue-public/VPC" + "Value": "aws-ecs-patterns-queue-no-cpu-scaling/VPC" } ] } @@ -391,7 +391,7 @@ } } }, - "PublicQueueServiceEcsProcessingDeadLetterQueueBC492277": { + "awsecspatternsqueuenocpuscalingEcsProcessingDeadLetterQueue00A254F5": { "Type": "AWS::SQS::Queue", "Properties": { "MessageRetentionPeriod": 1209600 @@ -399,13 +399,13 @@ "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" }, - "PublicQueueServiceEcsProcessingQueue84CD309D": { + "awsecspatternsqueuenocpuscalingEcsProcessingQueue52AE8DE5": { "Type": "AWS::SQS::Queue", "Properties": { "RedrivePolicy": { "deadLetterTargetArn": { "Fn::GetAtt": [ - "PublicQueueServiceEcsProcessingDeadLetterQueueBC492277", + "awsecspatternsqueuenocpuscalingEcsProcessingDeadLetterQueue00A254F5", "Arn" ] }, @@ -415,7 +415,7 @@ "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" }, - "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F": { + "awsecspatternsqueuenocpuscalingQueueProcessingTaskDefTaskRole32D98F08": { "Type": "AWS::IAM::Role", "Properties": { "AssumeRolePolicyDocument": { @@ -432,7 +432,7 @@ } } }, - "PublicQueueServiceQueueProcessingTaskDefTaskRoleDefaultPolicy5417957C": { + "awsecspatternsqueuenocpuscalingQueueProcessingTaskDefTaskRoleDefaultPolicy07A2DF7A": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -448,7 +448,7 @@ "Effect": "Allow", "Resource": { "Fn::GetAtt": [ - "PublicQueueServiceEcsProcessingQueue84CD309D", + "awsecspatternsqueuenocpuscalingEcsProcessingQueue52AE8DE5", "Arn" ] } @@ -456,15 +456,15 @@ ], "Version": "2012-10-17" }, - "PolicyName": "PublicQueueServiceQueueProcessingTaskDefTaskRoleDefaultPolicy5417957C", + "PolicyName": "awsecspatternsqueuenocpuscalingQueueProcessingTaskDefTaskRoleDefaultPolicy07A2DF7A", "Roles": [ { - "Ref": "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F" + "Ref": "awsecspatternsqueuenocpuscalingQueueProcessingTaskDefTaskRole32D98F08" } ] } }, - "PublicQueueServiceQueueProcessingTaskDef858327F6": { + "awsecspatternsqueuenocpuscalingQueueProcessingTaskDef33911003": { "Type": "AWS::ECS::TaskDefinition", "Properties": { "ContainerDefinitions": [ @@ -474,7 +474,7 @@ "Name": "QUEUE_NAME", "Value": { "Fn::GetAtt": [ - "PublicQueueServiceEcsProcessingQueue84CD309D", + "awsecspatternsqueuenocpuscalingEcsProcessingQueue52AE8DE5", "QueueName" ] } @@ -482,15 +482,15 @@ ], "Essential": true, "Image": { - "Fn::Sub": "${AWS::AccountId}.dkr.ecr.${AWS::Region}.${AWS::URLSuffix}/cdk-hnb659fds-container-assets-${AWS::AccountId}-${AWS::Region}:497b192764e66ae2955bba8dff8487b11aaaaf904414455868e2560e31f47211" + "Fn::Sub": "${AWS::AccountId}.dkr.ecr.${AWS::Region}.${AWS::URLSuffix}/cdk-hnb659fds-container-assets-${AWS::AccountId}-${AWS::Region}:8be39d348c20f7e58a373abbd1152069e18da130e51bf52c89bd82a38d0e51d7" }, "LogConfiguration": { "LogDriver": "awslogs", "Options": { "awslogs-group": { - "Ref": "PublicQueueServiceQueueProcessingTaskDefQueueProcessingContainerLogGroupCFF67B64" + "Ref": "awsecspatternsqueuenocpuscalingQueueProcessingTaskDefQueueProcessingContainerLogGroupD037396C" }, - "awslogs-stream-prefix": "PublicQueueService", + "awslogs-stream-prefix": "aws-ecs-patterns-queue-no-cpu-scaling", "awslogs-region": { "Ref": "AWS::Region" } @@ -502,11 +502,11 @@ "Cpu": "256", "ExecutionRoleArn": { "Fn::GetAtt": [ - "PublicQueueServiceQueueProcessingTaskDefExecutionRoleE22721BA", + "awsecspatternsqueuenocpuscalingQueueProcessingTaskDefExecutionRole7DE7E444", "Arn" ] }, - "Family": "awsecspatternsqueuepublicPublicQueueServiceQueueProcessingTaskDefB3738118", + "Family": "awsecspatternsqueuenocpuscalingQueueProcessingTaskDef737B9146", "Memory": "512", "NetworkMode": "awsvpc", "RequiresCompatibilities": [ @@ -514,18 +514,18 @@ ], "TaskRoleArn": { "Fn::GetAtt": [ - "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F", + "awsecspatternsqueuenocpuscalingQueueProcessingTaskDefTaskRole32D98F08", "Arn" ] } } }, - "PublicQueueServiceQueueProcessingTaskDefQueueProcessingContainerLogGroupCFF67B64": { + "awsecspatternsqueuenocpuscalingQueueProcessingTaskDefQueueProcessingContainerLogGroupD037396C": { "Type": "AWS::Logs::LogGroup", "UpdateReplacePolicy": "Retain", "DeletionPolicy": "Retain" }, - "PublicQueueServiceQueueProcessingTaskDefExecutionRoleE22721BA": { + "awsecspatternsqueuenocpuscalingQueueProcessingTaskDefExecutionRole7DE7E444": { "Type": "AWS::IAM::Role", "Properties": { "AssumeRolePolicyDocument": { @@ -542,7 +542,7 @@ } } }, - "PublicQueueServiceQueueProcessingTaskDefExecutionRoleDefaultPolicyD7FF680F": { + "awsecspatternsqueuenocpuscalingQueueProcessingTaskDefExecutionRoleDefaultPolicyDE7E0B22": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -591,7 +591,7 @@ "Effect": "Allow", "Resource": { "Fn::GetAtt": [ - "PublicQueueServiceQueueProcessingTaskDefQueueProcessingContainerLogGroupCFF67B64", + "awsecspatternsqueuenocpuscalingQueueProcessingTaskDefQueueProcessingContainerLogGroupD037396C", "Arn" ] } @@ -599,15 +599,15 @@ ], "Version": "2012-10-17" }, - "PolicyName": "PublicQueueServiceQueueProcessingTaskDefExecutionRoleDefaultPolicyD7FF680F", + "PolicyName": "awsecspatternsqueuenocpuscalingQueueProcessingTaskDefExecutionRoleDefaultPolicyDE7E0B22", "Roles": [ { - "Ref": "PublicQueueServiceQueueProcessingTaskDefExecutionRoleE22721BA" + "Ref": "awsecspatternsqueuenocpuscalingQueueProcessingTaskDefExecutionRole7DE7E444" } ] } }, - "PublicQueueServiceQueueProcessingFargateService7DE3D65B": { + "awsecspatternsqueuenocpuscalingQueueProcessingFargateService2D3CD1AE": { "Type": "AWS::ECS::Service", "Properties": { "Cluster": { @@ -630,7 +630,7 @@ "SecurityGroups": [ { "Fn::GetAtt": [ - "PublicQueueServiceQueueProcessingFargateServiceSecurityGroupFC07A65A", + "awsecspatternsqueuenocpuscalingQueueProcessingFargateServiceSecurityGroupE40A7C91", "GroupId" ] } @@ -646,18 +646,18 @@ } }, "TaskDefinition": { - "Ref": "PublicQueueServiceQueueProcessingTaskDef858327F6" + "Ref": "awsecspatternsqueuenocpuscalingQueueProcessingTaskDef33911003" } }, "DependsOn": [ - "PublicQueueServiceQueueProcessingTaskDefTaskRoleDefaultPolicy5417957C", - "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F" + "awsecspatternsqueuenocpuscalingQueueProcessingTaskDefTaskRoleDefaultPolicy07A2DF7A", + "awsecspatternsqueuenocpuscalingQueueProcessingTaskDefTaskRole32D98F08" ] }, - "PublicQueueServiceQueueProcessingFargateServiceSecurityGroupFC07A65A": { + "awsecspatternsqueuenocpuscalingQueueProcessingFargateServiceSecurityGroupE40A7C91": { "Type": "AWS::EC2::SecurityGroup", "Properties": { - "GroupDescription": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/SecurityGroup", + "GroupDescription": "aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/QueueProcessingFargateService/SecurityGroup", "SecurityGroupEgress": [ { "CidrIp": "0.0.0.0/0", @@ -670,11 +670,11 @@ } }, "DependsOn": [ - "PublicQueueServiceQueueProcessingTaskDefTaskRoleDefaultPolicy5417957C", - "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F" + "awsecspatternsqueuenocpuscalingQueueProcessingTaskDefTaskRoleDefaultPolicy07A2DF7A", + "awsecspatternsqueuenocpuscalingQueueProcessingTaskDefTaskRole32D98F08" ] }, - "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetE040C118": { + "awsecspatternsqueuenocpuscalingQueueProcessingFargateServiceTaskCountTargetAF622EF9": { "Type": "AWS::ApplicationAutoScaling::ScalableTarget", "Properties": { "MaxCapacity": 2, @@ -690,7 +690,7 @@ "/", { "Fn::GetAtt": [ - "PublicQueueServiceQueueProcessingFargateService7DE3D65B", + "awsecspatternsqueuenocpuscalingQueueProcessingFargateService2D3CD1AE", "Name" ] } @@ -717,17 +717,17 @@ "ServiceNamespace": "ecs" }, "DependsOn": [ - "PublicQueueServiceQueueProcessingTaskDefTaskRoleDefaultPolicy5417957C", - "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F" + "awsecspatternsqueuenocpuscalingQueueProcessingTaskDefTaskRoleDefaultPolicy07A2DF7A", + "awsecspatternsqueuenocpuscalingQueueProcessingTaskDefTaskRole32D98F08" ] }, - "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerPolicyB2B27FF9": { + "awsecspatternsqueuenocpuscalingQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerPolicy0A2D0ED3": { "Type": "AWS::ApplicationAutoScaling::ScalingPolicy", "Properties": { - "PolicyName": "awsecspatternsqueuepublicPublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerPolicy2DB1A503", + "PolicyName": "awsecspatternsqueuenocpuscalingQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerPolicyC9FD3BAC", "PolicyType": "StepScaling", "ScalingTargetId": { - "Ref": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetE040C118" + "Ref": "awsecspatternsqueuenocpuscalingQueueProcessingFargateServiceTaskCountTargetAF622EF9" }, "StepScalingPolicyConfiguration": { "AdjustmentType": "ChangeInCapacity", @@ -741,16 +741,16 @@ } }, "DependsOn": [ - "PublicQueueServiceQueueProcessingTaskDefTaskRoleDefaultPolicy5417957C", - "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F" + "awsecspatternsqueuenocpuscalingQueueProcessingTaskDefTaskRoleDefaultPolicy07A2DF7A", + "awsecspatternsqueuenocpuscalingQueueProcessingTaskDefTaskRole32D98F08" ] }, - "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerAlarm5782C233": { + "awsecspatternsqueuenocpuscalingQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerAlarm9B53E90C": { "Type": "AWS::CloudWatch::Alarm", "Properties": { "AlarmActions": [ { - "Ref": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerPolicyB2B27FF9" + "Ref": "awsecspatternsqueuenocpuscalingQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerPolicy0A2D0ED3" } ], "AlarmDescription": "Lower threshold scaling alarm", @@ -760,7 +760,7 @@ "Name": "QueueName", "Value": { "Fn::GetAtt": [ - "PublicQueueServiceEcsProcessingQueue84CD309D", + "awsecspatternsqueuenocpuscalingEcsProcessingQueue52AE8DE5", "QueueName" ] } @@ -774,17 +774,17 @@ "Threshold": 0 }, "DependsOn": [ - "PublicQueueServiceQueueProcessingTaskDefTaskRoleDefaultPolicy5417957C", - "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F" + "awsecspatternsqueuenocpuscalingQueueProcessingTaskDefTaskRoleDefaultPolicy07A2DF7A", + "awsecspatternsqueuenocpuscalingQueueProcessingTaskDefTaskRole32D98F08" ] }, - "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperPolicyDCB40C8A": { + "awsecspatternsqueuenocpuscalingQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperPolicy33179C1A": { "Type": "AWS::ApplicationAutoScaling::ScalingPolicy", "Properties": { - "PolicyName": "awsecspatternsqueuepublicPublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperPolicy89C3D196", + "PolicyName": "awsecspatternsqueuenocpuscalingQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperPolicy2230072F", "PolicyType": "StepScaling", "ScalingTargetId": { - "Ref": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetE040C118" + "Ref": "awsecspatternsqueuenocpuscalingQueueProcessingFargateServiceTaskCountTargetAF622EF9" }, "StepScalingPolicyConfiguration": { "AdjustmentType": "ChangeInCapacity", @@ -803,16 +803,16 @@ } }, "DependsOn": [ - "PublicQueueServiceQueueProcessingTaskDefTaskRoleDefaultPolicy5417957C", - "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F" + "awsecspatternsqueuenocpuscalingQueueProcessingTaskDefTaskRoleDefaultPolicy07A2DF7A", + "awsecspatternsqueuenocpuscalingQueueProcessingTaskDefTaskRole32D98F08" ] }, - "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperAlarm5D67333D": { + "awsecspatternsqueuenocpuscalingQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperAlarm10D3781E": { "Type": "AWS::CloudWatch::Alarm", "Properties": { "AlarmActions": [ { - "Ref": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperPolicyDCB40C8A" + "Ref": "awsecspatternsqueuenocpuscalingQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperPolicy33179C1A" } ], "AlarmDescription": "Upper threshold scaling alarm", @@ -822,7 +822,7 @@ "Name": "QueueName", "Value": { "Fn::GetAtt": [ - "PublicQueueServiceEcsProcessingQueue84CD309D", + "awsecspatternsqueuenocpuscalingEcsProcessingQueue52AE8DE5", "QueueName" ] } @@ -836,8 +836,8 @@ "Threshold": 100 }, "DependsOn": [ - "PublicQueueServiceQueueProcessingTaskDefTaskRoleDefaultPolicy5417957C", - "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F" + "awsecspatternsqueuenocpuscalingQueueProcessingTaskDefTaskRoleDefaultPolicy07A2DF7A", + "awsecspatternsqueuenocpuscalingQueueProcessingTaskDefTaskRole32D98F08" ] }, "EcsDefaultClusterMnL3mNNYNVPC9C1EC7A3": { @@ -845,34 +845,34 @@ } }, "Outputs": { - "PublicQueueServiceSQSDeadLetterQueueBCE86DBC": { + "awsecspatternsqueuenocpuscalingSQSDeadLetterQueue91065018": { "Value": { "Fn::GetAtt": [ - "PublicQueueServiceEcsProcessingDeadLetterQueueBC492277", + "awsecspatternsqueuenocpuscalingEcsProcessingDeadLetterQueue00A254F5", "QueueName" ] } }, - "PublicQueueServiceSQSDeadLetterQueueArn6E134EA4": { + "awsecspatternsqueuenocpuscalingSQSDeadLetterQueueArn7947ED56": { "Value": { "Fn::GetAtt": [ - "PublicQueueServiceEcsProcessingDeadLetterQueueBC492277", + "awsecspatternsqueuenocpuscalingEcsProcessingDeadLetterQueue00A254F5", "Arn" ] } }, - "PublicQueueServiceSQSQueue4D3FBD5C": { + "awsecspatternsqueuenocpuscalingSQSQueue0875F3E7": { "Value": { "Fn::GetAtt": [ - "PublicQueueServiceEcsProcessingQueue84CD309D", + "awsecspatternsqueuenocpuscalingEcsProcessingQueue52AE8DE5", "QueueName" ] } }, - "PublicQueueServiceSQSQueueArn38014FDC": { + "awsecspatternsqueuenocpuscalingSQSQueueArn07A31821": { "Value": { "Fn::GetAtt": [ - "PublicQueueServiceEcsProcessingQueue84CD309D", + "awsecspatternsqueuenocpuscalingEcsProcessingQueue52AE8DE5", "Arn" ] } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/integ.json index 574ac4affd690..5c6b7a7613422 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/integ.json @@ -1,12 +1,12 @@ { "version": "35.0.0", "testCases": { - "publicQueueProcessingFargateServiceTest/DefaultTest": { + "noCpuScalingQueueProcessingFargateServiceTest/DefaultTest": { "stacks": [ - "aws-ecs-patterns-queue-public" + "aws-ecs-patterns-queue-no-cpu-scaling" ], - "assertionStack": "publicQueueProcessingFargateServiceTest/DefaultTest/DeployAssert", - "assertionStackName": "publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6" + "assertionStack": "noCpuScalingQueueProcessingFargateServiceTest/DefaultTest/DeployAssert", + "assertionStackName": "noCpuScalingQueueProcessingFargateServiceTestDefaultTestDeployAssertE4E4F855" } } } \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/manifest.json index 352ed12c0f352..c451d067ffd06 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/manifest.json @@ -1,28 +1,28 @@ { "version": "35.0.0", "artifacts": { - "aws-ecs-patterns-queue-public.assets": { + "aws-ecs-patterns-queue-no-cpu-scaling.assets": { "type": "cdk:asset-manifest", "properties": { - "file": "aws-ecs-patterns-queue-public.assets.json", + "file": "aws-ecs-patterns-queue-no-cpu-scaling.assets.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" } }, - "aws-ecs-patterns-queue-public": { + "aws-ecs-patterns-queue-no-cpu-scaling": { "type": "aws:cloudformation:stack", "environment": "aws://unknown-account/unknown-region", "properties": { - "templateFile": "aws-ecs-patterns-queue-public.template.json", + "templateFile": "aws-ecs-patterns-queue-no-cpu-scaling.template.json", "terminationProtection": false, "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/de27e0196849f378a6db88b6e11fa6815affcc924c483173a0c4673bf725f76c.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/ed04a572a615b5b3c73d8d5a4f2ec2099e056827facc63c4cfe504e6d0640065.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ - "aws-ecs-patterns-queue-public.assets" + "aws-ecs-patterns-queue-no-cpu-scaling.assets" ], "lookupRole": { "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", @@ -31,295 +31,295 @@ } }, "dependencies": [ - "aws-ecs-patterns-queue-public.assets" + "aws-ecs-patterns-queue-no-cpu-scaling.assets" ], "metadata": { - "/aws-ecs-patterns-queue-public/VPC/Resource": [ + "/aws-ecs-patterns-queue-no-cpu-scaling/VPC/Resource": [ { "type": "aws:cdk:logicalId", "data": "VPCB9E5F0B4" } ], - "/aws-ecs-patterns-queue-public/VPC/PublicSubnet1/Subnet": [ + "/aws-ecs-patterns-queue-no-cpu-scaling/VPC/PublicSubnet1/Subnet": [ { "type": "aws:cdk:logicalId", "data": "VPCPublicSubnet1SubnetB4246D30" } ], - "/aws-ecs-patterns-queue-public/VPC/PublicSubnet1/RouteTable": [ + "/aws-ecs-patterns-queue-no-cpu-scaling/VPC/PublicSubnet1/RouteTable": [ { "type": "aws:cdk:logicalId", "data": "VPCPublicSubnet1RouteTableFEE4B781" } ], - "/aws-ecs-patterns-queue-public/VPC/PublicSubnet1/RouteTableAssociation": [ + "/aws-ecs-patterns-queue-no-cpu-scaling/VPC/PublicSubnet1/RouteTableAssociation": [ { "type": "aws:cdk:logicalId", "data": "VPCPublicSubnet1RouteTableAssociation0B0896DC" } ], - "/aws-ecs-patterns-queue-public/VPC/PublicSubnet1/DefaultRoute": [ + "/aws-ecs-patterns-queue-no-cpu-scaling/VPC/PublicSubnet1/DefaultRoute": [ { "type": "aws:cdk:logicalId", "data": "VPCPublicSubnet1DefaultRoute91CEF279" } ], - "/aws-ecs-patterns-queue-public/VPC/PublicSubnet1/EIP": [ + "/aws-ecs-patterns-queue-no-cpu-scaling/VPC/PublicSubnet1/EIP": [ { "type": "aws:cdk:logicalId", "data": "VPCPublicSubnet1EIP6AD938E8" } ], - "/aws-ecs-patterns-queue-public/VPC/PublicSubnet1/NATGateway": [ + "/aws-ecs-patterns-queue-no-cpu-scaling/VPC/PublicSubnet1/NATGateway": [ { "type": "aws:cdk:logicalId", "data": "VPCPublicSubnet1NATGatewayE0556630" } ], - "/aws-ecs-patterns-queue-public/VPC/PublicSubnet2/Subnet": [ + "/aws-ecs-patterns-queue-no-cpu-scaling/VPC/PublicSubnet2/Subnet": [ { "type": "aws:cdk:logicalId", "data": "VPCPublicSubnet2Subnet74179F39" } ], - "/aws-ecs-patterns-queue-public/VPC/PublicSubnet2/RouteTable": [ + "/aws-ecs-patterns-queue-no-cpu-scaling/VPC/PublicSubnet2/RouteTable": [ { "type": "aws:cdk:logicalId", "data": "VPCPublicSubnet2RouteTable6F1A15F1" } ], - "/aws-ecs-patterns-queue-public/VPC/PublicSubnet2/RouteTableAssociation": [ + "/aws-ecs-patterns-queue-no-cpu-scaling/VPC/PublicSubnet2/RouteTableAssociation": [ { "type": "aws:cdk:logicalId", "data": "VPCPublicSubnet2RouteTableAssociation5A808732" } ], - "/aws-ecs-patterns-queue-public/VPC/PublicSubnet2/DefaultRoute": [ + "/aws-ecs-patterns-queue-no-cpu-scaling/VPC/PublicSubnet2/DefaultRoute": [ { "type": "aws:cdk:logicalId", "data": "VPCPublicSubnet2DefaultRouteB7481BBA" } ], - "/aws-ecs-patterns-queue-public/VPC/PublicSubnet2/EIP": [ + "/aws-ecs-patterns-queue-no-cpu-scaling/VPC/PublicSubnet2/EIP": [ { "type": "aws:cdk:logicalId", "data": "VPCPublicSubnet2EIP4947BC00" } ], - "/aws-ecs-patterns-queue-public/VPC/PublicSubnet2/NATGateway": [ + "/aws-ecs-patterns-queue-no-cpu-scaling/VPC/PublicSubnet2/NATGateway": [ { "type": "aws:cdk:logicalId", "data": "VPCPublicSubnet2NATGateway3C070193" } ], - "/aws-ecs-patterns-queue-public/VPC/PrivateSubnet1/Subnet": [ + "/aws-ecs-patterns-queue-no-cpu-scaling/VPC/PrivateSubnet1/Subnet": [ { "type": "aws:cdk:logicalId", "data": "VPCPrivateSubnet1Subnet8BCA10E0" } ], - "/aws-ecs-patterns-queue-public/VPC/PrivateSubnet1/RouteTable": [ + "/aws-ecs-patterns-queue-no-cpu-scaling/VPC/PrivateSubnet1/RouteTable": [ { "type": "aws:cdk:logicalId", "data": "VPCPrivateSubnet1RouteTableBE8A6027" } ], - "/aws-ecs-patterns-queue-public/VPC/PrivateSubnet1/RouteTableAssociation": [ + "/aws-ecs-patterns-queue-no-cpu-scaling/VPC/PrivateSubnet1/RouteTableAssociation": [ { "type": "aws:cdk:logicalId", "data": "VPCPrivateSubnet1RouteTableAssociation347902D1" } ], - "/aws-ecs-patterns-queue-public/VPC/PrivateSubnet1/DefaultRoute": [ + "/aws-ecs-patterns-queue-no-cpu-scaling/VPC/PrivateSubnet1/DefaultRoute": [ { "type": "aws:cdk:logicalId", "data": "VPCPrivateSubnet1DefaultRouteAE1D6490" } ], - "/aws-ecs-patterns-queue-public/VPC/PrivateSubnet2/Subnet": [ + "/aws-ecs-patterns-queue-no-cpu-scaling/VPC/PrivateSubnet2/Subnet": [ { "type": "aws:cdk:logicalId", "data": "VPCPrivateSubnet2SubnetCFCDAA7A" } ], - "/aws-ecs-patterns-queue-public/VPC/PrivateSubnet2/RouteTable": [ + "/aws-ecs-patterns-queue-no-cpu-scaling/VPC/PrivateSubnet2/RouteTable": [ { "type": "aws:cdk:logicalId", "data": "VPCPrivateSubnet2RouteTable0A19E10E" } ], - "/aws-ecs-patterns-queue-public/VPC/PrivateSubnet2/RouteTableAssociation": [ + "/aws-ecs-patterns-queue-no-cpu-scaling/VPC/PrivateSubnet2/RouteTableAssociation": [ { "type": "aws:cdk:logicalId", "data": "VPCPrivateSubnet2RouteTableAssociation0C73D413" } ], - "/aws-ecs-patterns-queue-public/VPC/PrivateSubnet2/DefaultRoute": [ + "/aws-ecs-patterns-queue-no-cpu-scaling/VPC/PrivateSubnet2/DefaultRoute": [ { "type": "aws:cdk:logicalId", "data": "VPCPrivateSubnet2DefaultRouteF4F5CFD2" } ], - "/aws-ecs-patterns-queue-public/VPC/IGW": [ + "/aws-ecs-patterns-queue-no-cpu-scaling/VPC/IGW": [ { "type": "aws:cdk:logicalId", "data": "VPCIGWB7E252D3" } ], - "/aws-ecs-patterns-queue-public/VPC/VPCGW": [ + "/aws-ecs-patterns-queue-no-cpu-scaling/VPC/VPCGW": [ { "type": "aws:cdk:logicalId", "data": "VPCVPCGW99B986DC" } ], - "/aws-ecs-patterns-queue-public/PublicQueueService/EcsProcessingDeadLetterQueue/Resource": [ + "/aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/EcsProcessingDeadLetterQueue/Resource": [ { "type": "aws:cdk:logicalId", - "data": "PublicQueueServiceEcsProcessingDeadLetterQueueBC492277" + "data": "awsecspatternsqueuenocpuscalingEcsProcessingDeadLetterQueue00A254F5" } ], - "/aws-ecs-patterns-queue-public/PublicQueueService/EcsProcessingQueue/Resource": [ + "/aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/EcsProcessingQueue/Resource": [ { "type": "aws:cdk:logicalId", - "data": "PublicQueueServiceEcsProcessingQueue84CD309D" + "data": "awsecspatternsqueuenocpuscalingEcsProcessingQueue52AE8DE5" } ], - "/aws-ecs-patterns-queue-public/PublicQueueService/SQSDeadLetterQueue": [ + "/aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/SQSDeadLetterQueue": [ { "type": "aws:cdk:logicalId", - "data": "PublicQueueServiceSQSDeadLetterQueueBCE86DBC" + "data": "awsecspatternsqueuenocpuscalingSQSDeadLetterQueue91065018" } ], - "/aws-ecs-patterns-queue-public/PublicQueueService/SQSDeadLetterQueueArn": [ + "/aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/SQSDeadLetterQueueArn": [ { "type": "aws:cdk:logicalId", - "data": "PublicQueueServiceSQSDeadLetterQueueArn6E134EA4" + "data": "awsecspatternsqueuenocpuscalingSQSDeadLetterQueueArn7947ED56" } ], - "/aws-ecs-patterns-queue-public/PublicQueueService/SQSQueue": [ + "/aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/SQSQueue": [ { "type": "aws:cdk:logicalId", - "data": "PublicQueueServiceSQSQueue4D3FBD5C" + "data": "awsecspatternsqueuenocpuscalingSQSQueue0875F3E7" } ], - "/aws-ecs-patterns-queue-public/PublicQueueService/SQSQueueArn": [ + "/aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/SQSQueueArn": [ { "type": "aws:cdk:logicalId", - "data": "PublicQueueServiceSQSQueueArn38014FDC" + "data": "awsecspatternsqueuenocpuscalingSQSQueueArn07A31821" } ], - "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/TaskRole/Resource": [ + "/aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/QueueProcessingTaskDef/TaskRole/Resource": [ { "type": "aws:cdk:logicalId", - "data": "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F" + "data": "awsecspatternsqueuenocpuscalingQueueProcessingTaskDefTaskRole32D98F08" } ], - "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/TaskRole/DefaultPolicy/Resource": [ + "/aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/QueueProcessingTaskDef/TaskRole/DefaultPolicy/Resource": [ { "type": "aws:cdk:logicalId", - "data": "PublicQueueServiceQueueProcessingTaskDefTaskRoleDefaultPolicy5417957C" + "data": "awsecspatternsqueuenocpuscalingQueueProcessingTaskDefTaskRoleDefaultPolicy07A2DF7A" } ], - "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/Resource": [ + "/aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/QueueProcessingTaskDef/Resource": [ { "type": "aws:cdk:logicalId", - "data": "PublicQueueServiceQueueProcessingTaskDef858327F6" + "data": "awsecspatternsqueuenocpuscalingQueueProcessingTaskDef33911003" } ], - "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/QueueProcessingContainer/LogGroup/Resource": [ + "/aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/QueueProcessingTaskDef/QueueProcessingContainer/LogGroup/Resource": [ { "type": "aws:cdk:logicalId", - "data": "PublicQueueServiceQueueProcessingTaskDefQueueProcessingContainerLogGroupCFF67B64" + "data": "awsecspatternsqueuenocpuscalingQueueProcessingTaskDefQueueProcessingContainerLogGroupD037396C" } ], - "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/ExecutionRole/Resource": [ + "/aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/QueueProcessingTaskDef/ExecutionRole/Resource": [ { "type": "aws:cdk:logicalId", - "data": "PublicQueueServiceQueueProcessingTaskDefExecutionRoleE22721BA" + "data": "awsecspatternsqueuenocpuscalingQueueProcessingTaskDefExecutionRole7DE7E444" } ], - "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/ExecutionRole/DefaultPolicy/Resource": [ + "/aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/QueueProcessingTaskDef/ExecutionRole/DefaultPolicy/Resource": [ { "type": "aws:cdk:logicalId", - "data": "PublicQueueServiceQueueProcessingTaskDefExecutionRoleDefaultPolicyD7FF680F" + "data": "awsecspatternsqueuenocpuscalingQueueProcessingTaskDefExecutionRoleDefaultPolicyDE7E0B22" } ], - "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/Service": [ + "/aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/QueueProcessingFargateService/Service": [ { "type": "aws:cdk:logicalId", - "data": "PublicQueueServiceQueueProcessingFargateService7DE3D65B" + "data": "awsecspatternsqueuenocpuscalingQueueProcessingFargateService2D3CD1AE" } ], - "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/SecurityGroup/Resource": [ + "/aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/QueueProcessingFargateService/SecurityGroup/Resource": [ { "type": "aws:cdk:logicalId", - "data": "PublicQueueServiceQueueProcessingFargateServiceSecurityGroupFC07A65A" + "data": "awsecspatternsqueuenocpuscalingQueueProcessingFargateServiceSecurityGroupE40A7C91" } ], - "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/Resource": [ + "/aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/QueueProcessingFargateService/TaskCount/Target/Resource": [ { "type": "aws:cdk:logicalId", - "data": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetE040C118" + "data": "awsecspatternsqueuenocpuscalingQueueProcessingFargateServiceTaskCountTargetAF622EF9" } ], - "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/LowerPolicy/Resource": [ + "/aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/LowerPolicy/Resource": [ { "type": "aws:cdk:logicalId", - "data": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerPolicyB2B27FF9" + "data": "awsecspatternsqueuenocpuscalingQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerPolicy0A2D0ED3" } ], - "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/LowerAlarm/Resource": [ + "/aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/LowerAlarm/Resource": [ { "type": "aws:cdk:logicalId", - "data": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerAlarm5782C233" + "data": "awsecspatternsqueuenocpuscalingQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerAlarm9B53E90C" } ], - "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/UpperPolicy/Resource": [ + "/aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/UpperPolicy/Resource": [ { "type": "aws:cdk:logicalId", - "data": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperPolicyDCB40C8A" + "data": "awsecspatternsqueuenocpuscalingQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperPolicy33179C1A" } ], - "/aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/UpperAlarm/Resource": [ + "/aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/UpperAlarm/Resource": [ { "type": "aws:cdk:logicalId", - "data": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperAlarm5D67333D" + "data": "awsecspatternsqueuenocpuscalingQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperAlarm10D3781E" } ], - "/aws-ecs-patterns-queue-public/EcsDefaultClusterMnL3mNNYNVPC/Resource": [ + "/aws-ecs-patterns-queue-no-cpu-scaling/EcsDefaultClusterMnL3mNNYNVPC/Resource": [ { "type": "aws:cdk:logicalId", "data": "EcsDefaultClusterMnL3mNNYNVPC9C1EC7A3" } ], - "/aws-ecs-patterns-queue-public/BootstrapVersion": [ + "/aws-ecs-patterns-queue-no-cpu-scaling/BootstrapVersion": [ { "type": "aws:cdk:logicalId", "data": "BootstrapVersion" } ], - "/aws-ecs-patterns-queue-public/CheckBootstrapVersion": [ + "/aws-ecs-patterns-queue-no-cpu-scaling/CheckBootstrapVersion": [ { "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } ] }, - "displayName": "aws-ecs-patterns-queue-public" + "displayName": "aws-ecs-patterns-queue-no-cpu-scaling" }, - "publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.assets": { + "noCpuScalingQueueProcessingFargateServiceTestDefaultTestDeployAssertE4E4F855.assets": { "type": "cdk:asset-manifest", "properties": { - "file": "publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.assets.json", + "file": "noCpuScalingQueueProcessingFargateServiceTestDefaultTestDeployAssertE4E4F855.assets.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" } }, - "publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6": { + "noCpuScalingQueueProcessingFargateServiceTestDefaultTestDeployAssertE4E4F855": { "type": "aws:cloudformation:stack", "environment": "aws://unknown-account/unknown-region", "properties": { - "templateFile": "publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.template.json", + "templateFile": "noCpuScalingQueueProcessingFargateServiceTestDefaultTestDeployAssertE4E4F855.template.json", "terminationProtection": false, "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", @@ -328,7 +328,7 @@ "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ - "publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.assets" + "noCpuScalingQueueProcessingFargateServiceTestDefaultTestDeployAssertE4E4F855.assets" ], "lookupRole": { "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", @@ -337,23 +337,23 @@ } }, "dependencies": [ - "publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.assets" + "noCpuScalingQueueProcessingFargateServiceTestDefaultTestDeployAssertE4E4F855.assets" ], "metadata": { - "/publicQueueProcessingFargateServiceTest/DefaultTest/DeployAssert/BootstrapVersion": [ + "/noCpuScalingQueueProcessingFargateServiceTest/DefaultTest/DeployAssert/BootstrapVersion": [ { "type": "aws:cdk:logicalId", "data": "BootstrapVersion" } ], - "/publicQueueProcessingFargateServiceTest/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + "/noCpuScalingQueueProcessingFargateServiceTest/DefaultTest/DeployAssert/CheckBootstrapVersion": [ { "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } ] }, - "displayName": "publicQueueProcessingFargateServiceTest/DefaultTest/DeployAssert" + "displayName": "noCpuScalingQueueProcessingFargateServiceTest/DefaultTest/DeployAssert" }, "Tree": { "type": "cdk:tree", diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/noCpuScalingQueueProcessingFargateServiceTestDefaultTestDeployAssertE4E4F855.assets.json similarity index 84% rename from packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.assets.json rename to packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/noCpuScalingQueueProcessingFargateServiceTestDefaultTestDeployAssertE4E4F855.assets.json index ee5b4c64f1c1d..d9f2ddf190f88 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/noCpuScalingQueueProcessingFargateServiceTestDefaultTestDeployAssertE4E4F855.assets.json @@ -3,7 +3,7 @@ "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { - "path": "publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.template.json", + "path": "noCpuScalingQueueProcessingFargateServiceTestDefaultTestDeployAssertE4E4F855.template.json", "packaging": "file" }, "destinations": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/noCpuScalingQueueProcessingFargateServiceTestDefaultTestDeployAssertE4E4F855.template.json similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/publicQueueProcessingFargateServiceTestDefaultTestDeployAssertD65416D6.template.json rename to packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/noCpuScalingQueueProcessingFargateServiceTestDefaultTestDeployAssertE4E4F855.template.json diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/tree.json index dc3d2ec10ed69..721af65a60822 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.js.snapshot/tree.json @@ -4,17 +4,17 @@ "id": "App", "path": "", "children": { - "aws-ecs-patterns-queue-public": { - "id": "aws-ecs-patterns-queue-public", - "path": "aws-ecs-patterns-queue-public", + "aws-ecs-patterns-queue-no-cpu-scaling": { + "id": "aws-ecs-patterns-queue-no-cpu-scaling", + "path": "aws-ecs-patterns-queue-no-cpu-scaling", "children": { "VPC": { "id": "VPC", - "path": "aws-ecs-patterns-queue-public/VPC", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/VPC", "children": { "Resource": { "id": "Resource", - "path": "aws-ecs-patterns-queue-public/VPC/Resource", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::VPC", "aws:cdk:cloudformation:props": { @@ -25,7 +25,7 @@ "tags": [ { "key": "Name", - "value": "aws-ecs-patterns-queue-public/VPC" + "value": "aws-ecs-patterns-queue-no-cpu-scaling/VPC" } ] } @@ -37,11 +37,11 @@ }, "PublicSubnet1": { "id": "PublicSubnet1", - "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PublicSubnet1", "children": { "Subnet": { "id": "Subnet", - "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1/Subnet", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PublicSubnet1/Subnet", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", "aws:cdk:cloudformation:props": { @@ -66,7 +66,7 @@ }, { "key": "Name", - "value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1" + "value": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PublicSubnet1" } ], "vpcId": { @@ -81,7 +81,7 @@ }, "Acl": { "id": "Acl", - "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1/Acl", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", "version": "0.0.0" @@ -89,14 +89,14 @@ }, "RouteTable": { "id": "RouteTable", - "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1/RouteTable", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PublicSubnet1/RouteTable", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", "aws:cdk:cloudformation:props": { "tags": [ { "key": "Name", - "value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1" + "value": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PublicSubnet1" } ], "vpcId": { @@ -111,7 +111,7 @@ }, "RouteTableAssociation": { "id": "RouteTableAssociation", - "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1/RouteTableAssociation", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PublicSubnet1/RouteTableAssociation", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", "aws:cdk:cloudformation:props": { @@ -130,7 +130,7 @@ }, "DefaultRoute": { "id": "DefaultRoute", - "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1/DefaultRoute", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PublicSubnet1/DefaultRoute", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Route", "aws:cdk:cloudformation:props": { @@ -150,7 +150,7 @@ }, "EIP": { "id": "EIP", - "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1/EIP", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PublicSubnet1/EIP", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::EIP", "aws:cdk:cloudformation:props": { @@ -158,7 +158,7 @@ "tags": [ { "key": "Name", - "value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1" + "value": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PublicSubnet1" } ] } @@ -170,7 +170,7 @@ }, "NATGateway": { "id": "NATGateway", - "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1/NATGateway", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PublicSubnet1/NATGateway", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::NatGateway", "aws:cdk:cloudformation:props": { @@ -186,7 +186,7 @@ "tags": [ { "key": "Name", - "value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet1" + "value": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PublicSubnet1" } ] } @@ -204,11 +204,11 @@ }, "PublicSubnet2": { "id": "PublicSubnet2", - "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PublicSubnet2", "children": { "Subnet": { "id": "Subnet", - "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2/Subnet", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PublicSubnet2/Subnet", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", "aws:cdk:cloudformation:props": { @@ -233,7 +233,7 @@ }, { "key": "Name", - "value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2" + "value": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PublicSubnet2" } ], "vpcId": { @@ -248,7 +248,7 @@ }, "Acl": { "id": "Acl", - "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2/Acl", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", "version": "0.0.0" @@ -256,14 +256,14 @@ }, "RouteTable": { "id": "RouteTable", - "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2/RouteTable", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PublicSubnet2/RouteTable", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", "aws:cdk:cloudformation:props": { "tags": [ { "key": "Name", - "value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2" + "value": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PublicSubnet2" } ], "vpcId": { @@ -278,7 +278,7 @@ }, "RouteTableAssociation": { "id": "RouteTableAssociation", - "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2/RouteTableAssociation", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PublicSubnet2/RouteTableAssociation", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", "aws:cdk:cloudformation:props": { @@ -297,7 +297,7 @@ }, "DefaultRoute": { "id": "DefaultRoute", - "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2/DefaultRoute", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PublicSubnet2/DefaultRoute", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Route", "aws:cdk:cloudformation:props": { @@ -317,7 +317,7 @@ }, "EIP": { "id": "EIP", - "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2/EIP", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PublicSubnet2/EIP", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::EIP", "aws:cdk:cloudformation:props": { @@ -325,7 +325,7 @@ "tags": [ { "key": "Name", - "value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2" + "value": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PublicSubnet2" } ] } @@ -337,7 +337,7 @@ }, "NATGateway": { "id": "NATGateway", - "path": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2/NATGateway", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PublicSubnet2/NATGateway", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::NatGateway", "aws:cdk:cloudformation:props": { @@ -353,7 +353,7 @@ "tags": [ { "key": "Name", - "value": "aws-ecs-patterns-queue-public/VPC/PublicSubnet2" + "value": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PublicSubnet2" } ] } @@ -371,11 +371,11 @@ }, "PrivateSubnet1": { "id": "PrivateSubnet1", - "path": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet1", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PrivateSubnet1", "children": { "Subnet": { "id": "Subnet", - "path": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet1/Subnet", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PrivateSubnet1/Subnet", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", "aws:cdk:cloudformation:props": { @@ -400,7 +400,7 @@ }, { "key": "Name", - "value": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet1" + "value": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PrivateSubnet1" } ], "vpcId": { @@ -415,7 +415,7 @@ }, "Acl": { "id": "Acl", - "path": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet1/Acl", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", "version": "0.0.0" @@ -423,14 +423,14 @@ }, "RouteTable": { "id": "RouteTable", - "path": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet1/RouteTable", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PrivateSubnet1/RouteTable", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", "aws:cdk:cloudformation:props": { "tags": [ { "key": "Name", - "value": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet1" + "value": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PrivateSubnet1" } ], "vpcId": { @@ -445,7 +445,7 @@ }, "RouteTableAssociation": { "id": "RouteTableAssociation", - "path": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet1/RouteTableAssociation", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PrivateSubnet1/RouteTableAssociation", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", "aws:cdk:cloudformation:props": { @@ -464,7 +464,7 @@ }, "DefaultRoute": { "id": "DefaultRoute", - "path": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet1/DefaultRoute", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PrivateSubnet1/DefaultRoute", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Route", "aws:cdk:cloudformation:props": { @@ -490,11 +490,11 @@ }, "PrivateSubnet2": { "id": "PrivateSubnet2", - "path": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet2", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PrivateSubnet2", "children": { "Subnet": { "id": "Subnet", - "path": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet2/Subnet", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PrivateSubnet2/Subnet", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", "aws:cdk:cloudformation:props": { @@ -519,7 +519,7 @@ }, { "key": "Name", - "value": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet2" + "value": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PrivateSubnet2" } ], "vpcId": { @@ -534,7 +534,7 @@ }, "Acl": { "id": "Acl", - "path": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet2/Acl", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", "version": "0.0.0" @@ -542,14 +542,14 @@ }, "RouteTable": { "id": "RouteTable", - "path": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet2/RouteTable", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PrivateSubnet2/RouteTable", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", "aws:cdk:cloudformation:props": { "tags": [ { "key": "Name", - "value": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet2" + "value": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PrivateSubnet2" } ], "vpcId": { @@ -564,7 +564,7 @@ }, "RouteTableAssociation": { "id": "RouteTableAssociation", - "path": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet2/RouteTableAssociation", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PrivateSubnet2/RouteTableAssociation", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", "aws:cdk:cloudformation:props": { @@ -583,7 +583,7 @@ }, "DefaultRoute": { "id": "DefaultRoute", - "path": "aws-ecs-patterns-queue-public/VPC/PrivateSubnet2/DefaultRoute", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/PrivateSubnet2/DefaultRoute", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Route", "aws:cdk:cloudformation:props": { @@ -609,14 +609,14 @@ }, "IGW": { "id": "IGW", - "path": "aws-ecs-patterns-queue-public/VPC/IGW", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/IGW", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::InternetGateway", "aws:cdk:cloudformation:props": { "tags": [ { "key": "Name", - "value": "aws-ecs-patterns-queue-public/VPC" + "value": "aws-ecs-patterns-queue-no-cpu-scaling/VPC" } ] } @@ -628,7 +628,7 @@ }, "VPCGW": { "id": "VPCGW", - "path": "aws-ecs-patterns-queue-public/VPC/VPCGW", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/VPC/VPCGW", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::VPCGatewayAttachment", "aws:cdk:cloudformation:props": { @@ -651,17 +651,17 @@ "version": "0.0.0" } }, - "PublicQueueService": { - "id": "PublicQueueService", - "path": "aws-ecs-patterns-queue-public/PublicQueueService", + "aws-ecs-patterns-queue-no-cpu-scaling": { + "id": "aws-ecs-patterns-queue-no-cpu-scaling", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling", "children": { "EcsProcessingDeadLetterQueue": { "id": "EcsProcessingDeadLetterQueue", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/EcsProcessingDeadLetterQueue", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/EcsProcessingDeadLetterQueue", "children": { "Resource": { "id": "Resource", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/EcsProcessingDeadLetterQueue/Resource", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/EcsProcessingDeadLetterQueue/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::SQS::Queue", "aws:cdk:cloudformation:props": { @@ -681,18 +681,18 @@ }, "EcsProcessingQueue": { "id": "EcsProcessingQueue", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/EcsProcessingQueue", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/EcsProcessingQueue", "children": { "Resource": { "id": "Resource", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/EcsProcessingQueue/Resource", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/EcsProcessingQueue/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::SQS::Queue", "aws:cdk:cloudformation:props": { "redrivePolicy": { "deadLetterTargetArn": { "Fn::GetAtt": [ - "PublicQueueServiceEcsProcessingDeadLetterQueueBC492277", + "awsecspatternsqueuenocpuscalingEcsProcessingDeadLetterQueue00A254F5", "Arn" ] }, @@ -713,7 +713,7 @@ }, "SQSDeadLetterQueue": { "id": "SQSDeadLetterQueue", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/SQSDeadLetterQueue", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/SQSDeadLetterQueue", "constructInfo": { "fqn": "aws-cdk-lib.CfnOutput", "version": "0.0.0" @@ -721,7 +721,7 @@ }, "SQSDeadLetterQueueArn": { "id": "SQSDeadLetterQueueArn", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/SQSDeadLetterQueueArn", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/SQSDeadLetterQueueArn", "constructInfo": { "fqn": "aws-cdk-lib.CfnOutput", "version": "0.0.0" @@ -729,7 +729,7 @@ }, "SQSQueue": { "id": "SQSQueue", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/SQSQueue", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/SQSQueue", "constructInfo": { "fqn": "aws-cdk-lib.CfnOutput", "version": "0.0.0" @@ -737,7 +737,7 @@ }, "SQSQueueArn": { "id": "SQSQueueArn", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/SQSQueueArn", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/SQSQueueArn", "constructInfo": { "fqn": "aws-cdk-lib.CfnOutput", "version": "0.0.0" @@ -745,15 +745,15 @@ }, "QueueProcessingTaskDef": { "id": "QueueProcessingTaskDef", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/QueueProcessingTaskDef", "children": { "TaskRole": { "id": "TaskRole", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/TaskRole", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/QueueProcessingTaskDef/TaskRole", "children": { "ImportTaskRole": { "id": "ImportTaskRole", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/TaskRole/ImportTaskRole", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/QueueProcessingTaskDef/TaskRole/ImportTaskRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", "version": "0.0.0" @@ -761,7 +761,7 @@ }, "Resource": { "id": "Resource", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/TaskRole/Resource", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/QueueProcessingTaskDef/TaskRole/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::IAM::Role", "aws:cdk:cloudformation:props": { @@ -786,11 +786,11 @@ }, "DefaultPolicy": { "id": "DefaultPolicy", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/TaskRole/DefaultPolicy", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/QueueProcessingTaskDef/TaskRole/DefaultPolicy", "children": { "Resource": { "id": "Resource", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/TaskRole/DefaultPolicy/Resource", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/QueueProcessingTaskDef/TaskRole/DefaultPolicy/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::IAM::Policy", "aws:cdk:cloudformation:props": { @@ -807,7 +807,7 @@ "Effect": "Allow", "Resource": { "Fn::GetAtt": [ - "PublicQueueServiceEcsProcessingQueue84CD309D", + "awsecspatternsqueuenocpuscalingEcsProcessingQueue52AE8DE5", "Arn" ] } @@ -815,10 +815,10 @@ ], "Version": "2012-10-17" }, - "policyName": "PublicQueueServiceQueueProcessingTaskDefTaskRoleDefaultPolicy5417957C", + "policyName": "awsecspatternsqueuenocpuscalingQueueProcessingTaskDefTaskRoleDefaultPolicy07A2DF7A", "roles": [ { - "Ref": "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F" + "Ref": "awsecspatternsqueuenocpuscalingQueueProcessingTaskDefTaskRole32D98F08" } ] } @@ -842,7 +842,7 @@ }, "Resource": { "id": "Resource", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/Resource", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/QueueProcessingTaskDef/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::ECS::TaskDefinition", "aws:cdk:cloudformation:props": { @@ -850,16 +850,16 @@ { "essential": true, "image": { - "Fn::Sub": "${AWS::AccountId}.dkr.ecr.${AWS::Region}.${AWS::URLSuffix}/cdk-hnb659fds-container-assets-${AWS::AccountId}-${AWS::Region}:497b192764e66ae2955bba8dff8487b11aaaaf904414455868e2560e31f47211" + "Fn::Sub": "${AWS::AccountId}.dkr.ecr.${AWS::Region}.${AWS::URLSuffix}/cdk-hnb659fds-container-assets-${AWS::AccountId}-${AWS::Region}:8be39d348c20f7e58a373abbd1152069e18da130e51bf52c89bd82a38d0e51d7" }, "name": "QueueProcessingContainer", "logConfiguration": { "logDriver": "awslogs", "options": { "awslogs-group": { - "Ref": "PublicQueueServiceQueueProcessingTaskDefQueueProcessingContainerLogGroupCFF67B64" + "Ref": "awsecspatternsqueuenocpuscalingQueueProcessingTaskDefQueueProcessingContainerLogGroupD037396C" }, - "awslogs-stream-prefix": "PublicQueueService", + "awslogs-stream-prefix": "aws-ecs-patterns-queue-no-cpu-scaling", "awslogs-region": { "Ref": "AWS::Region" } @@ -870,7 +870,7 @@ "name": "QUEUE_NAME", "value": { "Fn::GetAtt": [ - "PublicQueueServiceEcsProcessingQueue84CD309D", + "awsecspatternsqueuenocpuscalingEcsProcessingQueue52AE8DE5", "QueueName" ] } @@ -881,11 +881,11 @@ "cpu": "256", "executionRoleArn": { "Fn::GetAtt": [ - "PublicQueueServiceQueueProcessingTaskDefExecutionRoleE22721BA", + "awsecspatternsqueuenocpuscalingQueueProcessingTaskDefExecutionRole7DE7E444", "Arn" ] }, - "family": "awsecspatternsqueuepublicPublicQueueServiceQueueProcessingTaskDefB3738118", + "family": "awsecspatternsqueuenocpuscalingQueueProcessingTaskDef737B9146", "memory": "512", "networkMode": "awsvpc", "requiresCompatibilities": [ @@ -893,7 +893,7 @@ ], "taskRoleArn": { "Fn::GetAtt": [ - "PublicQueueServiceQueueProcessingTaskDefTaskRole172D980F", + "awsecspatternsqueuenocpuscalingQueueProcessingTaskDefTaskRole32D98F08", "Arn" ] } @@ -906,15 +906,15 @@ }, "QueueProcessingContainer": { "id": "QueueProcessingContainer", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/QueueProcessingContainer", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/QueueProcessingTaskDef/QueueProcessingContainer", "children": { "AssetImage": { "id": "AssetImage", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/QueueProcessingContainer/AssetImage", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/QueueProcessingTaskDef/QueueProcessingContainer/AssetImage", "children": { "Staging": { "id": "Staging", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/QueueProcessingContainer/AssetImage/Staging", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/QueueProcessingTaskDef/QueueProcessingContainer/AssetImage/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", "version": "0.0.0" @@ -922,7 +922,7 @@ }, "Repository": { "id": "Repository", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/QueueProcessingContainer/AssetImage/Repository", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/QueueProcessingTaskDef/QueueProcessingContainer/AssetImage/Repository", "constructInfo": { "fqn": "aws-cdk-lib.aws_ecr.RepositoryBase", "version": "0.0.0" @@ -936,11 +936,11 @@ }, "LogGroup": { "id": "LogGroup", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/QueueProcessingContainer/LogGroup", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/QueueProcessingTaskDef/QueueProcessingContainer/LogGroup", "children": { "Resource": { "id": "Resource", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/QueueProcessingContainer/LogGroup/Resource", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/QueueProcessingTaskDef/QueueProcessingContainer/LogGroup/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::Logs::LogGroup", "aws:cdk:cloudformation:props": {} @@ -964,11 +964,11 @@ }, "ExecutionRole": { "id": "ExecutionRole", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/ExecutionRole", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/QueueProcessingTaskDef/ExecutionRole", "children": { "ImportExecutionRole": { "id": "ImportExecutionRole", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/ExecutionRole/ImportExecutionRole", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/QueueProcessingTaskDef/ExecutionRole/ImportExecutionRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", "version": "0.0.0" @@ -976,7 +976,7 @@ }, "Resource": { "id": "Resource", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/ExecutionRole/Resource", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/QueueProcessingTaskDef/ExecutionRole/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::IAM::Role", "aws:cdk:cloudformation:props": { @@ -1001,11 +1001,11 @@ }, "DefaultPolicy": { "id": "DefaultPolicy", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/ExecutionRole/DefaultPolicy", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/QueueProcessingTaskDef/ExecutionRole/DefaultPolicy", "children": { "Resource": { "id": "Resource", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingTaskDef/ExecutionRole/DefaultPolicy/Resource", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/QueueProcessingTaskDef/ExecutionRole/DefaultPolicy/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::IAM::Policy", "aws:cdk:cloudformation:props": { @@ -1055,7 +1055,7 @@ "Effect": "Allow", "Resource": { "Fn::GetAtt": [ - "PublicQueueServiceQueueProcessingTaskDefQueueProcessingContainerLogGroupCFF67B64", + "awsecspatternsqueuenocpuscalingQueueProcessingTaskDefQueueProcessingContainerLogGroupD037396C", "Arn" ] } @@ -1063,10 +1063,10 @@ ], "Version": "2012-10-17" }, - "policyName": "PublicQueueServiceQueueProcessingTaskDefExecutionRoleDefaultPolicyD7FF680F", + "policyName": "awsecspatternsqueuenocpuscalingQueueProcessingTaskDefExecutionRoleDefaultPolicyDE7E0B22", "roles": [ { - "Ref": "PublicQueueServiceQueueProcessingTaskDefExecutionRoleE22721BA" + "Ref": "awsecspatternsqueuenocpuscalingQueueProcessingTaskDefExecutionRole7DE7E444" } ] } @@ -1096,11 +1096,11 @@ }, "QueueProcessingFargateService": { "id": "QueueProcessingFargateService", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/QueueProcessingFargateService", "children": { "Service": { "id": "Service", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/Service", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/QueueProcessingFargateService/Service", "attributes": { "aws:cdk:cloudformation:type": "AWS::ECS::Service", "aws:cdk:cloudformation:props": { @@ -1132,7 +1132,7 @@ "securityGroups": [ { "Fn::GetAtt": [ - "PublicQueueServiceQueueProcessingFargateServiceSecurityGroupFC07A65A", + "awsecspatternsqueuenocpuscalingQueueProcessingFargateServiceSecurityGroupE40A7C91", "GroupId" ] } @@ -1140,7 +1140,7 @@ } }, "taskDefinition": { - "Ref": "PublicQueueServiceQueueProcessingTaskDef858327F6" + "Ref": "awsecspatternsqueuenocpuscalingQueueProcessingTaskDef33911003" } } }, @@ -1151,15 +1151,15 @@ }, "SecurityGroup": { "id": "SecurityGroup", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/SecurityGroup", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/QueueProcessingFargateService/SecurityGroup", "children": { "Resource": { "id": "Resource", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/SecurityGroup/Resource", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/QueueProcessingFargateService/SecurityGroup/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::SecurityGroup", "aws:cdk:cloudformation:props": { - "groupDescription": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/SecurityGroup", + "groupDescription": "aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/QueueProcessingFargateService/SecurityGroup", "securityGroupEgress": [ { "cidrIp": "0.0.0.0/0", @@ -1185,7 +1185,7 @@ }, "ScalingRole": { "id": "ScalingRole", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/ScalingRole", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/QueueProcessingFargateService/ScalingRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", "version": "0.0.0" @@ -1193,15 +1193,15 @@ }, "TaskCount": { "id": "TaskCount", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/QueueProcessingFargateService/TaskCount", "children": { "Target": { "id": "Target", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/QueueProcessingFargateService/TaskCount/Target", "children": { "Resource": { "id": "Resource", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/Resource", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/QueueProcessingFargateService/TaskCount/Target/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::ApplicationAutoScaling::ScalableTarget", "aws:cdk:cloudformation:props": { @@ -1218,7 +1218,7 @@ "/", { "Fn::GetAtt": [ - "PublicQueueServiceQueueProcessingFargateService7DE3D65B", + "awsecspatternsqueuenocpuscalingQueueProcessingFargateService2D3CD1AE", "Name" ] } @@ -1252,22 +1252,22 @@ }, "QueueMessagesVisibleScaling": { "id": "QueueMessagesVisibleScaling", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling", "children": { "LowerPolicy": { "id": "LowerPolicy", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/LowerPolicy", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/LowerPolicy", "children": { "Resource": { "id": "Resource", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/LowerPolicy/Resource", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/LowerPolicy/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::ApplicationAutoScaling::ScalingPolicy", "aws:cdk:cloudformation:props": { - "policyName": "awsecspatternsqueuepublicPublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerPolicy2DB1A503", + "policyName": "awsecspatternsqueuenocpuscalingQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerPolicyC9FD3BAC", "policyType": "StepScaling", "scalingTargetId": { - "Ref": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetE040C118" + "Ref": "awsecspatternsqueuenocpuscalingQueueProcessingFargateServiceTaskCountTargetAF622EF9" }, "stepScalingPolicyConfiguration": { "adjustmentType": "ChangeInCapacity", @@ -1294,17 +1294,17 @@ }, "LowerAlarm": { "id": "LowerAlarm", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/LowerAlarm", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/LowerAlarm", "children": { "Resource": { "id": "Resource", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/LowerAlarm/Resource", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/LowerAlarm/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::CloudWatch::Alarm", "aws:cdk:cloudformation:props": { "alarmActions": [ { - "Ref": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerPolicyB2B27FF9" + "Ref": "awsecspatternsqueuenocpuscalingQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingLowerPolicy0A2D0ED3" } ], "alarmDescription": "Lower threshold scaling alarm", @@ -1314,7 +1314,7 @@ "name": "QueueName", "value": { "Fn::GetAtt": [ - "PublicQueueServiceEcsProcessingQueue84CD309D", + "awsecspatternsqueuenocpuscalingEcsProcessingQueue52AE8DE5", "QueueName" ] } @@ -1341,18 +1341,18 @@ }, "UpperPolicy": { "id": "UpperPolicy", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/UpperPolicy", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/UpperPolicy", "children": { "Resource": { "id": "Resource", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/UpperPolicy/Resource", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/UpperPolicy/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::ApplicationAutoScaling::ScalingPolicy", "aws:cdk:cloudformation:props": { - "policyName": "awsecspatternsqueuepublicPublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperPolicy89C3D196", + "policyName": "awsecspatternsqueuenocpuscalingQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperPolicy2230072F", "policyType": "StepScaling", "scalingTargetId": { - "Ref": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetE040C118" + "Ref": "awsecspatternsqueuenocpuscalingQueueProcessingFargateServiceTaskCountTargetAF622EF9" }, "stepScalingPolicyConfiguration": { "adjustmentType": "ChangeInCapacity", @@ -1384,17 +1384,17 @@ }, "UpperAlarm": { "id": "UpperAlarm", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/UpperAlarm", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/UpperAlarm", "children": { "Resource": { "id": "Resource", - "path": "aws-ecs-patterns-queue-public/PublicQueueService/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/UpperAlarm/Resource", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/aws-ecs-patterns-queue-no-cpu-scaling/QueueProcessingFargateService/TaskCount/Target/QueueMessagesVisibleScaling/UpperAlarm/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::CloudWatch::Alarm", "aws:cdk:cloudformation:props": { "alarmActions": [ { - "Ref": "PublicQueueServiceQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperPolicyDCB40C8A" + "Ref": "awsecspatternsqueuenocpuscalingQueueProcessingFargateServiceTaskCountTargetQueueMessagesVisibleScalingUpperPolicy33179C1A" } ], "alarmDescription": "Upper threshold scaling alarm", @@ -1404,7 +1404,7 @@ "name": "QueueName", "value": { "Fn::GetAtt": [ - "PublicQueueServiceEcsProcessingQueue84CD309D", + "awsecspatternsqueuenocpuscalingEcsProcessingQueue52AE8DE5", "QueueName" ] } @@ -1461,11 +1461,11 @@ }, "EcsDefaultClusterMnL3mNNYNVPC": { "id": "EcsDefaultClusterMnL3mNNYNVPC", - "path": "aws-ecs-patterns-queue-public/EcsDefaultClusterMnL3mNNYNVPC", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/EcsDefaultClusterMnL3mNNYNVPC", "children": { "Resource": { "id": "Resource", - "path": "aws-ecs-patterns-queue-public/EcsDefaultClusterMnL3mNNYNVPC/Resource", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/EcsDefaultClusterMnL3mNNYNVPC/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::ECS::Cluster", "aws:cdk:cloudformation:props": {} @@ -1483,7 +1483,7 @@ }, "BootstrapVersion": { "id": "BootstrapVersion", - "path": "aws-ecs-patterns-queue-public/BootstrapVersion", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", "version": "0.0.0" @@ -1491,7 +1491,7 @@ }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", - "path": "aws-ecs-patterns-queue-public/CheckBootstrapVersion", + "path": "aws-ecs-patterns-queue-no-cpu-scaling/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", "version": "0.0.0" @@ -1503,17 +1503,17 @@ "version": "0.0.0" } }, - "publicQueueProcessingFargateServiceTest": { - "id": "publicQueueProcessingFargateServiceTest", - "path": "publicQueueProcessingFargateServiceTest", + "noCpuScalingQueueProcessingFargateServiceTest": { + "id": "noCpuScalingQueueProcessingFargateServiceTest", + "path": "noCpuScalingQueueProcessingFargateServiceTest", "children": { "DefaultTest": { "id": "DefaultTest", - "path": "publicQueueProcessingFargateServiceTest/DefaultTest", + "path": "noCpuScalingQueueProcessingFargateServiceTest/DefaultTest", "children": { "Default": { "id": "Default", - "path": "publicQueueProcessingFargateServiceTest/DefaultTest/Default", + "path": "noCpuScalingQueueProcessingFargateServiceTest/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", "version": "10.3.0" @@ -1521,11 +1521,11 @@ }, "DeployAssert": { "id": "DeployAssert", - "path": "publicQueueProcessingFargateServiceTest/DefaultTest/DeployAssert", + "path": "noCpuScalingQueueProcessingFargateServiceTest/DefaultTest/DeployAssert", "children": { "BootstrapVersion": { "id": "BootstrapVersion", - "path": "publicQueueProcessingFargateServiceTest/DefaultTest/DeployAssert/BootstrapVersion", + "path": "noCpuScalingQueueProcessingFargateServiceTest/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", "version": "0.0.0" @@ -1533,7 +1533,7 @@ }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", - "path": "publicQueueProcessingFargateServiceTest/DefaultTest/DeployAssert/CheckBootstrapVersion", + "path": "noCpuScalingQueueProcessingFargateServiceTest/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", "version": "0.0.0" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.ts index babf0a4a2cbb8..e67214eed80a9 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-no-cpu-scaling.ts @@ -6,10 +6,10 @@ import * as integ from '@aws-cdk/integ-tests-alpha'; import { QueueProcessingFargateService } from 'aws-cdk-lib/aws-ecs-patterns'; const app = new App(); -const stack = new Stack(app, 'aws-ecs-patterns-queue-public'); +const stack = new Stack(app, 'aws-ecs-patterns-queue-no-cpu-scaling'); const vpc = new ec2.Vpc(stack, 'VPC', { restrictDefaultSecurityGroup: false }); -new QueueProcessingFargateService(stack, 'PublicQueueService', { +new QueueProcessingFargateService(stack, 'aws-ecs-patterns-queue-no-cpu-scaling', { vpc, memoryLimitMiB: 512, image: new ecs.AssetImage(path.join(__dirname, '..', 'sqs-reader')), @@ -17,7 +17,7 @@ new QueueProcessingFargateService(stack, 'PublicQueueService', { disableCpuBasedScaling: true, }); -new integ.IntegTest(app, 'publicQueueProcessingFargateServiceTest', { +new integ.IntegTest(app, 'noCpuScalingQueueProcessingFargateServiceTest', { testCases: [stack], }); diff --git a/packages/aws-cdk-lib/aws-ecs-patterns/README.md b/packages/aws-cdk-lib/aws-ecs-patterns/README.md index 26cfd9df3093a..4f9e92afed456 100644 --- a/packages/aws-cdk-lib/aws-ecs-patterns/README.md +++ b/packages/aws-cdk-lib/aws-ecs-patterns/README.md @@ -295,7 +295,7 @@ const queueProcessingFargateService = new ecsPatterns.QueueProcessingFargateServ when queue not provided by user, CDK will create a primary queue and a dead letter queue with default redrive policy and attach permission to the task to be able to access the primary queue. -NOTE: This construct add a CPU Based scaling strategy by default, if this is not required in any solution please disable this by setting `disableCpuBasedScaling` to `true`. +NOTE: This construct adds a CPU Based scaling strategy by default, if this is not required in any solution please disable this by setting `disableCpuBasedScaling` to `true`. ```ts declare const cluster: ecs.Cluster; @@ -316,6 +316,27 @@ const queueProcessingFargateService = new ecsPatterns.QueueProcessingFargateServ }); ``` +If the CPU based scaling is required, To specify a custom target CPU utilization percentage for the scaling strategy use the `cpuTrgetUtilizationPercent` property + +```ts +declare const cluster: ecs.Cluster; +const queueProcessingFargateService = new ecsPatterns.QueueProcessingFargateService(this, 'Service', { + cluster, + memoryLimitMiB: 512, + image: ecs.ContainerImage.fromRegistry('test'), + command: ["-c", "4", "amazon.com"], + enableLogging: false, + desiredTaskCount: 2, + environment: { + TEST_ENVIRONMENT_VARIABLE1: "test environment variable 1 value", + TEST_ENVIRONMENT_VARIABLE2: "test environment variable 2 value", + }, + maxScalingCapacity: 5, + containerName: 'test', + cpuTrgetUtilizationPercent: 90, +}); +``` + ## Scheduled Tasks To define a task that runs periodically, there are 2 options: From 1476dc03dec7887b9722b7eae4578e17a6bcb945 Mon Sep 17 00:00:00 2001 From: Anurag Mohapatra Date: Sat, 16 Dec 2023 07:36:13 +0000 Subject: [PATCH 04/14] Fix the integration test failure --- .../aws-ecs-patterns-queue-custom-cpu-scaling.assets.json | 4 ++-- .../aws-ecs-patterns-queue-custom-cpu-scaling.template.json | 2 +- .../manifest.json | 2 +- .../tree.json | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/aws-ecs-patterns-queue-custom-cpu-scaling.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/aws-ecs-patterns-queue-custom-cpu-scaling.assets.json index f8769a0d663b0..68669aee542b0 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/aws-ecs-patterns-queue-custom-cpu-scaling.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/aws-ecs-patterns-queue-custom-cpu-scaling.assets.json @@ -1,7 +1,7 @@ { "version": "35.0.0", "files": { - "ad92d86b073f46ad1972fdd95afc6e295fcae2d8e486324ce74b33d75836f10c": { + "5b5ba7ab28cb4e87b045328a0e57414435e379fb779cfb17c2741f676ed2fd30": { "source": { "path": "aws-ecs-patterns-queue-custom-cpu-scaling.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "ad92d86b073f46ad1972fdd95afc6e295fcae2d8e486324ce74b33d75836f10c.json", + "objectKey": "5b5ba7ab28cb4e87b045328a0e57414435e379fb779cfb17c2741f676ed2fd30.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/aws-ecs-patterns-queue-custom-cpu-scaling.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/aws-ecs-patterns-queue-custom-cpu-scaling.template.json index c4207497f3220..c90bcf8d9f7ff 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/aws-ecs-patterns-queue-custom-cpu-scaling.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/aws-ecs-patterns-queue-custom-cpu-scaling.template.json @@ -733,7 +733,7 @@ "PredefinedMetricSpecification": { "PredefinedMetricType": "ECSServiceAverageCPUUtilization" }, - "TargetValue": 50 + "TargetValue": 90 } }, "DependsOn": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/manifest.json index 1ded70301ef94..0e617423376dd 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/manifest.json @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/ad92d86b073f46ad1972fdd95afc6e295fcae2d8e486324ce74b33d75836f10c.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/5b5ba7ab28cb4e87b045328a0e57414435e379fb779cfb17c2741f676ed2fd30.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/tree.json index fbdbd5d85dbaf..fd61d077bd269 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.queue-processing-fargate-service-custom-cpu-scaling.js.snapshot/tree.json @@ -1269,7 +1269,7 @@ "predefinedMetricSpecification": { "predefinedMetricType": "ECSServiceAverageCPUUtilization" }, - "targetValue": 50 + "targetValue": 90 } } }, From 41cfbee49758eb2fd702af0548a62e4f5bd41ec3 Mon Sep 17 00:00:00 2001 From: Anurag Mohapatra Date: Sat, 16 Dec 2023 08:17:02 +0000 Subject: [PATCH 05/14] Fix typo in readme --- packages/aws-cdk-lib/aws-ecs-patterns/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/aws-cdk-lib/aws-ecs-patterns/README.md b/packages/aws-cdk-lib/aws-ecs-patterns/README.md index 4f9e92afed456..097accb8a07ac 100644 --- a/packages/aws-cdk-lib/aws-ecs-patterns/README.md +++ b/packages/aws-cdk-lib/aws-ecs-patterns/README.md @@ -316,7 +316,7 @@ const queueProcessingFargateService = new ecsPatterns.QueueProcessingFargateServ }); ``` -If the CPU based scaling is required, To specify a custom target CPU utilization percentage for the scaling strategy use the `cpuTrgetUtilizationPercent` property +If the CPU based scaling is required, To specify a custom target CPU utilization percentage for the scaling strategy use the `cpuTargetUtilizationPercent` property ```ts declare const cluster: ecs.Cluster; @@ -333,7 +333,7 @@ const queueProcessingFargateService = new ecsPatterns.QueueProcessingFargateServ }, maxScalingCapacity: 5, containerName: 'test', - cpuTrgetUtilizationPercent: 90, + cpuTargetUtilizationPercent: 90, }); ``` From ca9390b0f87c9ce9fa9f92e5b7ca239d26e73644 Mon Sep 17 00:00:00 2001 From: Anurag Mohapatra Date: Sun, 17 Dec 2023 00:35:39 +0000 Subject: [PATCH 06/14] Update clean ups as per PR review --- .../aws-cdk-lib/aws-ecs-patterns/README.md | 7 +- .../lib/base/queue-processing-service-base.ts | 6 +- .../queue-processing-fargate-service.test.ts | 118 ++---------------- 3 files changed, 14 insertions(+), 117 deletions(-) diff --git a/packages/aws-cdk-lib/aws-ecs-patterns/README.md b/packages/aws-cdk-lib/aws-ecs-patterns/README.md index 097accb8a07ac..4c55a0a5177c4 100644 --- a/packages/aws-cdk-lib/aws-ecs-patterns/README.md +++ b/packages/aws-cdk-lib/aws-ecs-patterns/README.md @@ -316,7 +316,7 @@ const queueProcessingFargateService = new ecsPatterns.QueueProcessingFargateServ }); ``` -If the CPU based scaling is required, To specify a custom target CPU utilization percentage for the scaling strategy use the `cpuTargetUtilizationPercent` property +To specify a custom target CPU utilization percentage for the scaling strategy use the `cpuTargetUtilizationPercent` property ```ts declare const cluster: ecs.Cluster; @@ -327,10 +327,7 @@ const queueProcessingFargateService = new ecsPatterns.QueueProcessingFargateServ command: ["-c", "4", "amazon.com"], enableLogging: false, desiredTaskCount: 2, - environment: { - TEST_ENVIRONMENT_VARIABLE1: "test environment variable 1 value", - TEST_ENVIRONMENT_VARIABLE2: "test environment variable 2 value", - }, + environment: {}, maxScalingCapacity: 5, containerName: 'test', cpuTargetUtilizationPercent: 90, diff --git a/packages/aws-cdk-lib/aws-ecs-patterns/lib/base/queue-processing-service-base.ts b/packages/aws-cdk-lib/aws-ecs-patterns/lib/base/queue-processing-service-base.ts index 67bf8ab6ff951..0b939c56d47cd 100644 --- a/packages/aws-cdk-lib/aws-ecs-patterns/lib/base/queue-processing-service-base.ts +++ b/packages/aws-cdk-lib/aws-ecs-patterns/lib/base/queue-processing-service-base.ts @@ -298,13 +298,13 @@ export abstract class QueueProcessingServiceBase extends Construct { * * @default - false */ - public readonly disableCpuBasedScaling?: boolean; + public readonly disableCpuBasedScaling: boolean; /** * The target CPU utilization percentage for CPU based scaling strategy when enabled. * * @default - 50 */ - public readonly cpuTargetUtilizationPercent?: number; + public readonly cpuTargetUtilizationPercent: number; /** * Constructs a new instance of the QueueProcessingServiceBase class. @@ -388,7 +388,7 @@ export abstract class QueueProcessingServiceBase extends Construct { if (!this.disableCpuBasedScaling) { scalingTarget.scaleOnCpuUtilization('CpuScaling', { - targetUtilizationPercent: this.cpuTargetUtilizationPercent ?? 50, + targetUtilizationPercent: this.cpuTargetUtilizationPercent, }); } scalingTarget.scaleOnMetric('QueueMessagesVisibleScaling', { diff --git a/packages/aws-cdk-lib/aws-ecs-patterns/test/fargate/queue-processing-fargate-service.test.ts b/packages/aws-cdk-lib/aws-ecs-patterns/test/fargate/queue-processing-fargate-service.test.ts index bb8ca7c3890d9..ea61089e8aa50 100644 --- a/packages/aws-cdk-lib/aws-ecs-patterns/test/fargate/queue-processing-fargate-service.test.ts +++ b/packages/aws-cdk-lib/aws-ecs-patterns/test/fargate/queue-processing-fargate-service.test.ts @@ -525,59 +525,6 @@ test('test Fargate queue worker service construct - with cpu scaling strategy di disableCpuBasedScaling: true, }); - // THEN - QueueWorker is of FARGATE launch type, an SQS queue is created and all optional properties are set. - Template.fromStack(stack).hasResourceProperties('AWS::ECS::Service', { - DeploymentConfiguration: { - MinimumHealthyPercent: 60, - MaximumPercent: 150, - DeploymentCircuitBreaker: { - Enable: true, - Rollback: true, - }, - }, - LaunchType: 'FARGATE', - ServiceName: 'fargate-test-service', - PlatformVersion: ecs.FargatePlatformVersion.VERSION1_4, - DeploymentController: { - Type: 'ECS', - }, - }); - - Template.fromStack(stack).hasResourceProperties('AWS::SQS::Queue', { QueueName: 'fargate-test-sqs-queue' }); - - Template.fromStack(stack).hasResourceProperties('AWS::ECS::TaskDefinition', { - ContainerDefinitions: [ - Match.objectLike({ - Command: [ - '-c', - '4', - 'amazon.com', - ], - Environment: [ - { - Name: 'TEST_ENVIRONMENT_VARIABLE1', - Value: 'test environment variable 1 value', - }, - { - Name: 'TEST_ENVIRONMENT_VARIABLE2', - Value: 'test environment variable 2 value', - }, - { - Name: 'QUEUE_NAME', - Value: { - 'Fn::GetAtt': [ - 'fargatetestqueue28B43841', - 'QueueName', - ], - }, - }, - ], - Image: 'test', - }), - ], - Family: 'fargate-task-family', - }); - // THEN - No CPU target tracking policy is created Template.fromStack(stack).resourcePropertiesCountIs('AWS::ApplicationAutoScaling::ScalingPolicy', { PolicyType: 'TargetTrackingScaling', @@ -622,68 +569,21 @@ testDeprecated('test Fargate queue worker service construct - with custom cpu sc cpuTargetUtilizationPercent: 80, }); - // THEN - QueueWorker is of FARGATE launch type, an SQS queue is created and all optional properties are set. - Template.fromStack(stack).hasResourceProperties('AWS::ECS::Service', { - DeploymentConfiguration: { - MinimumHealthyPercent: 60, - MaximumPercent: 150, - DeploymentCircuitBreaker: { - Enable: true, - Rollback: true, - }, - }, - LaunchType: 'FARGATE', - ServiceName: 'fargate-test-service', - PlatformVersion: ecs.FargatePlatformVersion.VERSION1_4, - DeploymentController: { - Type: 'ECS', - }, - }); - - Template.fromStack(stack).hasResourceProperties('AWS::SQS::Queue', { QueueName: 'fargate-test-sqs-queue' }); - - Template.fromStack(stack).hasResourceProperties('AWS::ECS::TaskDefinition', { - ContainerDefinitions: [ - Match.objectLike({ - Command: [ - '-c', - '4', - 'amazon.com', - ], - Environment: [ - { - Name: 'TEST_ENVIRONMENT_VARIABLE1', - Value: 'test environment variable 1 value', - }, - { - Name: 'TEST_ENVIRONMENT_VARIABLE2', - Value: 'test environment variable 2 value', - }, - { - Name: 'QUEUE_NAME', - Value: { - 'Fn::GetAtt': [ - 'fargatetestqueue28B43841', - 'QueueName', - ], - }, - }, - ], - Image: 'test', - }), - ], - Family: 'fargate-task-family', - }); - // THEN - CPU target tracking policy is created Template.fromStack(stack).resourcePropertiesCountIs('AWS::ApplicationAutoScaling::ScalingPolicy', { PolicyType: 'TargetTrackingScaling', }, 1); // AND - CPU target utilization set - Template.fromStack(stack).resourcePropertiesCountIs('AWS::ApplicationAutoScaling::ScalingPolicy', { - PolicyType: 'TargetTrackingScaling', - }, 1); + Template.fromStack(stack). hasResourceProperties('AWS::ApplicationAutoScaling::ScalingPolicy', { + 'PolicyType': 'TargetTrackingScaling', + 'TargetTrackingScalingPolicyConfiguration': { + 'PredefinedMetricSpecification': { + 'PredefinedMetricType': 'ECSServiceAverageCPUUtilization' + }, + 'TargetValue': 80 + } + }); }); test('can set custom containerName', () => { From 4edfc9e96d5520ebfc9bff72c0d50855596a2126 Mon Sep 17 00:00:00 2001 From: Anurag Mohapatra Date: Sun, 17 Dec 2023 00:51:08 +0000 Subject: [PATCH 07/14] fixing linting issues --- .../queue-processing-fargate-service.test.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/aws-cdk-lib/aws-ecs-patterns/test/fargate/queue-processing-fargate-service.test.ts b/packages/aws-cdk-lib/aws-ecs-patterns/test/fargate/queue-processing-fargate-service.test.ts index ea61089e8aa50..796397f2adffb 100644 --- a/packages/aws-cdk-lib/aws-ecs-patterns/test/fargate/queue-processing-fargate-service.test.ts +++ b/packages/aws-cdk-lib/aws-ecs-patterns/test/fargate/queue-processing-fargate-service.test.ts @@ -576,15 +576,15 @@ testDeprecated('test Fargate queue worker service construct - with custom cpu sc // AND - CPU target utilization set Template.fromStack(stack). hasResourceProperties('AWS::ApplicationAutoScaling::ScalingPolicy', { - 'PolicyType': 'TargetTrackingScaling', - 'TargetTrackingScalingPolicyConfiguration': { - 'PredefinedMetricSpecification': { - 'PredefinedMetricType': 'ECSServiceAverageCPUUtilization' - }, - 'TargetValue': 80 - } + PolicyType: 'TargetTrackingScaling', + TargetTrackingScalingPolicyConfiguration: { + PredefinedMetricSpecification: { + PredefinedMetricType: 'ECSServiceAverageCPUUtilization', + }, + TargetValue: 80, + }, + }); }); -}); test('can set custom containerName', () => { // GIVEN From 419a956fd99fc95e433eeddabfc7c6d8679b02ac Mon Sep 17 00:00:00 2001 From: Anurag Mohapatra Date: Sun, 17 Dec 2023 01:03:18 +0000 Subject: [PATCH 08/14] Fix indentation --- .../fargate/queue-processing-fargate-service.test.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/aws-cdk-lib/aws-ecs-patterns/test/fargate/queue-processing-fargate-service.test.ts b/packages/aws-cdk-lib/aws-ecs-patterns/test/fargate/queue-processing-fargate-service.test.ts index 796397f2adffb..e8e3c0d3cb45a 100644 --- a/packages/aws-cdk-lib/aws-ecs-patterns/test/fargate/queue-processing-fargate-service.test.ts +++ b/packages/aws-cdk-lib/aws-ecs-patterns/test/fargate/queue-processing-fargate-service.test.ts @@ -577,14 +577,14 @@ testDeprecated('test Fargate queue worker service construct - with custom cpu sc // AND - CPU target utilization set Template.fromStack(stack). hasResourceProperties('AWS::ApplicationAutoScaling::ScalingPolicy', { PolicyType: 'TargetTrackingScaling', - TargetTrackingScalingPolicyConfiguration: { - PredefinedMetricSpecification: { - PredefinedMetricType: 'ECSServiceAverageCPUUtilization', - }, - TargetValue: 80, + TargetTrackingScalingPolicyConfiguration: { + PredefinedMetricSpecification: { + PredefinedMetricType: 'ECSServiceAverageCPUUtilization', }, - }); + TargetValue: 80, + }, }); +}); test('can set custom containerName', () => { // GIVEN From 99a4d757ff8320347698e65a53a263b73abcb2a4 Mon Sep 17 00:00:00 2001 From: Anurag Mohapatra Date: Mon, 18 Dec 2023 07:04:18 +0000 Subject: [PATCH 09/14] Update more PR Review comments --- .../lib/base/queue-processing-service-base.ts | 10 ++++++---- .../fargate/queue-processing-fargate-service.test.ts | 7 +------ 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/packages/aws-cdk-lib/aws-ecs-patterns/lib/base/queue-processing-service-base.ts b/packages/aws-cdk-lib/aws-ecs-patterns/lib/base/queue-processing-service-base.ts index 0b939c56d47cd..74c183e95f6de 100644 --- a/packages/aws-cdk-lib/aws-ecs-patterns/lib/base/queue-processing-service-base.ts +++ b/packages/aws-cdk-lib/aws-ecs-patterns/lib/base/queue-processing-service-base.ts @@ -288,22 +288,24 @@ export abstract class QueueProcessingServiceBase extends Construct { /** * The scaling interval for autoscaling based off an SQS Queue size. */ + public readonly scalingSteps: ScalingInterval[]; + /** * The AwsLogDriver to use for logging if logging is enabled. */ public readonly logDriver?: LogDriver; + /** * Flag to disable CPU based auto scaling strategy on the service. - * - * @default - false */ + public readonly disableCpuBasedScaling: boolean; + /** * The target CPU utilization percentage for CPU based scaling strategy when enabled. - * - * @default - 50 */ + public readonly cpuTargetUtilizationPercent: number; /** diff --git a/packages/aws-cdk-lib/aws-ecs-patterns/test/fargate/queue-processing-fargate-service.test.ts b/packages/aws-cdk-lib/aws-ecs-patterns/test/fargate/queue-processing-fargate-service.test.ts index e8e3c0d3cb45a..90c5877544657 100644 --- a/packages/aws-cdk-lib/aws-ecs-patterns/test/fargate/queue-processing-fargate-service.test.ts +++ b/packages/aws-cdk-lib/aws-ecs-patterns/test/fargate/queue-processing-fargate-service.test.ts @@ -569,12 +569,7 @@ testDeprecated('test Fargate queue worker service construct - with custom cpu sc cpuTargetUtilizationPercent: 80, }); - // THEN - CPU target tracking policy is created - Template.fromStack(stack).resourcePropertiesCountIs('AWS::ApplicationAutoScaling::ScalingPolicy', { - PolicyType: 'TargetTrackingScaling', - }, 1); - - // AND - CPU target utilization set + // THEN - CPU target utilization set Template.fromStack(stack). hasResourceProperties('AWS::ApplicationAutoScaling::ScalingPolicy', { PolicyType: 'TargetTrackingScaling', TargetTrackingScalingPolicyConfiguration: { From e27634a57eb90490be69d7eb9088673a2852c7ea Mon Sep 17 00:00:00 2001 From: Anurag Mohapatra Date: Tue, 19 Dec 2023 07:17:10 +0000 Subject: [PATCH 10/14] Fix PR review comments --- .../aws-ecs-patterns/lib/base/queue-processing-service-base.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/aws-cdk-lib/aws-ecs-patterns/lib/base/queue-processing-service-base.ts b/packages/aws-cdk-lib/aws-ecs-patterns/lib/base/queue-processing-service-base.ts index 74c183e95f6de..d2a28c2be0c74 100644 --- a/packages/aws-cdk-lib/aws-ecs-patterns/lib/base/queue-processing-service-base.ts +++ b/packages/aws-cdk-lib/aws-ecs-patterns/lib/base/queue-processing-service-base.ts @@ -288,7 +288,6 @@ export abstract class QueueProcessingServiceBase extends Construct { /** * The scaling interval for autoscaling based off an SQS Queue size. */ - public readonly scalingSteps: ScalingInterval[]; /** @@ -299,13 +298,11 @@ export abstract class QueueProcessingServiceBase extends Construct { /** * Flag to disable CPU based auto scaling strategy on the service. */ - public readonly disableCpuBasedScaling: boolean; /** * The target CPU utilization percentage for CPU based scaling strategy when enabled. */ - public readonly cpuTargetUtilizationPercent: number; /** From 652985f2493e4aa26ba7b200d02b8a8e34d572b3 Mon Sep 17 00:00:00 2001 From: Anurag Mohapatra Date: Tue, 19 Dec 2023 07:19:04 +0000 Subject: [PATCH 11/14] Update readme --- packages/aws-cdk-lib/aws-ecs-patterns/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/aws-cdk-lib/aws-ecs-patterns/README.md b/packages/aws-cdk-lib/aws-ecs-patterns/README.md index 4c55a0a5177c4..46f8d07fdbc00 100644 --- a/packages/aws-cdk-lib/aws-ecs-patterns/README.md +++ b/packages/aws-cdk-lib/aws-ecs-patterns/README.md @@ -316,7 +316,7 @@ const queueProcessingFargateService = new ecsPatterns.QueueProcessingFargateServ }); ``` -To specify a custom target CPU utilization percentage for the scaling strategy use the `cpuTargetUtilizationPercent` property +To specify a custom target CPU utilization percentage for the scaling strategy use the `cpuTargetUtilizationPercent` property: ```ts declare const cluster: ecs.Cluster; From a6b111372a5691a1fada9b684ead6abe28fb1b57 Mon Sep 17 00:00:00 2001 From: Anurag Mohapatra Date: Wed, 20 Dec 2023 10:29:27 +0000 Subject: [PATCH 12/14] Update readme --- packages/aws-cdk-lib/aws-ecs-patterns/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/aws-cdk-lib/aws-ecs-patterns/README.md b/packages/aws-cdk-lib/aws-ecs-patterns/README.md index 46f8d07fdbc00..5f1ebac133af5 100644 --- a/packages/aws-cdk-lib/aws-ecs-patterns/README.md +++ b/packages/aws-cdk-lib/aws-ecs-patterns/README.md @@ -295,7 +295,7 @@ const queueProcessingFargateService = new ecsPatterns.QueueProcessingFargateServ when queue not provided by user, CDK will create a primary queue and a dead letter queue with default redrive policy and attach permission to the task to be able to access the primary queue. -NOTE: This construct adds a CPU Based scaling strategy by default, if this is not required in any solution please disable this by setting `disableCpuBasedScaling` to `true`. +NOTE: `QueueProcessingFargateService` adds a CPU Based scaling strategy by default. You can turn this off by setting `disableCpuBasedScaling: true`. ```ts declare const cluster: ecs.Cluster; From 1d5cbbd2265752017ffd3d3529f9db6363137c77 Mon Sep 17 00:00:00 2001 From: Anurag Mohapatra Date: Thu, 21 Dec 2023 11:02:53 +0000 Subject: [PATCH 13/14] make the properties private in base class --- .../lib/base/queue-processing-service-base.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/aws-cdk-lib/aws-ecs-patterns/lib/base/queue-processing-service-base.ts b/packages/aws-cdk-lib/aws-ecs-patterns/lib/base/queue-processing-service-base.ts index d2a28c2be0c74..86912871d48c5 100644 --- a/packages/aws-cdk-lib/aws-ecs-patterns/lib/base/queue-processing-service-base.ts +++ b/packages/aws-cdk-lib/aws-ecs-patterns/lib/base/queue-processing-service-base.ts @@ -298,12 +298,12 @@ export abstract class QueueProcessingServiceBase extends Construct { /** * Flag to disable CPU based auto scaling strategy on the service. */ - public readonly disableCpuBasedScaling: boolean; + readonly disableCpuBasedScaling: boolean; /** * The target CPU utilization percentage for CPU based scaling strategy when enabled. */ - public readonly cpuTargetUtilizationPercent: number; + readonly cpuTargetUtilizationPercent: number; /** * Constructs a new instance of the QueueProcessingServiceBase class. From 33efe97b322ce7396b8dbc5620ba78860aeb2001 Mon Sep 17 00:00:00 2001 From: Kaizen Conroy <36202692+kaizencc@users.noreply.github.com> Date: Fri, 22 Dec 2023 13:52:01 -0800 Subject: [PATCH 14/14] Apply suggestions from code review --- .../lib/base/queue-processing-service-base.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/aws-cdk-lib/aws-ecs-patterns/lib/base/queue-processing-service-base.ts b/packages/aws-cdk-lib/aws-ecs-patterns/lib/base/queue-processing-service-base.ts index 6930a8b91d9cb..cc6df0f99c53a 100644 --- a/packages/aws-cdk-lib/aws-ecs-patterns/lib/base/queue-processing-service-base.ts +++ b/packages/aws-cdk-lib/aws-ecs-patterns/lib/base/queue-processing-service-base.ts @@ -303,12 +303,12 @@ export abstract class QueueProcessingServiceBase extends Construct { /** * Flag to disable CPU based auto scaling strategy on the service. */ - readonly disableCpuBasedScaling: boolean; + private readonly disableCpuBasedScaling: boolean; /** * The target CPU utilization percentage for CPU based scaling strategy when enabled. */ - readonly cpuTargetUtilizationPercent: number; + private readonly cpuTargetUtilizationPercent: number; /** * Constructs a new instance of the QueueProcessingServiceBase class.