diff --git a/CHANGELOG.md b/CHANGELOG.md
index bfe6fd059..b845e6965 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,14 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+## [2.73.0](https://github.com/awslabs/aws-solutions-constructs/compare/v2.72.0...v2.73.0) (2024-10-21)
+
+Build on CDK v2.161.0
+
+### Features
+
+* **aws-sqs-pipes-stepfunctions:** new construct ([#1220](https://github.com/awslabs/aws-solutions-constructs/issues/1220)) ([c508279](https://github.com/awslabs/aws-solutions-constructs/commit/c508279b6f69a1126e8b58bf6bfc13d246ea2a9e))
+
## [2.72.0](https://github.com/awslabs/aws-solutions-constructs/compare/v2.71.0...v2.72.0) (2024-10-06)
Build on CDK v2.161.0
diff --git a/DESIGN_GUIDELINES.md b/DESIGN_GUIDELINES.md
index a7cf6f699..4c06c52e3 100644
--- a/DESIGN_GUIDELINES.md
+++ b/DESIGN_GUIDELINES.md
@@ -332,9 +332,9 @@ Existing Inconsistencies would not be published, that’s for our internal use
| deadLetterQueueProps? | [`sqs.QueueProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.QueueProps.html)|Optional user provided props to override the default props for the SQS queue.|
| maxReceiveCount | `int` | The number of times a message can be unsuccessfully dequeued before being moved to the dead letter queue. Defaults to `15`. |
| enableQueuePurging | `boolean` | Whether to grant additional permissions to the Lambda function enabling it to purge the SQS queue. Defaults to `false`. | This is only on 2 constructs, docs talk about a Lambda function role.|
-|enableEncryptionWithCustomerManagedKey?|`boolean`|If no key is provided, this flag determines whether the queue is encrypted with a new CMK or an AWS managed key. |This flag is ignored if any of the following are defined: queueProps.encryptionMasterKey, encryptionKey or encryptionKeyProps.|
-|encryptionKey?|[`kms.Key`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_kms.Key.html)|An optional, imported encryption key to encrypt the SQS Queue with.|Sending messages from an AWS service to an encrypted queue [requires a Customer Master key](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-key-management.html#compatibility-with-aws-services). Those constructs require these properties. |
-|encryptionKeyProps?|[`kms.KeyProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_kms.Key.html#construct-props)|Optional user provided properties to override the default properties for the KMS encryption key used to encrypt the SQS queue with.|
+|enableEncryptionWithCustomerManagedKey? or encryptQueueWithCmk?|`boolean`|If no key is provided, this flag determines whether the queue is encrypted with a new CMK or an AWS managed key. |In early constructs, the enableEncryptionKeyWithCustomerManagedKey name was used. Later constructs saw name collisions with this name and services like SNS, so the new queue specific name was adopted. This flag is ignored if any of the following are defined: queueProps.encryptionMasterKey, encryptionKey or encryptionKeyProps.|
+|encryptionKey? or queueEncryptionKey?|[`kms.Key`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_kms.Key.html)|An optional, imported encryption key to encrypt the SQS Queue with.|Sending messages from an AWS service to an encrypted queue [requires a Customer Master key](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-key-management.html#compatibility-with-aws-services). Those constructs require these properties. In early constructs, the enableEncryptionKeyWithCustomerManagedKey name was used. Later constructs saw name collisions with this name and services like SNS, so the new queue specific name was adopted. |
+|encryptionKeyProps? or queueEncryptionKeyProps?|[`kms.KeyProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_kms.Key.html#construct-props)|Optional user provided properties to override the default properties for the KMS encryption key used to encrypt the SQS queue with.|In early constructs, the enableEncryptionKeyWithCustomerManagedKey name was used. Later constructs saw name collisions with this name and services like SNS, so the new queue specific name was adopted. |
**Required Construct Properties**
diff --git a/source/lerna.json b/source/lerna.json
index b9499e273..796014f02 100644
--- a/source/lerna.json
+++ b/source/lerna.json
@@ -5,5 +5,5 @@
"patterns/@aws-solutions-constructs/*"
],
"rejectCycles": "true",
- "version": "2.72.0"
+ "version": "2.73.0"
}
diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-s3/lib/index.ts b/source/patterns/@aws-solutions-constructs/aws-fargate-s3/lib/index.ts
index d04dbf50d..1fae0770f 100644
--- a/source/patterns/@aws-solutions-constructs/aws-fargate-s3/lib/index.ts
+++ b/source/patterns/@aws-solutions-constructs/aws-fargate-s3/lib/index.ts
@@ -240,14 +240,10 @@ export class FargateToS3 extends Construct {
}
// Add environment variables
- const bucketArnEnvironmentVariableName = this.SetStringWithDefault(props.bucketArnEnvironmentVariableName, 'S3_BUCKET_ARN');
+ const bucketArnEnvironmentVariableName = defaults.CheckStringWithDefault(props.bucketArnEnvironmentVariableName, 'S3_BUCKET_ARN');
this.container.addEnvironment(bucketArnEnvironmentVariableName, this.s3BucketInterface.bucketArn);
- const bucketEnvironmentVariableName = this.SetStringWithDefault(props.bucketEnvironmentVariableName, 'S3_BUCKET_NAME');
+ const bucketEnvironmentVariableName = defaults.CheckStringWithDefault(props.bucketEnvironmentVariableName, 'S3_BUCKET_NAME');
this.container.addEnvironment(bucketEnvironmentVariableName, this.s3BucketInterface.bucketName);
}
-
- private SetStringWithDefault(value: string | undefined, defaultValue: string) {
- return value || defaultValue;
- }
}
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/.eslintignore b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/.eslintignore
new file mode 100644
index 000000000..4866847c3
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/.eslintignore
@@ -0,0 +1,7 @@
+lib/*.js
+test/*.js
+*.d.ts
+coverage
+test/integ.*.js.snapshot/
+test/cdk-integ.out.integ.*.snapshot
+test/lambda
\ No newline at end of file
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/.gitignore b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/.gitignore
new file mode 100644
index 000000000..8626f2274
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/.gitignore
@@ -0,0 +1,16 @@
+lib/*.js
+test/*.js
+!test/lambda/*
+*.js.map
+*.d.ts
+node_modules
+*.generated.ts
+dist
+.jsii
+
+.LAST_BUILD
+.nyc_output
+coverage
+.nycrc
+.LAST_PACKAGE
+*.snk
\ No newline at end of file
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/.npmignore b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/.npmignore
new file mode 100644
index 000000000..f66791629
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/.npmignore
@@ -0,0 +1,21 @@
+# Exclude typescript source and config
+*.ts
+tsconfig.json
+coverage
+.nyc_output
+*.tgz
+*.snk
+*.tsbuildinfo
+
+# Include javascript files and typescript declarations
+!*.js
+!*.d.ts
+
+# Exclude jsii outdir
+dist
+
+# Include .jsii
+!.jsii
+
+# Include .jsii
+!.jsii
\ No newline at end of file
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/README.md b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/README.md
new file mode 100644
index 000000000..2ce7bff79
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/README.md
@@ -0,0 +1,100 @@
+# aws-sqs-pipes-stepfunctions module
+
+
+---
+
+![Stability: Experimental](https://img.shields.io/badge/stability-Experimental-important.svg?style=for-the-badge)
+
+---
+
+
+| **Reference Documentation**:| https://docs.aws.amazon.com/solutions/latest/constructs/|
+|:-------------|:-------------|
+
+
+| **Language** | **Package** |
+|:-------------|-----------------|
+|![Python Logo](https://docs.aws.amazon.com/cdk/api/latest/img/python32.png) Python|`aws_solutions_constructs.aws_sqs_pipes_stepfunctions`|
+|![Typescript Logo](https://docs.aws.amazon.com/cdk/api/latest/img/typescript32.png) Typescript|`@aws-solutions-constructs/aws-sqs-pipes-stepfunctions`|
+|![Java Logo](https://docs.aws.amazon.com/cdk/api/latest/img/java32.png) Java|`software.amazon.awsconstructs.services.sqspipesstepfunctions`|
+
+## Overview
+This AWS Solutions Construct implements an AWS SQS queue whose messages are passed to an AWS Step Functions state machine by an Amazon Eventbridge pipe.
+
+Here is a minimal deployable pattern definition:
+
+Typescript
+``` typescript
+import { Construct } from 'constructs';
+import { Stack, StackProps } from 'aws-cdk-lib';
+import * as stepfunctions from 'aws-cdk-lib/aws-stepfunctions';
+import { SqsToPipesToStepfunctions, SqsToPipesToStepfunctionsProps } from "@aws-solutions-constructs/aws-sqs-pipes-stepfunctions";
+
+const startState = new stepfunctions.Pass(this, 'StartState');
+
+new SqsToPipesToStepfunctions(this, 'SqsToLambdaToStepfunctionsPattern', {
+ stateMachineProps: {
+ definition: startState
+ }
+});
+```
+
+## Pattern Construct Props
+
+| **Name** | **Type** | **Description** |
+|:-------------|:----------------|-----------------|
+|existingQueueObj?|[`sqs.Queue`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.Queue.html)|An optional, existing SQS queue to be used instead of the default queue. Providing both this and `queueProps` will cause an error.|
+|queueProps?|[`sqs.QueueProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.QueueProps.html)|Optional user provided properties to override the default properties for the SQS queue.|
+|encryptQueueWithCmk|`boolean`|Whether to encrypt the Queue with a customer managed KMS key (CMK). This is the default behavior, and this property defaults to true - if it is explicitly set to false then the Queue is encrypted with an Amazon managed KMS key. For a completely unencrypted Queue (not recommended), create the Queue separately from the construct and pass it in using the existingQueueObject. Since SNS subscriptions do not currently support SQS queues with AWS managed encryption keys, setting this to false will always result in an error from the underlying CDK - we have still included this property for consistency with topics and to be ready if the services one day support this functionality.|
+|queueEncryptionKeyProps?|[`kms.KeyProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_kms.Key.html#construct-props)|An optional subset of key properties to override the default properties used by constructs (`enableKeyRotation: true`). These properties will be used in constructing the CMK used to encrypt the SQS queue.|
+|existingQueueEncryptionKey?|[`kms.Key`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_kms.Key.html)|An optional CMK that will be used by the construct to encrypt the new SQS queue.|
+|deployDeadLetterQueue?|`boolean`|Whether to create a secondary queue to be used as a dead letter queue. Defaults to true.|
+|deadLetterQueueProps?|[`sqs.QueueProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.QueueProps.html)|Optional user-provided props to override the default props for the dead letter SQS queue.|
+|maxReceiveCount?|`number`|The number of times a message can be unsuccessfully dequeued before being moved to the dead letter queue. Defaults to 15.|
+|stateMachineProps|[`sfn.StateMachineProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions.StateMachineProps.html)|User provided props for the sfn.StateMachine.|
+|createCloudWatchAlarms?|`boolean`|Whether to create recommended CloudWatch alarms|
+| logGroupProps? | [logs.logGroupProps ](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_logs.LogGroupProps.html)| Optional user provided props to override the default props for for the CloudWatchLogs LogGroup for the state machine. |
+|pipeProps?|[ pipes.CfnPipeProps ](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_pipes.CfnPipeProps.html)|Optional customer provided settings for the EventBridge pipe. source, target, roleArn and enrichment settings are set by the construct and cannot be overriden here. The construct will generate default sourceParameters, targetParameters and logConfiguration (found [here](link)) that can be overriden by populating those values in these props. If the client wants to implement enrichment or a filter, this is where that information can be provided. Any other props can be freely overridden. If a client wants to set values such as batchSize, that can be done here in the sourceParameters property.|
+| enrichmentFunction? | [lambda.Function ](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html) | Optional - Lambda function that the construct will configure to be called to enrich the message between source and target. The construct will configure the pipe IAM role to allow invoking the function (but will not affect the IArole assigned to the function). Specifying both this and enrichmentStateMachine is an error. Default - undefined |
+| enrichmentStateMachine? | [sfn.StateMachine ](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions.StateMachine.html) | Optional - Step Functions state machine that the construct will configure to be called to enrich the message between source and target. The construct will configure the pipe IAM role to allow executing the state machine (but will not affect the IAM role assigned to the state machine). Specifying both this and enrichmentStateMachine is an error. Default - undefined |
+|logLevel?|PipesLogLevel|Threshold for what messages the new pipe sends to the log, PipesLogLevel.OFF, PipesLogLevel.ERROR, PipesLogLevel.INFO, PipesLogLevel.TRACE. The default is INFO. Setting the level to OFF will prevent any log group from being created. Providing pipeProps.logConfiguration will controls all aspects of logging and any construct provided log configuration is disabled. If pipeProps.logConfiguration is provided then specifying this or pipeLogProps is an error. |
+|pipeLogProps?|[logs.LogGroupProps]()| Default behavior is for the this construct to create a new CloudWatch Logs log group for the pipe. These props are used to override defaults set by AWS or this construct. If there are concerns about the cost of log storage, this is where a client can specify a shorter retention duration (in days) |
+
+## Pattern Properties
+
+| **Name** | **Type** | **Description** |
+|:-------------|:----------------|-----------------|
+|stateMachine|[`sfn.StateMachine`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions.StateMachine.html)|Returns an instance of StateMachine created by the construct.|
+|stateMachineLogGroup|[`logs.ILogGroup`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_logs.ILogGroup.html)|Returns an instance of the ILogGroup created by the construct for StateMachine|
+|cloudwatchAlarms?|[`cloudwatch.Alarm[]`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudwatch.Alarm.html)|Returns a list of alarms created by the construct.|
+|sqsQueue|[`sqs.Queue`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.Queue.html)|Returns an instance of the SQS queue created by the pattern. |
+|deadLetterQueue?|[`sqs.Queue`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.Queue.html)|Returns an instance of the dead letter queue created by the pattern, if one is deployed.|
+|encryptionKey?|[kms.IKey](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_kms.IKey.html)|Returns an instance of kms.Key used for the SQS queue if key is customer managed.|
+|pipe|[ pipes.CfnPipe](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_pipes.CfnPipe.html)| The L1 pipe construct created by this Solutions Construct. |
+| pipeRole | [iam.Role ](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iam.Role.html) | The role created that allows the pipe to access both the source and the target. |
+
+## Default settings
+
+Out of the box implementation of the Construct without any override will set the following defaults:
+
+### Amazon SQS Queue
+* Deploy SQS dead-letter queue for the source SQS Queue.
+* Enable server-side encryption for source SQS Queue using AWS Managed KMS Key.
+* Enforce encryption of data in transit
+
+### AWS Step Functions State Machine
+* Deploy Step Functions standard state machine
+* Create CloudWatch log group with /vendedlogs/ prefix in name
+* Deploy best practices CloudWatch Alarms for the Step Functions
+
+### AWS EventBridge Pipe
+* Pipe configured with an SQS queue source and state machine target
+* A least privilege IAM role assigned to the pipe to access the queue and state machine
+* CloudWatch logs set up at the 'INFO' level
+* Encrypted with an AWS managed KMS key
+
+## Architecture
+![Architecture Diagram](architecture.png)
+
+***
+© Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
\ No newline at end of file
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/architecture.png b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/architecture.png
new file mode 100644
index 000000000..1838dfc7c
Binary files /dev/null and b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/architecture.png differ
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/integ.config.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/integ.config.json
new file mode 100644
index 000000000..e69de29bb
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/lib/index.ts b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/lib/index.ts
new file mode 100644
index 000000000..6a6391d2f
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/lib/index.ts
@@ -0,0 +1,206 @@
+/**
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
+ * with the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES
+ * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+
+import * as defaults from '@aws-solutions-constructs/core';
+import * as sfn from 'aws-cdk-lib/aws-stepfunctions';
+import * as logs from 'aws-cdk-lib/aws-logs';
+import * as iam from 'aws-cdk-lib/aws-iam';
+import * as cloudwatch from 'aws-cdk-lib/aws-cloudwatch';
+import * as sqs from 'aws-cdk-lib/aws-sqs';
+import * as lambda from 'aws-cdk-lib/aws-lambda';
+import * as pipes from 'aws-cdk-lib/aws-pipes';
+import * as kms from 'aws-cdk-lib/aws-kms';
+import { PipesLogLevel } from '@aws-solutions-constructs/core';
+export { PipesLogLevel } from '@aws-solutions-constructs/core';
+// Note: To ensure CDKv2 compatibility, keep the import statement for Construct separate
+import { Construct } from 'constructs';
+
+/**
+ * @summary The properties for the SnsToSqs class.
+ */
+export interface SqsToPipesToStepfunctionsProps {
+
+ // *******************
+ // Queue Props
+ // *******************
+
+ /**
+ * An optional, existing SQS queue to be used instead of the default queue. Providing both this and queueProps will cause an error.
+ */
+ readonly existingQueueObj?: sqs.Queue,
+ /**
+ * Optional user provided properties to override the default properties for the SQS queue.
+ */
+ readonly queueProps?: sqs.QueueProps,
+ /**
+ * Whether to encrypt the Queue with a customer managed KMS key (CMK). This is the default
+ * behavior, and this property defaults to true - if it is explicitly set to false then the Queue
+ * is encrypted with an Amazon managed KMS key. For a completely unencrypted Queue (not recommended),
+ * create the Queue separately from the construct and pass it in using the existingQueueObject. Since
+ * SNS subscriptions do not currently support SQS queues with AWS managed encryption keys, setting this
+ * to false will always result in an error from the underlying CDK - we have still included this property
+ * for consistency with topics and to be ready if the services one day support this functionality.
+ */
+ readonly encryptQueueWithCmk?: boolean,
+ /**
+ * An optional subset of key properties to override the default properties used by constructs (enableKeyRotation: true).
+ * These properties will be used in constructing the CMK used to encrypt the SQS queue.
+ */
+ readonly queueEncryptionKeyProps?: kms.KeyProps,
+ /**
+ * An optional CMK that will be used by the construct to encrypt the new SQS queue.
+ */
+ readonly existingQueueEncryptionKey?: kms.Key,
+ /**
+ * Whether to create a secondary queue to be used as a dead letter queue.
+ *
+ * default = true.
+ */
+ readonly deployDeadLetterQueue?: boolean,
+ /**
+ * Optional user-provided props to override the default props for the dead letter SQS queue.
+ */
+ readonly deadLetterQueueProps?: sqs.QueueProps,
+ /**
+ * The number of times a message can be unsuccessfully dequeued before being moved to the dead letter
+ * queue. Defaults to 15.
+ */
+ readonly maxReceiveCount?: number,
+
+ // *******************
+ // State Machine Props
+ // *******************
+
+ /**
+ * User provided props for the sfn.StateMachine.
+ */
+ readonly stateMachineProps: sfn.StateMachineProps,
+ /**
+ * Whether to create recommended CloudWatch alarms
+ *
+ * default = true
+ */
+ readonly createCloudWatchAlarms?: boolean,
+ /**
+ * Optional user provided props to override the default props for for the CloudWatchLogs LogGroup.
+ */
+ readonly logGroupProps?: logs.LogGroupProps,
+
+ // *******************
+ // Pipe Props
+ // *******************
+
+ /**
+ * Optional customer provided settings for the EventBridge pipe. source, target and
+ * roleArn are set by the construct and cannot be overriden. The construct will generate
+ * default sourceParameters, targetParameters and logConfiguration that can be
+ * overriden by populating those values in these props. If the client wants to implement
+ * enrichment or a filter, this is where that information can be provided. Any other props
+ * can be freely overridden.
+ */
+ readonly pipeProps?: pipes.CfnPipeProps | any,
+ /**
+ * Default behavior is for the this construct to create a new CloudWatch Logs log group for the pipe.
+ * These props are used to override defaults set by AWS or this construct. If there are concerns about
+ * the cost of log storage, this is where a client can specify a shorter retention duration (in days)
+ */
+ readonly pipeLogProps?: logs.LogGroupProps,
+ /**
+ * Threshold for what messages the new pipe sends to the log, PipesLogLevel.OFF, PipesLogLevel.ERROR,
+ * PipesLogLevel.INFO, PipesLogLevel.TRACE. The default is INFO. Setting the level to OFF will prevent
+ * any log group from being created. Providing pipeProps.logConfiguration will controls all aspects of
+ * logging and any construct provided log configuration is disabled. If pipeProps.logConfiguration is
+ * provided then specifying this or pipeLogProps is an error.
+ */
+ readonly logLevel?: PipesLogLevel,
+ /**
+ * Optional - Lambda function that the construct will configure to be called to enrich the message
+ * between source and target. The construct will configure the pipe IAM role to allow invoking the
+ * function (but will not affect the IArole assigned to the function). Specifying both this and
+ * enrichmentStateMachine is an error. Default - undefined
+ */
+ readonly enrichmentFunction?: lambda.Function,
+ /**
+ * Optional - Step Functions state machine that the construct will configure to be called to enrich the message
+ * between source and target. The construct will configure the pipe IAM role to allow executing the state
+ * machine (but will not affect the IAM role assigned to the state machine). Specifying both this and
+ * enrichmentStateMachine is an error. Enrichment is invoked synchronously, so this must be an EXPRESS
+ * state machin. Default - undefined
+ */
+ readonly enrichmentStateMachine?: sfn.StateMachine,
+
+}
+
+export class SqsToPipesToStepfunctions extends Construct {
+ public readonly stateMachine: sfn.StateMachine;
+ public readonly stateMachineLogGroup: logs.ILogGroup;
+ public readonly cloudwatchAlarms?: cloudwatch.Alarm[];
+ public readonly sqsQueue: sqs.Queue;
+ public readonly deadLetterQueue?: sqs.DeadLetterQueue;
+ public readonly encryptionKey?: kms.IKey;
+ public readonly pipe: pipes.CfnPipe;
+ public readonly pipeRole: iam.Role;
+ /**
+ * @summary Constructs a new instance of the SqsToPipesToStepfunctions class.
+ * @param {cdk.App} scope - represents the scope for all the resources.
+ * @param {string} id - this is a a scope-unique id.
+ * @param {SqsToPipesToStepfunctionsProps} props - user provided props for the construct.
+ * @access public
+ */
+ constructor(scope: Construct, id: string, props: SqsToPipesToStepfunctionsProps) {
+ super(scope, id);
+
+ defaults.CheckStateMachineProps(props);
+ defaults.CheckSqsProps(props);
+ defaults.CheckPipesProps(props);
+
+ // Create the Queue
+ // Setup the queue
+ const buildQueueResponse = defaults.buildQueue(this, 'queue', {
+ existingQueueObj: props.existingQueueObj,
+ queueProps: props.queueProps,
+ deployDeadLetterQueue: props.deployDeadLetterQueue,
+ deadLetterQueueProps: props.deadLetterQueueProps,
+ maxReceiveCount: props.maxReceiveCount,
+ enableEncryptionWithCustomerManagedKey: props.encryptQueueWithCmk,
+ encryptionKey: props.existingQueueEncryptionKey,
+ encryptionKeyProps: props.queueEncryptionKeyProps
+ });
+ this.sqsQueue = buildQueueResponse.queue;
+ this.deadLetterQueue = buildQueueResponse.dlq;
+
+ // Create the State Machine
+ const buildStateMachineResponse = defaults.buildStateMachine(this, defaults.idPlaceholder, {
+ stateMachineProps: props.stateMachineProps,
+ logGroupProps: props.logGroupProps,
+ createCloudWatchAlarms: props.createCloudWatchAlarms,
+ });
+ this.stateMachine = buildStateMachineResponse.stateMachine;
+ this.stateMachineLogGroup = buildStateMachineResponse.logGroup;
+ this.cloudwatchAlarms = buildStateMachineResponse.cloudWatchAlarms;
+
+ // Create the pipe to connect the queue and state machine
+ const buildPipeResponse = defaults.BuildPipe(this, id, {
+ source: defaults.CreateSqsSource(this.sqsQueue, props.pipeProps?.sourceParameters),
+ target: defaults.CreateStateMachineTarget(this.stateMachine, props.pipeProps?.targetParameters),
+ enrichmentFunction: props.enrichmentFunction,
+ enrichmentStateMachine: props.enrichmentStateMachine,
+ clientProps: props.pipeProps,
+ logLevel: props.logLevel,
+ pipeLogProps: props.pipeLogProps
+ });
+ this.pipe = buildPipeResponse.pipe;
+ this.pipeRole = buildPipeResponse.pipeRole;
+ defaults.addCfnGuardSuppressRules(this.pipeRole, ["IAM_NO_INLINE_POLICY_CHECK"]);
+ }
+}
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/package.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/package.json
new file mode 100644
index 000000000..844ea8e89
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/package.json
@@ -0,0 +1,96 @@
+{
+ "name": "@aws-solutions-constructs/aws-sqs-pipes-stepfunctions",
+ "version": "0.0.0",
+ "description": "CDK Constructs for Amazon SQS to AWS Step Functions via Amazon EventBridge Pipes integration.",
+ "main": "lib/index.js",
+ "types": "lib/index.d.ts",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/awslabs/aws-solutions-constructs.git",
+ "directory": "source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions"
+ },
+ "author": {
+ "name": "Amazon Web Services",
+ "url": "https://aws.amazon.com",
+ "organization": true
+ },
+ "license": "Apache-2.0",
+ "scripts": {
+ "build": "tsc -b .",
+ "lint": "eslint -c ../eslintrc.yml --ext=.js,.ts . && tslint --project .",
+ "lint-fix": "eslint -c ../eslintrc.yml --ext=.js,.ts --fix .",
+ "test": "jest --coverage",
+ "clean": "tsc -b --clean",
+ "watch": "tsc -b -w",
+ "integ": "integ-runner --update-on-failed",
+ "integ-no-clean": "integ-runner --update-on-failed --no-clean",
+ "integ-assert": "integ-runner",
+ "jsii": "jsii",
+ "jsii-pacmak": "jsii-pacmak",
+ "build+lint+test": "npm run jsii && npm run lint && npm test && npm run integ-assert",
+ "snapshot-update": "npm run jsii && npm test -- -u && npm run integ-assert"
+ },
+ "jsii": {
+ "outdir": "dist",
+ "targets": {
+ "java": {
+ "package": "software.amazon.awsconstructs.services.sqspipesstepfunctions",
+ "maven": {
+ "groupId": "software.amazon.awsconstructs",
+ "artifactId": "sqspipesstepfunctions"
+ }
+ },
+ "dotnet": {
+ "namespace": "Amazon.SolutionsConstructs.AWS.SqsPipesStepfunctions",
+ "packageId": "Amazon.SolutionsConstructs.AWS.SqsPipesStepfunctions",
+ "signAssembly": true,
+ "iconUrl": "https://raw.githubusercontent.com/aws/aws-cdk/master/logo/default-256-dark.png"
+ },
+ "python": {
+ "distName": "aws-solutions-constructs.aws-sqs-pipes-stepfunctions",
+ "module": "aws_solutions_constructs.aws_sqs_pipes_stepfunctions"
+ }
+ }
+ },
+ "dependencies": {
+ "@aws-cdk/integ-tests-alpha": "0.0.0-alpha.0",
+ "@aws-solutions-constructs/core": "0.0.0",
+ "@aws-solutions-constructs/resources": "0.0.0",
+ "constructs": "^10.0.0"
+ },
+ "devDependencies": {
+ "@types/jest": "^27.4.0",
+ "@types/node": "^10.3.0",
+ "constructs": "^10.0.0",
+ "aws-cdk-lib": "0.0.0"
+ },
+ "jest": {
+ "moduleFileExtensions": [
+ "js"
+ ],
+ "coverageReporters": [
+ "text",
+ [
+ "lcov",
+ {
+ "projectRoot": "../../../../"
+ }
+ ]
+ ]
+ },
+ "peerDependencies": {
+ "@aws-solutions-constructs/core": "0.0.0",
+ "@aws-solutions-constructs/resources": "0.0.0",
+ "constructs": "^10.0.0",
+ "aws-cdk-lib": "^0.0.0"
+ },
+ "keywords": [
+ "aws",
+ "cdk",
+ "awscdk",
+ "AWS Solutions Constructs",
+ "Amazon SQS",
+ "AWS Step Functions",
+ "Amazon EventBridge Pipes"
+ ]
+}
\ No newline at end of file
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-custom-log-level.js.snapshot/cdk.out b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-custom-log-level.js.snapshot/cdk.out
new file mode 100644
index 000000000..c6e612584
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-custom-log-level.js.snapshot/cdk.out
@@ -0,0 +1 @@
+{"version":"38.0.1"}
\ No newline at end of file
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-custom-log-level.js.snapshot/integ.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-custom-log-level.js.snapshot/integ.json
new file mode 100644
index 000000000..e6b61bf33
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-custom-log-level.js.snapshot/integ.json
@@ -0,0 +1,12 @@
+{
+ "version": "38.0.1",
+ "testCases": {
+ "sqspstp-custom-log-level/Integ/DefaultTest": {
+ "stacks": [
+ "sqspstp-custom-log-level"
+ ],
+ "assertionStack": "sqspstp-custom-log-level/Integ/DefaultTest/DeployAssert",
+ "assertionStackName": "sqspstpcustomloglevelIntegDefaultTestDeployAssertD542618D"
+ }
+ }
+}
\ No newline at end of file
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-custom-log-level.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-custom-log-level.js.snapshot/manifest.json
new file mode 100644
index 000000000..1c0481fff
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-custom-log-level.js.snapshot/manifest.json
@@ -0,0 +1,205 @@
+{
+ "version": "38.0.1",
+ "artifacts": {
+ "sqspstpcustomloglevelIntegDefaultTestDeployAssertD542618D.assets": {
+ "type": "cdk:asset-manifest",
+ "properties": {
+ "file": "sqspstpcustomloglevelIntegDefaultTestDeployAssertD542618D.assets.json",
+ "requiresBootstrapStackVersion": 6,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
+ }
+ },
+ "sqspstpcustomloglevelIntegDefaultTestDeployAssertD542618D": {
+ "type": "aws:cloudformation:stack",
+ "environment": "aws://unknown-account/unknown-region",
+ "properties": {
+ "templateFile": "sqspstpcustomloglevelIntegDefaultTestDeployAssertD542618D.template.json",
+ "terminationProtection": false,
+ "validateOnSynth": false,
+ "notificationArns": [],
+ "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": [
+ "sqspstpcustomloglevelIntegDefaultTestDeployAssertD542618D.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": [
+ "sqspstpcustomloglevelIntegDefaultTestDeployAssertD542618D.assets"
+ ],
+ "metadata": {
+ "/sqspstp-custom-log-level/Integ/DefaultTest/DeployAssert/BootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "BootstrapVersion"
+ }
+ ],
+ "/sqspstp-custom-log-level/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "CheckBootstrapVersion"
+ }
+ ]
+ },
+ "displayName": "sqspstp-custom-log-level/Integ/DefaultTest/DeployAssert"
+ },
+ "sqspstp-custom-log-level.assets": {
+ "type": "cdk:asset-manifest",
+ "properties": {
+ "file": "sqspstp-custom-log-level.assets.json",
+ "requiresBootstrapStackVersion": 6,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
+ }
+ },
+ "sqspstp-custom-log-level": {
+ "type": "aws:cloudformation:stack",
+ "environment": "aws://unknown-account/unknown-region",
+ "properties": {
+ "templateFile": "sqspstp-custom-log-level.template.json",
+ "terminationProtection": false,
+ "validateOnSynth": false,
+ "notificationArns": [],
+ "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}/41d8b338f9a9c9b5ee3d4ac8dba4c4ff565841684c143cfe86a343230f4cb394.json",
+ "requiresBootstrapStackVersion": 6,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
+ "additionalDependencies": [
+ "sqspstp-custom-log-level.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": [
+ "sqspstp-custom-log-level.assets"
+ ],
+ "metadata": {
+ "/sqspstp-custom-log-level/lambdas3stp-test/ServiceRole/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "lambdas3stptestServiceRoleF17BB6C7"
+ }
+ ],
+ "/sqspstp-custom-log-level/lambdas3stp-test/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "lambdas3stptest9FBDC6CE"
+ }
+ ],
+ "/sqspstp-custom-log-level/test-sqs-pipes-states-construct/queue-dlq/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructqueuedlq420A82FD"
+ }
+ ],
+ "/sqspstp-custom-log-level/test-sqs-pipes-states-construct/queue-dlq/Policy/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructqueuedlqPolicyB1D70483"
+ }
+ ],
+ "/sqspstp-custom-log-level/test-sqs-pipes-states-construct/queue/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructqueueA7C76715"
+ }
+ ],
+ "/sqspstp-custom-log-level/test-sqs-pipes-states-construct/queue/Policy/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructqueuePolicyFD32B562"
+ }
+ ],
+ "/sqspstp-custom-log-level/test-sqs-pipes-states-construct/StateMachineLogGroup/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructStateMachineLogGroupADE94F1D"
+ }
+ ],
+ "/sqspstp-custom-log-level/test-sqs-pipes-states-construct/StateMachine/Role/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructStateMachineRoleBF97BFC0"
+ }
+ ],
+ "/sqspstp-custom-log-level/test-sqs-pipes-states-construct/StateMachine/Role/DefaultPolicy/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructStateMachineRoleDefaultPolicyD1BA2BF2"
+ }
+ ],
+ "/sqspstp-custom-log-level/test-sqs-pipes-states-construct/StateMachine/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ ],
+ "/sqspstp-custom-log-level/test-sqs-pipes-states-construct/ExecutionFailedAlarm/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructExecutionFailedAlarm1002FF55"
+ }
+ ],
+ "/sqspstp-custom-log-level/test-sqs-pipes-states-construct/ExecutionThrottledAlarm/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructExecutionThrottledAlarm0242B01A"
+ }
+ ],
+ "/sqspstp-custom-log-level/test-sqs-pipes-states-construct/ExecutionAbortedAlarm/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructExecutionAbortedAlarm14349A7B"
+ }
+ ],
+ "/sqspstp-custom-log-level/test-sqs-pipes-states-construct/PipeRole--test-sqs-pipes-states-construct/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructPipeRoletestsqspipesstatesconstruct2CC9A13C"
+ }
+ ],
+ "/sqspstp-custom-log-level/test-sqs-pipes-states-construct/LogGroup-test-sqs-pipes-states-construct/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructLogGrouptestsqspipesstatesconstructF827FE15"
+ }
+ ],
+ "/sqspstp-custom-log-level/test-sqs-pipes-states-construct/pipe-test-sqs-pipes-states-construct": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructpipetestsqspipesstatesconstruct71A64A15"
+ }
+ ],
+ "/sqspstp-custom-log-level/BootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "BootstrapVersion"
+ }
+ ],
+ "/sqspstp-custom-log-level/CheckBootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "CheckBootstrapVersion"
+ }
+ ]
+ },
+ "displayName": "sqspstp-custom-log-level"
+ },
+ "Tree": {
+ "type": "cdk:tree",
+ "properties": {
+ "file": "tree.json"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-custom-log-level.js.snapshot/sqspstp-custom-log-level.assets.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-custom-log-level.js.snapshot/sqspstp-custom-log-level.assets.json
new file mode 100644
index 000000000..00bb55c09
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-custom-log-level.js.snapshot/sqspstp-custom-log-level.assets.json
@@ -0,0 +1,19 @@
+{
+ "version": "38.0.1",
+ "files": {
+ "41d8b338f9a9c9b5ee3d4ac8dba4c4ff565841684c143cfe86a343230f4cb394": {
+ "source": {
+ "path": "sqspstp-custom-log-level.template.json",
+ "packaging": "file"
+ },
+ "destinations": {
+ "current_account-current_region": {
+ "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
+ "objectKey": "41d8b338f9a9c9b5ee3d4ac8dba4c4ff565841684c143cfe86a343230f4cb394.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/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-custom-log-level.js.snapshot/sqspstp-custom-log-level.template.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-custom-log-level.js.snapshot/sqspstp-custom-log-level.template.json
new file mode 100644
index 000000000..b71b06498
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-custom-log-level.js.snapshot/sqspstp-custom-log-level.template.json
@@ -0,0 +1,654 @@
+{
+ "Resources": {
+ "lambdas3stptestServiceRoleF17BB6C7": {
+ "Type": "AWS::IAM::Role",
+ "Properties": {
+ "AssumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "lambda.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "ManagedPolicyArns": [
+ {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
+ ]
+ ]
+ }
+ ]
+ }
+ },
+ "lambdas3stptest9FBDC6CE": {
+ "Type": "AWS::Lambda::Function",
+ "Properties": {
+ "Code": {
+ "ZipFile": "exports.handler = async (event) => console.log(event)"
+ },
+ "Handler": "index.handler",
+ "Role": {
+ "Fn::GetAtt": [
+ "lambdas3stptestServiceRoleF17BB6C7",
+ "Arn"
+ ]
+ },
+ "Runtime": "nodejs20.x"
+ },
+ "DependsOn": [
+ "lambdas3stptestServiceRoleF17BB6C7"
+ ],
+ "Metadata": {
+ "cfn_nag": {
+ "rules_to_suppress": [
+ {
+ "id": "W58",
+ "reason": "This Lambda Function is created for integration testing purposes only and is not part of an actual construct"
+ },
+ {
+ "id": "W89",
+ "reason": "This Lambda Function is created for integration testing purposes only and is not part of an actual construct"
+ },
+ {
+ "id": "W92",
+ "reason": "This Lambda Function is created for integration testing purposes only and is not part of an actual construct"
+ }
+ ]
+ }
+ }
+ },
+ "testsqspipesstatesconstructqueuedlq420A82FD": {
+ "Type": "AWS::SQS::Queue",
+ "Properties": {
+ "KmsMasterKeyId": "alias/aws/sqs"
+ },
+ "UpdateReplacePolicy": "Delete",
+ "DeletionPolicy": "Delete"
+ },
+ "testsqspipesstatesconstructqueuedlqPolicyB1D70483": {
+ "Type": "AWS::SQS::QueuePolicy",
+ "Properties": {
+ "PolicyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "sqs:AddPermission",
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes",
+ "sqs:ReceiveMessage",
+ "sqs:RemovePermission",
+ "sqs:SendMessage",
+ "sqs:SetQueueAttributes"
+ ],
+ "Effect": "Allow",
+ "Principal": {
+ "AWS": {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::",
+ {
+ "Ref": "AWS::AccountId"
+ },
+ ":root"
+ ]
+ ]
+ }
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueuedlq420A82FD",
+ "Arn"
+ ]
+ },
+ "Sid": "QueueOwnerOnlyAccess"
+ },
+ {
+ "Action": "SQS:*",
+ "Condition": {
+ "Bool": {
+ "aws:SecureTransport": "false"
+ }
+ },
+ "Effect": "Deny",
+ "Principal": {
+ "AWS": "*"
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueuedlq420A82FD",
+ "Arn"
+ ]
+ },
+ "Sid": "HttpsOnly"
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "Queues": [
+ {
+ "Ref": "testsqspipesstatesconstructqueuedlq420A82FD"
+ }
+ ]
+ }
+ },
+ "testsqspipesstatesconstructqueueA7C76715": {
+ "Type": "AWS::SQS::Queue",
+ "Properties": {
+ "KmsMasterKeyId": "alias/aws/sqs",
+ "RedrivePolicy": {
+ "deadLetterTargetArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueuedlq420A82FD",
+ "Arn"
+ ]
+ },
+ "maxReceiveCount": 15
+ }
+ },
+ "UpdateReplacePolicy": "Delete",
+ "DeletionPolicy": "Delete"
+ },
+ "testsqspipesstatesconstructqueuePolicyFD32B562": {
+ "Type": "AWS::SQS::QueuePolicy",
+ "Properties": {
+ "PolicyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "sqs:AddPermission",
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes",
+ "sqs:ReceiveMessage",
+ "sqs:RemovePermission",
+ "sqs:SendMessage",
+ "sqs:SetQueueAttributes"
+ ],
+ "Effect": "Allow",
+ "Principal": {
+ "AWS": {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::",
+ {
+ "Ref": "AWS::AccountId"
+ },
+ ":root"
+ ]
+ ]
+ }
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ },
+ "Sid": "QueueOwnerOnlyAccess"
+ },
+ {
+ "Action": "SQS:*",
+ "Condition": {
+ "Bool": {
+ "aws:SecureTransport": "false"
+ }
+ },
+ "Effect": "Deny",
+ "Principal": {
+ "AWS": "*"
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ },
+ "Sid": "HttpsOnly"
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "Queues": [
+ {
+ "Ref": "testsqspipesstatesconstructqueueA7C76715"
+ }
+ ]
+ }
+ },
+ "testsqspipesstatesconstructStateMachineLogGroupADE94F1D": {
+ "Type": "AWS::Logs::LogGroup",
+ "Properties": {
+ "LogGroupName": {
+ "Fn::Join": [
+ "",
+ [
+ "/aws/vendedlogs/states/constructs/sqspstp-custom-log-leveltest-sqs-pipes-states-constructStateMachineLog-",
+ {
+ "Fn::Select": [
+ 2,
+ {
+ "Fn::Split": [
+ "/",
+ {
+ "Ref": "AWS::StackId"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ ]
+ }
+ },
+ "UpdateReplacePolicy": "Retain",
+ "DeletionPolicy": "Retain",
+ "Metadata": {
+ "cfn_nag": {
+ "rules_to_suppress": [
+ {
+ "id": "W86",
+ "reason": "Retention period for CloudWatchLogs LogGroups are set to 'Never Expire' to preserve customer data indefinitely"
+ },
+ {
+ "id": "W84",
+ "reason": "By default CloudWatchLogs LogGroups data is encrypted using the CloudWatch server-side encryption keys (AWS Managed Keys)"
+ }
+ ]
+ }
+ }
+ },
+ "testsqspipesstatesconstructStateMachineRoleBF97BFC0": {
+ "Type": "AWS::IAM::Role",
+ "Properties": {
+ "AssumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "states.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ }
+ }
+ },
+ "testsqspipesstatesconstructStateMachineRoleDefaultPolicyD1BA2BF2": {
+ "Type": "AWS::IAM::Policy",
+ "Properties": {
+ "PolicyDocument": {
+ "Statement": [
+ {
+ "Action": "lambda:InvokeFunction",
+ "Effect": "Allow",
+ "Resource": [
+ {
+ "Fn::GetAtt": [
+ "lambdas3stptest9FBDC6CE",
+ "Arn"
+ ]
+ },
+ {
+ "Fn::Join": [
+ "",
+ [
+ {
+ "Fn::GetAtt": [
+ "lambdas3stptest9FBDC6CE",
+ "Arn"
+ ]
+ },
+ ":*"
+ ]
+ ]
+ }
+ ]
+ },
+ {
+ "Action": [
+ "logs:CreateLogDelivery",
+ "logs:DeleteLogDelivery",
+ "logs:DescribeLogGroups",
+ "logs:DescribeResourcePolicies",
+ "logs:GetLogDelivery",
+ "logs:ListLogDeliveries",
+ "logs:PutResourcePolicy",
+ "logs:UpdateLogDelivery"
+ ],
+ "Effect": "Allow",
+ "Resource": "*"
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "PolicyName": "testsqspipesstatesconstructStateMachineRoleDefaultPolicyD1BA2BF2",
+ "Roles": [
+ {
+ "Ref": "testsqspipesstatesconstructStateMachineRoleBF97BFC0"
+ }
+ ]
+ },
+ "Metadata": {
+ "cfn_nag": {
+ "rules_to_suppress": [
+ {
+ "id": "W12",
+ "reason": "These are CDK defaults. The 'LogDelivery' actions do not support resource-level authorizations. Any logging is done by State Machine code"
+ }
+ ]
+ }
+ }
+ },
+ "testsqspipesstatesconstructStateMachine29272AA9": {
+ "Type": "AWS::StepFunctions::StateMachine",
+ "Properties": {
+ "DefinitionString": {
+ "Fn::Join": [
+ "",
+ [
+ "{\"StartAt\":\"tasks3stp-test\",\"States\":{\"tasks3stp-test\":{\"End\":true,\"Retry\":[{\"ErrorEquals\":[\"Lambda.ClientExecutionTimeoutException\",\"Lambda.ServiceException\",\"Lambda.AWSLambdaException\",\"Lambda.SdkClientException\"],\"IntervalSeconds\":2,\"MaxAttempts\":6,\"BackoffRate\":2}],\"Type\":\"Task\",\"Resource\":\"arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":states:::lambda:invoke\",\"Parameters\":{\"FunctionName\":\"",
+ {
+ "Fn::GetAtt": [
+ "lambdas3stptest9FBDC6CE",
+ "Arn"
+ ]
+ },
+ "\",\"Payload.$\":\"$\"}}}}"
+ ]
+ ]
+ },
+ "LoggingConfiguration": {
+ "Destinations": [
+ {
+ "CloudWatchLogsLogGroup": {
+ "LogGroupArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructStateMachineLogGroupADE94F1D",
+ "Arn"
+ ]
+ }
+ }
+ }
+ ],
+ "Level": "ERROR"
+ },
+ "RoleArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructStateMachineRoleBF97BFC0",
+ "Arn"
+ ]
+ }
+ },
+ "DependsOn": [
+ "testsqspipesstatesconstructStateMachineRoleDefaultPolicyD1BA2BF2",
+ "testsqspipesstatesconstructStateMachineRoleBF97BFC0"
+ ],
+ "UpdateReplacePolicy": "Delete",
+ "DeletionPolicy": "Delete"
+ },
+ "testsqspipesstatesconstructExecutionFailedAlarm1002FF55": {
+ "Type": "AWS::CloudWatch::Alarm",
+ "Properties": {
+ "AlarmDescription": "Alarm for the number of executions that failed exceeded the threshold of 1. ",
+ "ComparisonOperator": "GreaterThanOrEqualToThreshold",
+ "Dimensions": [
+ {
+ "Name": "StateMachineArn",
+ "Value": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "EvaluationPeriods": 1,
+ "MetricName": "ExecutionsFailed",
+ "Namespace": "AWS/States",
+ "Period": 300,
+ "Statistic": "Sum",
+ "Threshold": 1
+ }
+ },
+ "testsqspipesstatesconstructExecutionThrottledAlarm0242B01A": {
+ "Type": "AWS::CloudWatch::Alarm",
+ "Properties": {
+ "AlarmDescription": "Alarm for the number of executions that throttled exceeded the threshold of 1. ",
+ "ComparisonOperator": "GreaterThanOrEqualToThreshold",
+ "Dimensions": [
+ {
+ "Name": "StateMachineArn",
+ "Value": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "EvaluationPeriods": 1,
+ "MetricName": "ExecutionThrottled",
+ "Namespace": "AWS/States",
+ "Period": 300,
+ "Statistic": "Sum",
+ "Threshold": 1
+ }
+ },
+ "testsqspipesstatesconstructExecutionAbortedAlarm14349A7B": {
+ "Type": "AWS::CloudWatch::Alarm",
+ "Properties": {
+ "AlarmDescription": "Alarm for the number of executions that aborted exceeded the threshold of 1. ",
+ "ComparisonOperator": "GreaterThanOrEqualToThreshold",
+ "Dimensions": [
+ {
+ "Name": "StateMachineArn",
+ "Value": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "EvaluationPeriods": 1,
+ "MetricName": "ExecutionsAborted",
+ "Namespace": "AWS/States",
+ "Period": 300,
+ "Statistic": "Maximum",
+ "Threshold": 1
+ }
+ },
+ "testsqspipesstatesconstructPipeRoletestsqspipesstatesconstruct2CC9A13C": {
+ "Type": "AWS::IAM::Role",
+ "Properties": {
+ "AssumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "pipes.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "Policies": [
+ {
+ "PolicyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes",
+ "sqs:ReceiveMessage"
+ ],
+ "Effect": "Allow",
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "PolicyName": "sourcePolicy"
+ },
+ {
+ "PolicyDocument": {
+ "Statement": [
+ {
+ "Action": "states:StartExecution",
+ "Effect": "Allow",
+ "Resource": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "PolicyName": "targetPolicy"
+ }
+ ]
+ },
+ "Metadata": {
+ "guard": {
+ "SuppressedRules": [
+ "IAM_NO_INLINE_POLICY_CHECK"
+ ]
+ }
+ }
+ },
+ "testsqspipesstatesconstructLogGrouptestsqspipesstatesconstructF827FE15": {
+ "Type": "AWS::Logs::LogGroup",
+ "Properties": {
+ "LogGroupName": {
+ "Fn::Join": [
+ "",
+ [
+ "/aws/vendedlogs/pipes/constructs/sqspstp-custom-log-leveltest-sqs-pipes-states-constructPipesLog-",
+ {
+ "Fn::Select": [
+ 2,
+ {
+ "Fn::Split": [
+ "/",
+ {
+ "Ref": "AWS::StackId"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ ]
+ }
+ },
+ "UpdateReplacePolicy": "Retain",
+ "DeletionPolicy": "Retain",
+ "Metadata": {
+ "cfn_nag": {
+ "rules_to_suppress": [
+ {
+ "id": "W86",
+ "reason": "Retention period for CloudWatchLogs LogGroups are set to 'Never Expire' to preserve customer data indefinitely"
+ },
+ {
+ "id": "W84",
+ "reason": "By default CloudWatchLogs LogGroups data is encrypted using the CloudWatch server-side encryption keys (AWS Managed Keys)"
+ }
+ ]
+ }
+ }
+ },
+ "testsqspipesstatesconstructpipetestsqspipesstatesconstruct71A64A15": {
+ "Type": "AWS::Pipes::Pipe",
+ "Properties": {
+ "LogConfiguration": {
+ "CloudwatchLogsLogDestination": {
+ "LogGroupArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructLogGrouptestsqspipesstatesconstructF827FE15",
+ "Arn"
+ ]
+ }
+ },
+ "Level": "TRACE"
+ },
+ "RoleArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructPipeRoletestsqspipesstatesconstruct2CC9A13C",
+ "Arn"
+ ]
+ },
+ "Source": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ },
+ "SourceParameters": {},
+ "Target": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ },
+ "TargetParameters": {
+ "StepFunctionStateMachineParameters": {
+ "InvocationType": "FIRE_AND_FORGET"
+ }
+ }
+ }
+ }
+ },
+ "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/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-custom-log-level.js.snapshot/sqspstpcustomloglevelIntegDefaultTestDeployAssertD542618D.assets.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-custom-log-level.js.snapshot/sqspstpcustomloglevelIntegDefaultTestDeployAssertD542618D.assets.json
new file mode 100644
index 000000000..62a2e7917
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-custom-log-level.js.snapshot/sqspstpcustomloglevelIntegDefaultTestDeployAssertD542618D.assets.json
@@ -0,0 +1,19 @@
+{
+ "version": "38.0.1",
+ "files": {
+ "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": {
+ "source": {
+ "path": "sqspstpcustomloglevelIntegDefaultTestDeployAssertD542618D.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/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-custom-log-level.js.snapshot/sqspstpcustomloglevelIntegDefaultTestDeployAssertD542618D.template.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-custom-log-level.js.snapshot/sqspstpcustomloglevelIntegDefaultTestDeployAssertD542618D.template.json
new file mode 100644
index 000000000..ad9d0fb73
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-custom-log-level.js.snapshot/sqspstpcustomloglevelIntegDefaultTestDeployAssertD542618D.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/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-custom-log-level.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-custom-log-level.js.snapshot/tree.json
new file mode 100644
index 000000000..ca04d4cd6
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-custom-log-level.js.snapshot/tree.json
@@ -0,0 +1,957 @@
+{
+ "version": "tree-0.1",
+ "tree": {
+ "id": "App",
+ "path": "",
+ "children": {
+ "sqspstp-custom-log-level": {
+ "id": "sqspstp-custom-log-level",
+ "path": "sqspstp-custom-log-level",
+ "children": {
+ "lambdas3stp-test": {
+ "id": "lambdas3stp-test",
+ "path": "sqspstp-custom-log-level/lambdas3stp-test",
+ "children": {
+ "ServiceRole": {
+ "id": "ServiceRole",
+ "path": "sqspstp-custom-log-level/lambdas3stp-test/ServiceRole",
+ "children": {
+ "ImportServiceRole": {
+ "id": "ImportServiceRole",
+ "path": "sqspstp-custom-log-level/lambdas3stp-test/ServiceRole/ImportServiceRole",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.Resource",
+ "version": "2.161.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-custom-log-level/lambdas3stp-test/ServiceRole/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::IAM::Role",
+ "aws:cdk:cloudformation:props": {
+ "assumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "lambda.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "managedPolicyArns": [
+ {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
+ ]
+ ]
+ }
+ ]
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.CfnRole",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.Role",
+ "version": "2.161.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-custom-log-level/lambdas3stp-test/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::Lambda::Function",
+ "aws:cdk:cloudformation:props": {
+ "code": {
+ "zipFile": "exports.handler = async (event) => console.log(event)"
+ },
+ "handler": "index.handler",
+ "role": {
+ "Fn::GetAtt": [
+ "lambdas3stptestServiceRoleF17BB6C7",
+ "Arn"
+ ]
+ },
+ "runtime": "nodejs20.x"
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_lambda.CfnFunction",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_lambda.Function",
+ "version": "2.161.0"
+ }
+ },
+ "tasks3stp-test": {
+ "id": "tasks3stp-test",
+ "path": "sqspstp-custom-log-level/tasks3stp-test",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_stepfunctions_tasks.LambdaInvoke",
+ "version": "2.161.0"
+ }
+ },
+ "test-sqs-pipes-states-construct": {
+ "id": "test-sqs-pipes-states-construct",
+ "path": "sqspstp-custom-log-level/test-sqs-pipes-states-construct",
+ "children": {
+ "queue-dlq": {
+ "id": "queue-dlq",
+ "path": "sqspstp-custom-log-level/test-sqs-pipes-states-construct/queue-dlq",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-custom-log-level/test-sqs-pipes-states-construct/queue-dlq/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::SQS::Queue",
+ "aws:cdk:cloudformation:props": {
+ "kmsMasterKeyId": "alias/aws/sqs"
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.CfnQueue",
+ "version": "2.161.0"
+ }
+ },
+ "Policy": {
+ "id": "Policy",
+ "path": "sqspstp-custom-log-level/test-sqs-pipes-states-construct/queue-dlq/Policy",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-custom-log-level/test-sqs-pipes-states-construct/queue-dlq/Policy/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::SQS::QueuePolicy",
+ "aws:cdk:cloudformation:props": {
+ "policyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "sqs:AddPermission",
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes",
+ "sqs:ReceiveMessage",
+ "sqs:RemovePermission",
+ "sqs:SendMessage",
+ "sqs:SetQueueAttributes"
+ ],
+ "Effect": "Allow",
+ "Principal": {
+ "AWS": {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::",
+ {
+ "Ref": "AWS::AccountId"
+ },
+ ":root"
+ ]
+ ]
+ }
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueuedlq420A82FD",
+ "Arn"
+ ]
+ },
+ "Sid": "QueueOwnerOnlyAccess"
+ },
+ {
+ "Action": "SQS:*",
+ "Condition": {
+ "Bool": {
+ "aws:SecureTransport": "false"
+ }
+ },
+ "Effect": "Deny",
+ "Principal": {
+ "AWS": "*"
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueuedlq420A82FD",
+ "Arn"
+ ]
+ },
+ "Sid": "HttpsOnly"
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "queues": [
+ {
+ "Ref": "testsqspipesstatesconstructqueuedlq420A82FD"
+ }
+ ]
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.Queue",
+ "version": "2.161.0"
+ }
+ },
+ "queue": {
+ "id": "queue",
+ "path": "sqspstp-custom-log-level/test-sqs-pipes-states-construct/queue",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-custom-log-level/test-sqs-pipes-states-construct/queue/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::SQS::Queue",
+ "aws:cdk:cloudformation:props": {
+ "kmsMasterKeyId": "alias/aws/sqs",
+ "redrivePolicy": {
+ "deadLetterTargetArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueuedlq420A82FD",
+ "Arn"
+ ]
+ },
+ "maxReceiveCount": 15
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.CfnQueue",
+ "version": "2.161.0"
+ }
+ },
+ "Policy": {
+ "id": "Policy",
+ "path": "sqspstp-custom-log-level/test-sqs-pipes-states-construct/queue/Policy",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-custom-log-level/test-sqs-pipes-states-construct/queue/Policy/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::SQS::QueuePolicy",
+ "aws:cdk:cloudformation:props": {
+ "policyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "sqs:AddPermission",
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes",
+ "sqs:ReceiveMessage",
+ "sqs:RemovePermission",
+ "sqs:SendMessage",
+ "sqs:SetQueueAttributes"
+ ],
+ "Effect": "Allow",
+ "Principal": {
+ "AWS": {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::",
+ {
+ "Ref": "AWS::AccountId"
+ },
+ ":root"
+ ]
+ ]
+ }
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ },
+ "Sid": "QueueOwnerOnlyAccess"
+ },
+ {
+ "Action": "SQS:*",
+ "Condition": {
+ "Bool": {
+ "aws:SecureTransport": "false"
+ }
+ },
+ "Effect": "Deny",
+ "Principal": {
+ "AWS": "*"
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ },
+ "Sid": "HttpsOnly"
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "queues": [
+ {
+ "Ref": "testsqspipesstatesconstructqueueA7C76715"
+ }
+ ]
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.Queue",
+ "version": "2.161.0"
+ }
+ },
+ "StateMachineLogGroup": {
+ "id": "StateMachineLogGroup",
+ "path": "sqspstp-custom-log-level/test-sqs-pipes-states-construct/StateMachineLogGroup",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-custom-log-level/test-sqs-pipes-states-construct/StateMachineLogGroup/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::Logs::LogGroup",
+ "aws:cdk:cloudformation:props": {
+ "logGroupName": {
+ "Fn::Join": [
+ "",
+ [
+ "/aws/vendedlogs/states/constructs/sqspstp-custom-log-leveltest-sqs-pipes-states-constructStateMachineLog-",
+ {
+ "Fn::Select": [
+ 2,
+ {
+ "Fn::Split": [
+ "/",
+ {
+ "Ref": "AWS::StackId"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ ]
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_logs.LogGroup",
+ "version": "2.161.0"
+ }
+ },
+ "StateMachine": {
+ "id": "StateMachine",
+ "path": "sqspstp-custom-log-level/test-sqs-pipes-states-construct/StateMachine",
+ "children": {
+ "Role": {
+ "id": "Role",
+ "path": "sqspstp-custom-log-level/test-sqs-pipes-states-construct/StateMachine/Role",
+ "children": {
+ "ImportRole": {
+ "id": "ImportRole",
+ "path": "sqspstp-custom-log-level/test-sqs-pipes-states-construct/StateMachine/Role/ImportRole",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.Resource",
+ "version": "2.161.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-custom-log-level/test-sqs-pipes-states-construct/StateMachine/Role/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::IAM::Role",
+ "aws:cdk:cloudformation:props": {
+ "assumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "states.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.CfnRole",
+ "version": "2.161.0"
+ }
+ },
+ "DefaultPolicy": {
+ "id": "DefaultPolicy",
+ "path": "sqspstp-custom-log-level/test-sqs-pipes-states-construct/StateMachine/Role/DefaultPolicy",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-custom-log-level/test-sqs-pipes-states-construct/StateMachine/Role/DefaultPolicy/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::IAM::Policy",
+ "aws:cdk:cloudformation:props": {
+ "policyDocument": {
+ "Statement": [
+ {
+ "Action": "lambda:InvokeFunction",
+ "Effect": "Allow",
+ "Resource": [
+ {
+ "Fn::GetAtt": [
+ "lambdas3stptest9FBDC6CE",
+ "Arn"
+ ]
+ },
+ {
+ "Fn::Join": [
+ "",
+ [
+ {
+ "Fn::GetAtt": [
+ "lambdas3stptest9FBDC6CE",
+ "Arn"
+ ]
+ },
+ ":*"
+ ]
+ ]
+ }
+ ]
+ },
+ {
+ "Action": [
+ "logs:CreateLogDelivery",
+ "logs:DeleteLogDelivery",
+ "logs:DescribeLogGroups",
+ "logs:DescribeResourcePolicies",
+ "logs:GetLogDelivery",
+ "logs:ListLogDeliveries",
+ "logs:PutResourcePolicy",
+ "logs:UpdateLogDelivery"
+ ],
+ "Effect": "Allow",
+ "Resource": "*"
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "policyName": "testsqspipesstatesconstructStateMachineRoleDefaultPolicyD1BA2BF2",
+ "roles": [
+ {
+ "Ref": "testsqspipesstatesconstructStateMachineRoleBF97BFC0"
+ }
+ ]
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.CfnPolicy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.Policy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.Role",
+ "version": "2.161.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-custom-log-level/test-sqs-pipes-states-construct/StateMachine/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::StepFunctions::StateMachine",
+ "aws:cdk:cloudformation:props": {
+ "definitionString": {
+ "Fn::Join": [
+ "",
+ [
+ "{\"StartAt\":\"tasks3stp-test\",\"States\":{\"tasks3stp-test\":{\"End\":true,\"Retry\":[{\"ErrorEquals\":[\"Lambda.ClientExecutionTimeoutException\",\"Lambda.ServiceException\",\"Lambda.AWSLambdaException\",\"Lambda.SdkClientException\"],\"IntervalSeconds\":2,\"MaxAttempts\":6,\"BackoffRate\":2}],\"Type\":\"Task\",\"Resource\":\"arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":states:::lambda:invoke\",\"Parameters\":{\"FunctionName\":\"",
+ {
+ "Fn::GetAtt": [
+ "lambdas3stptest9FBDC6CE",
+ "Arn"
+ ]
+ },
+ "\",\"Payload.$\":\"$\"}}}}"
+ ]
+ ]
+ },
+ "loggingConfiguration": {
+ "destinations": [
+ {
+ "cloudWatchLogsLogGroup": {
+ "logGroupArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructStateMachineLogGroupADE94F1D",
+ "Arn"
+ ]
+ }
+ }
+ }
+ ],
+ "level": "ERROR"
+ },
+ "roleArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructStateMachineRoleBF97BFC0",
+ "Arn"
+ ]
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_stepfunctions.CfnStateMachine",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_stepfunctions.StateMachine",
+ "version": "2.161.0"
+ }
+ },
+ "ExecutionFailedAlarm": {
+ "id": "ExecutionFailedAlarm",
+ "path": "sqspstp-custom-log-level/test-sqs-pipes-states-construct/ExecutionFailedAlarm",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-custom-log-level/test-sqs-pipes-states-construct/ExecutionFailedAlarm/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::CloudWatch::Alarm",
+ "aws:cdk:cloudformation:props": {
+ "alarmDescription": "Alarm for the number of executions that failed exceeded the threshold of 1. ",
+ "comparisonOperator": "GreaterThanOrEqualToThreshold",
+ "dimensions": [
+ {
+ "name": "StateMachineArn",
+ "value": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "evaluationPeriods": 1,
+ "metricName": "ExecutionsFailed",
+ "namespace": "AWS/States",
+ "period": 300,
+ "statistic": "Sum",
+ "threshold": 1
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm",
+ "version": "2.161.0"
+ }
+ },
+ "ExecutionThrottledAlarm": {
+ "id": "ExecutionThrottledAlarm",
+ "path": "sqspstp-custom-log-level/test-sqs-pipes-states-construct/ExecutionThrottledAlarm",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-custom-log-level/test-sqs-pipes-states-construct/ExecutionThrottledAlarm/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::CloudWatch::Alarm",
+ "aws:cdk:cloudformation:props": {
+ "alarmDescription": "Alarm for the number of executions that throttled exceeded the threshold of 1. ",
+ "comparisonOperator": "GreaterThanOrEqualToThreshold",
+ "dimensions": [
+ {
+ "name": "StateMachineArn",
+ "value": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "evaluationPeriods": 1,
+ "metricName": "ExecutionThrottled",
+ "namespace": "AWS/States",
+ "period": 300,
+ "statistic": "Sum",
+ "threshold": 1
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm",
+ "version": "2.161.0"
+ }
+ },
+ "ExecutionAbortedAlarm": {
+ "id": "ExecutionAbortedAlarm",
+ "path": "sqspstp-custom-log-level/test-sqs-pipes-states-construct/ExecutionAbortedAlarm",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-custom-log-level/test-sqs-pipes-states-construct/ExecutionAbortedAlarm/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::CloudWatch::Alarm",
+ "aws:cdk:cloudformation:props": {
+ "alarmDescription": "Alarm for the number of executions that aborted exceeded the threshold of 1. ",
+ "comparisonOperator": "GreaterThanOrEqualToThreshold",
+ "dimensions": [
+ {
+ "name": "StateMachineArn",
+ "value": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "evaluationPeriods": 1,
+ "metricName": "ExecutionsAborted",
+ "namespace": "AWS/States",
+ "period": 300,
+ "statistic": "Maximum",
+ "threshold": 1
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm",
+ "version": "2.161.0"
+ }
+ },
+ "PipeRole--test-sqs-pipes-states-construct": {
+ "id": "PipeRole--test-sqs-pipes-states-construct",
+ "path": "sqspstp-custom-log-level/test-sqs-pipes-states-construct/PipeRole--test-sqs-pipes-states-construct",
+ "children": {
+ "ImportPipeRole--test-sqs-pipes-states-construct": {
+ "id": "ImportPipeRole--test-sqs-pipes-states-construct",
+ "path": "sqspstp-custom-log-level/test-sqs-pipes-states-construct/PipeRole--test-sqs-pipes-states-construct/ImportPipeRole--test-sqs-pipes-states-construct",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.Resource",
+ "version": "2.161.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-custom-log-level/test-sqs-pipes-states-construct/PipeRole--test-sqs-pipes-states-construct/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::IAM::Role",
+ "aws:cdk:cloudformation:props": {
+ "assumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "pipes.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "policies": [
+ {
+ "policyName": "sourcePolicy",
+ "policyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes",
+ "sqs:ReceiveMessage"
+ ],
+ "Effect": "Allow",
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ }
+ },
+ {
+ "policyName": "targetPolicy",
+ "policyDocument": {
+ "Statement": [
+ {
+ "Action": "states:StartExecution",
+ "Effect": "Allow",
+ "Resource": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ }
+ }
+ ]
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.CfnRole",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.Role",
+ "version": "2.161.0"
+ }
+ },
+ "LogGroup-test-sqs-pipes-states-construct": {
+ "id": "LogGroup-test-sqs-pipes-states-construct",
+ "path": "sqspstp-custom-log-level/test-sqs-pipes-states-construct/LogGroup-test-sqs-pipes-states-construct",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-custom-log-level/test-sqs-pipes-states-construct/LogGroup-test-sqs-pipes-states-construct/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::Logs::LogGroup",
+ "aws:cdk:cloudformation:props": {
+ "logGroupName": {
+ "Fn::Join": [
+ "",
+ [
+ "/aws/vendedlogs/pipes/constructs/sqspstp-custom-log-leveltest-sqs-pipes-states-constructPipesLog-",
+ {
+ "Fn::Select": [
+ 2,
+ {
+ "Fn::Split": [
+ "/",
+ {
+ "Ref": "AWS::StackId"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ ]
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_logs.LogGroup",
+ "version": "2.161.0"
+ }
+ },
+ "pipe-test-sqs-pipes-states-construct": {
+ "id": "pipe-test-sqs-pipes-states-construct",
+ "path": "sqspstp-custom-log-level/test-sqs-pipes-states-construct/pipe-test-sqs-pipes-states-construct",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::Pipes::Pipe",
+ "aws:cdk:cloudformation:props": {
+ "logConfiguration": {
+ "cloudwatchLogsLogDestination": {
+ "logGroupArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructLogGrouptestsqspipesstatesconstructF827FE15",
+ "Arn"
+ ]
+ }
+ },
+ "level": "TRACE"
+ },
+ "roleArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructPipeRoletestsqspipesstatesconstruct2CC9A13C",
+ "Arn"
+ ]
+ },
+ "source": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ },
+ "sourceParameters": {},
+ "target": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ },
+ "targetParameters": {
+ "stepFunctionStateMachineParameters": {
+ "invocationType": "FIRE_AND_FORGET"
+ }
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_pipes.CfnPipe",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-solutions-constructs/aws-sqs-pipes-stepfunctions.SqsToPipesToStepfunctions",
+ "version": "2.72.0"
+ }
+ },
+ "Integ": {
+ "id": "Integ",
+ "path": "sqspstp-custom-log-level/Integ",
+ "children": {
+ "DefaultTest": {
+ "id": "DefaultTest",
+ "path": "sqspstp-custom-log-level/Integ/DefaultTest",
+ "children": {
+ "Default": {
+ "id": "Default",
+ "path": "sqspstp-custom-log-level/Integ/DefaultTest/Default",
+ "constructInfo": {
+ "fqn": "constructs.Construct",
+ "version": "10.4.2"
+ }
+ },
+ "DeployAssert": {
+ "id": "DeployAssert",
+ "path": "sqspstp-custom-log-level/Integ/DefaultTest/DeployAssert",
+ "children": {
+ "BootstrapVersion": {
+ "id": "BootstrapVersion",
+ "path": "sqspstp-custom-log-level/Integ/DefaultTest/DeployAssert/BootstrapVersion",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.CfnParameter",
+ "version": "2.161.0"
+ }
+ },
+ "CheckBootstrapVersion": {
+ "id": "CheckBootstrapVersion",
+ "path": "sqspstp-custom-log-level/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.CfnRule",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.Stack",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase",
+ "version": "2.161.0-alpha.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/integ-tests-alpha.IntegTest",
+ "version": "2.161.0-alpha.0"
+ }
+ },
+ "BootstrapVersion": {
+ "id": "BootstrapVersion",
+ "path": "sqspstp-custom-log-level/BootstrapVersion",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.CfnParameter",
+ "version": "2.161.0"
+ }
+ },
+ "CheckBootstrapVersion": {
+ "id": "CheckBootstrapVersion",
+ "path": "sqspstp-custom-log-level/CheckBootstrapVersion",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.CfnRule",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.Stack",
+ "version": "2.161.0"
+ }
+ },
+ "Tree": {
+ "id": "Tree",
+ "path": "Tree",
+ "constructInfo": {
+ "fqn": "constructs.Construct",
+ "version": "10.4.2"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.App",
+ "version": "2.161.0"
+ }
+ }
+}
\ No newline at end of file
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-custom-log-level.ts b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-custom-log-level.ts
new file mode 100644
index 000000000..28d8098bb
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-custom-log-level.ts
@@ -0,0 +1,35 @@
+/**
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
+ * with the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES
+ * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+
+/// !cdk-integ *
+import { App, Stack } from "aws-cdk-lib";
+import { SqsToPipesToStepfunctions, SqsToPipesToStepfunctionsProps } from "../lib";
+import { generateIntegStackName } from '@aws-solutions-constructs/core';
+import { IntegTest } from '@aws-cdk/integ-tests-alpha';
+import * as defaults from '@aws-solutions-constructs/core';
+
+const app = new App();
+const stack = new Stack(app, generateIntegStackName(__filename));
+
+const props: SqsToPipesToStepfunctionsProps = {
+ stateMachineProps: {
+ definitionBody: defaults.CreateTestStateMachineDefinitionBody(stack, 's3stp-test')
+ },
+ logLevel: defaults.PipesLogLevel.TRACE
+};
+
+new SqsToPipesToStepfunctions(stack, 'test-sqs-pipes-states-construct', props);
+
+new IntegTest(stack, 'Integ', { testCases: [
+ stack
+] });
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-existing-queue.js.snapshot/cdk.out b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-existing-queue.js.snapshot/cdk.out
new file mode 100644
index 000000000..c6e612584
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-existing-queue.js.snapshot/cdk.out
@@ -0,0 +1 @@
+{"version":"38.0.1"}
\ No newline at end of file
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-existing-queue.js.snapshot/integ.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-existing-queue.js.snapshot/integ.json
new file mode 100644
index 000000000..c2912b8a8
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-existing-queue.js.snapshot/integ.json
@@ -0,0 +1,12 @@
+{
+ "version": "38.0.1",
+ "testCases": {
+ "sqspstp-existing-queue/Integ/DefaultTest": {
+ "stacks": [
+ "sqspstp-existing-queue"
+ ],
+ "assertionStack": "sqspstp-existing-queue/Integ/DefaultTest/DeployAssert",
+ "assertionStackName": "sqspstpexistingqueueIntegDefaultTestDeployAssert6DA9FDD7"
+ }
+ }
+}
\ No newline at end of file
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-existing-queue.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-existing-queue.js.snapshot/manifest.json
new file mode 100644
index 000000000..c6d50adff
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-existing-queue.js.snapshot/manifest.json
@@ -0,0 +1,205 @@
+{
+ "version": "38.0.1",
+ "artifacts": {
+ "sqspstpexistingqueueIntegDefaultTestDeployAssert6DA9FDD7.assets": {
+ "type": "cdk:asset-manifest",
+ "properties": {
+ "file": "sqspstpexistingqueueIntegDefaultTestDeployAssert6DA9FDD7.assets.json",
+ "requiresBootstrapStackVersion": 6,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
+ }
+ },
+ "sqspstpexistingqueueIntegDefaultTestDeployAssert6DA9FDD7": {
+ "type": "aws:cloudformation:stack",
+ "environment": "aws://unknown-account/unknown-region",
+ "properties": {
+ "templateFile": "sqspstpexistingqueueIntegDefaultTestDeployAssert6DA9FDD7.template.json",
+ "terminationProtection": false,
+ "validateOnSynth": false,
+ "notificationArns": [],
+ "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": [
+ "sqspstpexistingqueueIntegDefaultTestDeployAssert6DA9FDD7.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": [
+ "sqspstpexistingqueueIntegDefaultTestDeployAssert6DA9FDD7.assets"
+ ],
+ "metadata": {
+ "/sqspstp-existing-queue/Integ/DefaultTest/DeployAssert/BootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "BootstrapVersion"
+ }
+ ],
+ "/sqspstp-existing-queue/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "CheckBootstrapVersion"
+ }
+ ]
+ },
+ "displayName": "sqspstp-existing-queue/Integ/DefaultTest/DeployAssert"
+ },
+ "sqspstp-existing-queue.assets": {
+ "type": "cdk:asset-manifest",
+ "properties": {
+ "file": "sqspstp-existing-queue.assets.json",
+ "requiresBootstrapStackVersion": 6,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
+ }
+ },
+ "sqspstp-existing-queue": {
+ "type": "aws:cloudformation:stack",
+ "environment": "aws://unknown-account/unknown-region",
+ "properties": {
+ "templateFile": "sqspstp-existing-queue.template.json",
+ "terminationProtection": false,
+ "validateOnSynth": false,
+ "notificationArns": [],
+ "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}/999c1d09e8422479a8bfc5e3959a462993a6ac0e0a1c76a7c54d28735f9b564b.json",
+ "requiresBootstrapStackVersion": 6,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
+ "additionalDependencies": [
+ "sqspstp-existing-queue.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": [
+ "sqspstp-existing-queue.assets"
+ ],
+ "metadata": {
+ "/sqspstp-existing-queue/existing-queue-dlq/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "existingqueuedlq98283DB9"
+ }
+ ],
+ "/sqspstp-existing-queue/existing-queue-dlq/Policy/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "existingqueuedlqPolicyAA729260"
+ }
+ ],
+ "/sqspstp-existing-queue/existing-queue/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "existingqueue03D57A53"
+ }
+ ],
+ "/sqspstp-existing-queue/existing-queue/Policy/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "existingqueuePolicy8BCB024D"
+ }
+ ],
+ "/sqspstp-existing-queue/lambdas3stp-test/ServiceRole/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "lambdas3stptestServiceRoleF17BB6C7"
+ }
+ ],
+ "/sqspstp-existing-queue/lambdas3stp-test/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "lambdas3stptest9FBDC6CE"
+ }
+ ],
+ "/sqspstp-existing-queue/test-sqs-pipes-states-construct/StateMachineLogGroup/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructStateMachineLogGroupADE94F1D"
+ }
+ ],
+ "/sqspstp-existing-queue/test-sqs-pipes-states-construct/StateMachine/Role/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructStateMachineRoleBF97BFC0"
+ }
+ ],
+ "/sqspstp-existing-queue/test-sqs-pipes-states-construct/StateMachine/Role/DefaultPolicy/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructStateMachineRoleDefaultPolicyD1BA2BF2"
+ }
+ ],
+ "/sqspstp-existing-queue/test-sqs-pipes-states-construct/StateMachine/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ ],
+ "/sqspstp-existing-queue/test-sqs-pipes-states-construct/ExecutionFailedAlarm/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructExecutionFailedAlarm1002FF55"
+ }
+ ],
+ "/sqspstp-existing-queue/test-sqs-pipes-states-construct/ExecutionThrottledAlarm/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructExecutionThrottledAlarm0242B01A"
+ }
+ ],
+ "/sqspstp-existing-queue/test-sqs-pipes-states-construct/ExecutionAbortedAlarm/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructExecutionAbortedAlarm14349A7B"
+ }
+ ],
+ "/sqspstp-existing-queue/test-sqs-pipes-states-construct/PipeRole--test-sqs-pipes-states-construct/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructPipeRoletestsqspipesstatesconstruct2CC9A13C"
+ }
+ ],
+ "/sqspstp-existing-queue/test-sqs-pipes-states-construct/LogGroup-test-sqs-pipes-states-construct/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructLogGrouptestsqspipesstatesconstructF827FE15"
+ }
+ ],
+ "/sqspstp-existing-queue/test-sqs-pipes-states-construct/pipe-test-sqs-pipes-states-construct": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructpipetestsqspipesstatesconstruct71A64A15"
+ }
+ ],
+ "/sqspstp-existing-queue/BootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "BootstrapVersion"
+ }
+ ],
+ "/sqspstp-existing-queue/CheckBootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "CheckBootstrapVersion"
+ }
+ ]
+ },
+ "displayName": "sqspstp-existing-queue"
+ },
+ "Tree": {
+ "type": "cdk:tree",
+ "properties": {
+ "file": "tree.json"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-existing-queue.js.snapshot/sqspstp-existing-queue.assets.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-existing-queue.js.snapshot/sqspstp-existing-queue.assets.json
new file mode 100644
index 000000000..49143e2cc
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-existing-queue.js.snapshot/sqspstp-existing-queue.assets.json
@@ -0,0 +1,19 @@
+{
+ "version": "38.0.1",
+ "files": {
+ "999c1d09e8422479a8bfc5e3959a462993a6ac0e0a1c76a7c54d28735f9b564b": {
+ "source": {
+ "path": "sqspstp-existing-queue.template.json",
+ "packaging": "file"
+ },
+ "destinations": {
+ "current_account-current_region": {
+ "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
+ "objectKey": "999c1d09e8422479a8bfc5e3959a462993a6ac0e0a1c76a7c54d28735f9b564b.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/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-existing-queue.js.snapshot/sqspstp-existing-queue.template.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-existing-queue.js.snapshot/sqspstp-existing-queue.template.json
new file mode 100644
index 000000000..e67918972
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-existing-queue.js.snapshot/sqspstp-existing-queue.template.json
@@ -0,0 +1,654 @@
+{
+ "Resources": {
+ "existingqueuedlq98283DB9": {
+ "Type": "AWS::SQS::Queue",
+ "Properties": {
+ "KmsMasterKeyId": "alias/aws/sqs"
+ },
+ "UpdateReplacePolicy": "Delete",
+ "DeletionPolicy": "Delete"
+ },
+ "existingqueuedlqPolicyAA729260": {
+ "Type": "AWS::SQS::QueuePolicy",
+ "Properties": {
+ "PolicyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "sqs:AddPermission",
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes",
+ "sqs:ReceiveMessage",
+ "sqs:RemovePermission",
+ "sqs:SendMessage",
+ "sqs:SetQueueAttributes"
+ ],
+ "Effect": "Allow",
+ "Principal": {
+ "AWS": {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::",
+ {
+ "Ref": "AWS::AccountId"
+ },
+ ":root"
+ ]
+ ]
+ }
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "existingqueuedlq98283DB9",
+ "Arn"
+ ]
+ },
+ "Sid": "QueueOwnerOnlyAccess"
+ },
+ {
+ "Action": "SQS:*",
+ "Condition": {
+ "Bool": {
+ "aws:SecureTransport": "false"
+ }
+ },
+ "Effect": "Deny",
+ "Principal": {
+ "AWS": "*"
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "existingqueuedlq98283DB9",
+ "Arn"
+ ]
+ },
+ "Sid": "HttpsOnly"
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "Queues": [
+ {
+ "Ref": "existingqueuedlq98283DB9"
+ }
+ ]
+ }
+ },
+ "existingqueue03D57A53": {
+ "Type": "AWS::SQS::Queue",
+ "Properties": {
+ "KmsMasterKeyId": "alias/aws/sqs",
+ "RedrivePolicy": {
+ "deadLetterTargetArn": {
+ "Fn::GetAtt": [
+ "existingqueuedlq98283DB9",
+ "Arn"
+ ]
+ },
+ "maxReceiveCount": 15
+ }
+ },
+ "UpdateReplacePolicy": "Delete",
+ "DeletionPolicy": "Delete"
+ },
+ "existingqueuePolicy8BCB024D": {
+ "Type": "AWS::SQS::QueuePolicy",
+ "Properties": {
+ "PolicyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "sqs:AddPermission",
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes",
+ "sqs:ReceiveMessage",
+ "sqs:RemovePermission",
+ "sqs:SendMessage",
+ "sqs:SetQueueAttributes"
+ ],
+ "Effect": "Allow",
+ "Principal": {
+ "AWS": {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::",
+ {
+ "Ref": "AWS::AccountId"
+ },
+ ":root"
+ ]
+ ]
+ }
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "existingqueue03D57A53",
+ "Arn"
+ ]
+ },
+ "Sid": "QueueOwnerOnlyAccess"
+ },
+ {
+ "Action": "SQS:*",
+ "Condition": {
+ "Bool": {
+ "aws:SecureTransport": "false"
+ }
+ },
+ "Effect": "Deny",
+ "Principal": {
+ "AWS": "*"
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "existingqueue03D57A53",
+ "Arn"
+ ]
+ },
+ "Sid": "HttpsOnly"
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "Queues": [
+ {
+ "Ref": "existingqueue03D57A53"
+ }
+ ]
+ }
+ },
+ "lambdas3stptestServiceRoleF17BB6C7": {
+ "Type": "AWS::IAM::Role",
+ "Properties": {
+ "AssumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "lambda.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "ManagedPolicyArns": [
+ {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
+ ]
+ ]
+ }
+ ]
+ }
+ },
+ "lambdas3stptest9FBDC6CE": {
+ "Type": "AWS::Lambda::Function",
+ "Properties": {
+ "Code": {
+ "ZipFile": "exports.handler = async (event) => console.log(event)"
+ },
+ "Handler": "index.handler",
+ "Role": {
+ "Fn::GetAtt": [
+ "lambdas3stptestServiceRoleF17BB6C7",
+ "Arn"
+ ]
+ },
+ "Runtime": "nodejs20.x"
+ },
+ "DependsOn": [
+ "lambdas3stptestServiceRoleF17BB6C7"
+ ],
+ "Metadata": {
+ "cfn_nag": {
+ "rules_to_suppress": [
+ {
+ "id": "W58",
+ "reason": "This Lambda Function is created for integration testing purposes only and is not part of an actual construct"
+ },
+ {
+ "id": "W89",
+ "reason": "This Lambda Function is created for integration testing purposes only and is not part of an actual construct"
+ },
+ {
+ "id": "W92",
+ "reason": "This Lambda Function is created for integration testing purposes only and is not part of an actual construct"
+ }
+ ]
+ }
+ }
+ },
+ "testsqspipesstatesconstructStateMachineLogGroupADE94F1D": {
+ "Type": "AWS::Logs::LogGroup",
+ "Properties": {
+ "LogGroupName": {
+ "Fn::Join": [
+ "",
+ [
+ "/aws/vendedlogs/states/constructs/sqspstp-existing-queuetest-sqs-pipes-states-constructStateMachineLog-",
+ {
+ "Fn::Select": [
+ 2,
+ {
+ "Fn::Split": [
+ "/",
+ {
+ "Ref": "AWS::StackId"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ ]
+ }
+ },
+ "UpdateReplacePolicy": "Retain",
+ "DeletionPolicy": "Retain",
+ "Metadata": {
+ "cfn_nag": {
+ "rules_to_suppress": [
+ {
+ "id": "W86",
+ "reason": "Retention period for CloudWatchLogs LogGroups are set to 'Never Expire' to preserve customer data indefinitely"
+ },
+ {
+ "id": "W84",
+ "reason": "By default CloudWatchLogs LogGroups data is encrypted using the CloudWatch server-side encryption keys (AWS Managed Keys)"
+ }
+ ]
+ }
+ }
+ },
+ "testsqspipesstatesconstructStateMachineRoleBF97BFC0": {
+ "Type": "AWS::IAM::Role",
+ "Properties": {
+ "AssumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "states.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ }
+ }
+ },
+ "testsqspipesstatesconstructStateMachineRoleDefaultPolicyD1BA2BF2": {
+ "Type": "AWS::IAM::Policy",
+ "Properties": {
+ "PolicyDocument": {
+ "Statement": [
+ {
+ "Action": "lambda:InvokeFunction",
+ "Effect": "Allow",
+ "Resource": [
+ {
+ "Fn::GetAtt": [
+ "lambdas3stptest9FBDC6CE",
+ "Arn"
+ ]
+ },
+ {
+ "Fn::Join": [
+ "",
+ [
+ {
+ "Fn::GetAtt": [
+ "lambdas3stptest9FBDC6CE",
+ "Arn"
+ ]
+ },
+ ":*"
+ ]
+ ]
+ }
+ ]
+ },
+ {
+ "Action": [
+ "logs:CreateLogDelivery",
+ "logs:DeleteLogDelivery",
+ "logs:DescribeLogGroups",
+ "logs:DescribeResourcePolicies",
+ "logs:GetLogDelivery",
+ "logs:ListLogDeliveries",
+ "logs:PutResourcePolicy",
+ "logs:UpdateLogDelivery"
+ ],
+ "Effect": "Allow",
+ "Resource": "*"
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "PolicyName": "testsqspipesstatesconstructStateMachineRoleDefaultPolicyD1BA2BF2",
+ "Roles": [
+ {
+ "Ref": "testsqspipesstatesconstructStateMachineRoleBF97BFC0"
+ }
+ ]
+ },
+ "Metadata": {
+ "cfn_nag": {
+ "rules_to_suppress": [
+ {
+ "id": "W12",
+ "reason": "These are CDK defaults. The 'LogDelivery' actions do not support resource-level authorizations. Any logging is done by State Machine code"
+ }
+ ]
+ }
+ }
+ },
+ "testsqspipesstatesconstructStateMachine29272AA9": {
+ "Type": "AWS::StepFunctions::StateMachine",
+ "Properties": {
+ "DefinitionString": {
+ "Fn::Join": [
+ "",
+ [
+ "{\"StartAt\":\"tasks3stp-test\",\"States\":{\"tasks3stp-test\":{\"End\":true,\"Retry\":[{\"ErrorEquals\":[\"Lambda.ClientExecutionTimeoutException\",\"Lambda.ServiceException\",\"Lambda.AWSLambdaException\",\"Lambda.SdkClientException\"],\"IntervalSeconds\":2,\"MaxAttempts\":6,\"BackoffRate\":2}],\"Type\":\"Task\",\"Resource\":\"arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":states:::lambda:invoke\",\"Parameters\":{\"FunctionName\":\"",
+ {
+ "Fn::GetAtt": [
+ "lambdas3stptest9FBDC6CE",
+ "Arn"
+ ]
+ },
+ "\",\"Payload.$\":\"$\"}}}}"
+ ]
+ ]
+ },
+ "LoggingConfiguration": {
+ "Destinations": [
+ {
+ "CloudWatchLogsLogGroup": {
+ "LogGroupArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructStateMachineLogGroupADE94F1D",
+ "Arn"
+ ]
+ }
+ }
+ }
+ ],
+ "Level": "ERROR"
+ },
+ "RoleArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructStateMachineRoleBF97BFC0",
+ "Arn"
+ ]
+ }
+ },
+ "DependsOn": [
+ "testsqspipesstatesconstructStateMachineRoleDefaultPolicyD1BA2BF2",
+ "testsqspipesstatesconstructStateMachineRoleBF97BFC0"
+ ],
+ "UpdateReplacePolicy": "Delete",
+ "DeletionPolicy": "Delete"
+ },
+ "testsqspipesstatesconstructExecutionFailedAlarm1002FF55": {
+ "Type": "AWS::CloudWatch::Alarm",
+ "Properties": {
+ "AlarmDescription": "Alarm for the number of executions that failed exceeded the threshold of 1. ",
+ "ComparisonOperator": "GreaterThanOrEqualToThreshold",
+ "Dimensions": [
+ {
+ "Name": "StateMachineArn",
+ "Value": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "EvaluationPeriods": 1,
+ "MetricName": "ExecutionsFailed",
+ "Namespace": "AWS/States",
+ "Period": 300,
+ "Statistic": "Sum",
+ "Threshold": 1
+ }
+ },
+ "testsqspipesstatesconstructExecutionThrottledAlarm0242B01A": {
+ "Type": "AWS::CloudWatch::Alarm",
+ "Properties": {
+ "AlarmDescription": "Alarm for the number of executions that throttled exceeded the threshold of 1. ",
+ "ComparisonOperator": "GreaterThanOrEqualToThreshold",
+ "Dimensions": [
+ {
+ "Name": "StateMachineArn",
+ "Value": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "EvaluationPeriods": 1,
+ "MetricName": "ExecutionThrottled",
+ "Namespace": "AWS/States",
+ "Period": 300,
+ "Statistic": "Sum",
+ "Threshold": 1
+ }
+ },
+ "testsqspipesstatesconstructExecutionAbortedAlarm14349A7B": {
+ "Type": "AWS::CloudWatch::Alarm",
+ "Properties": {
+ "AlarmDescription": "Alarm for the number of executions that aborted exceeded the threshold of 1. ",
+ "ComparisonOperator": "GreaterThanOrEqualToThreshold",
+ "Dimensions": [
+ {
+ "Name": "StateMachineArn",
+ "Value": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "EvaluationPeriods": 1,
+ "MetricName": "ExecutionsAborted",
+ "Namespace": "AWS/States",
+ "Period": 300,
+ "Statistic": "Maximum",
+ "Threshold": 1
+ }
+ },
+ "testsqspipesstatesconstructPipeRoletestsqspipesstatesconstruct2CC9A13C": {
+ "Type": "AWS::IAM::Role",
+ "Properties": {
+ "AssumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "pipes.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "Policies": [
+ {
+ "PolicyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes",
+ "sqs:ReceiveMessage"
+ ],
+ "Effect": "Allow",
+ "Resource": {
+ "Fn::GetAtt": [
+ "existingqueue03D57A53",
+ "Arn"
+ ]
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "PolicyName": "sourcePolicy"
+ },
+ {
+ "PolicyDocument": {
+ "Statement": [
+ {
+ "Action": "states:StartExecution",
+ "Effect": "Allow",
+ "Resource": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "PolicyName": "targetPolicy"
+ }
+ ]
+ },
+ "Metadata": {
+ "guard": {
+ "SuppressedRules": [
+ "IAM_NO_INLINE_POLICY_CHECK"
+ ]
+ }
+ }
+ },
+ "testsqspipesstatesconstructLogGrouptestsqspipesstatesconstructF827FE15": {
+ "Type": "AWS::Logs::LogGroup",
+ "Properties": {
+ "LogGroupName": {
+ "Fn::Join": [
+ "",
+ [
+ "/aws/vendedlogs/pipes/constructs/sqspstp-existing-queuetest-sqs-pipes-states-constructPipesLog-",
+ {
+ "Fn::Select": [
+ 2,
+ {
+ "Fn::Split": [
+ "/",
+ {
+ "Ref": "AWS::StackId"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ ]
+ }
+ },
+ "UpdateReplacePolicy": "Retain",
+ "DeletionPolicy": "Retain",
+ "Metadata": {
+ "cfn_nag": {
+ "rules_to_suppress": [
+ {
+ "id": "W86",
+ "reason": "Retention period for CloudWatchLogs LogGroups are set to 'Never Expire' to preserve customer data indefinitely"
+ },
+ {
+ "id": "W84",
+ "reason": "By default CloudWatchLogs LogGroups data is encrypted using the CloudWatch server-side encryption keys (AWS Managed Keys)"
+ }
+ ]
+ }
+ }
+ },
+ "testsqspipesstatesconstructpipetestsqspipesstatesconstruct71A64A15": {
+ "Type": "AWS::Pipes::Pipe",
+ "Properties": {
+ "LogConfiguration": {
+ "CloudwatchLogsLogDestination": {
+ "LogGroupArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructLogGrouptestsqspipesstatesconstructF827FE15",
+ "Arn"
+ ]
+ }
+ },
+ "Level": "INFO"
+ },
+ "RoleArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructPipeRoletestsqspipesstatesconstruct2CC9A13C",
+ "Arn"
+ ]
+ },
+ "Source": {
+ "Fn::GetAtt": [
+ "existingqueue03D57A53",
+ "Arn"
+ ]
+ },
+ "SourceParameters": {},
+ "Target": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ },
+ "TargetParameters": {
+ "StepFunctionStateMachineParameters": {
+ "InvocationType": "FIRE_AND_FORGET"
+ }
+ }
+ }
+ }
+ },
+ "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/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-existing-queue.js.snapshot/sqspstpexistingqueueIntegDefaultTestDeployAssert6DA9FDD7.assets.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-existing-queue.js.snapshot/sqspstpexistingqueueIntegDefaultTestDeployAssert6DA9FDD7.assets.json
new file mode 100644
index 000000000..5f89f68ba
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-existing-queue.js.snapshot/sqspstpexistingqueueIntegDefaultTestDeployAssert6DA9FDD7.assets.json
@@ -0,0 +1,19 @@
+{
+ "version": "38.0.1",
+ "files": {
+ "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": {
+ "source": {
+ "path": "sqspstpexistingqueueIntegDefaultTestDeployAssert6DA9FDD7.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/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-existing-queue.js.snapshot/sqspstpexistingqueueIntegDefaultTestDeployAssert6DA9FDD7.template.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-existing-queue.js.snapshot/sqspstpexistingqueueIntegDefaultTestDeployAssert6DA9FDD7.template.json
new file mode 100644
index 000000000..ad9d0fb73
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-existing-queue.js.snapshot/sqspstpexistingqueueIntegDefaultTestDeployAssert6DA9FDD7.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/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-existing-queue.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-existing-queue.js.snapshot/tree.json
new file mode 100644
index 000000000..49e851c4a
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-existing-queue.js.snapshot/tree.json
@@ -0,0 +1,957 @@
+{
+ "version": "tree-0.1",
+ "tree": {
+ "id": "App",
+ "path": "",
+ "children": {
+ "sqspstp-existing-queue": {
+ "id": "sqspstp-existing-queue",
+ "path": "sqspstp-existing-queue",
+ "children": {
+ "existing-queue-dlq": {
+ "id": "existing-queue-dlq",
+ "path": "sqspstp-existing-queue/existing-queue-dlq",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-existing-queue/existing-queue-dlq/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::SQS::Queue",
+ "aws:cdk:cloudformation:props": {
+ "kmsMasterKeyId": "alias/aws/sqs"
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.CfnQueue",
+ "version": "2.161.0"
+ }
+ },
+ "Policy": {
+ "id": "Policy",
+ "path": "sqspstp-existing-queue/existing-queue-dlq/Policy",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-existing-queue/existing-queue-dlq/Policy/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::SQS::QueuePolicy",
+ "aws:cdk:cloudformation:props": {
+ "policyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "sqs:AddPermission",
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes",
+ "sqs:ReceiveMessage",
+ "sqs:RemovePermission",
+ "sqs:SendMessage",
+ "sqs:SetQueueAttributes"
+ ],
+ "Effect": "Allow",
+ "Principal": {
+ "AWS": {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::",
+ {
+ "Ref": "AWS::AccountId"
+ },
+ ":root"
+ ]
+ ]
+ }
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "existingqueuedlq98283DB9",
+ "Arn"
+ ]
+ },
+ "Sid": "QueueOwnerOnlyAccess"
+ },
+ {
+ "Action": "SQS:*",
+ "Condition": {
+ "Bool": {
+ "aws:SecureTransport": "false"
+ }
+ },
+ "Effect": "Deny",
+ "Principal": {
+ "AWS": "*"
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "existingqueuedlq98283DB9",
+ "Arn"
+ ]
+ },
+ "Sid": "HttpsOnly"
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "queues": [
+ {
+ "Ref": "existingqueuedlq98283DB9"
+ }
+ ]
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.Queue",
+ "version": "2.161.0"
+ }
+ },
+ "existing-queue": {
+ "id": "existing-queue",
+ "path": "sqspstp-existing-queue/existing-queue",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-existing-queue/existing-queue/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::SQS::Queue",
+ "aws:cdk:cloudformation:props": {
+ "kmsMasterKeyId": "alias/aws/sqs",
+ "redrivePolicy": {
+ "deadLetterTargetArn": {
+ "Fn::GetAtt": [
+ "existingqueuedlq98283DB9",
+ "Arn"
+ ]
+ },
+ "maxReceiveCount": 15
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.CfnQueue",
+ "version": "2.161.0"
+ }
+ },
+ "Policy": {
+ "id": "Policy",
+ "path": "sqspstp-existing-queue/existing-queue/Policy",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-existing-queue/existing-queue/Policy/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::SQS::QueuePolicy",
+ "aws:cdk:cloudformation:props": {
+ "policyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "sqs:AddPermission",
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes",
+ "sqs:ReceiveMessage",
+ "sqs:RemovePermission",
+ "sqs:SendMessage",
+ "sqs:SetQueueAttributes"
+ ],
+ "Effect": "Allow",
+ "Principal": {
+ "AWS": {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::",
+ {
+ "Ref": "AWS::AccountId"
+ },
+ ":root"
+ ]
+ ]
+ }
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "existingqueue03D57A53",
+ "Arn"
+ ]
+ },
+ "Sid": "QueueOwnerOnlyAccess"
+ },
+ {
+ "Action": "SQS:*",
+ "Condition": {
+ "Bool": {
+ "aws:SecureTransport": "false"
+ }
+ },
+ "Effect": "Deny",
+ "Principal": {
+ "AWS": "*"
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "existingqueue03D57A53",
+ "Arn"
+ ]
+ },
+ "Sid": "HttpsOnly"
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "queues": [
+ {
+ "Ref": "existingqueue03D57A53"
+ }
+ ]
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.Queue",
+ "version": "2.161.0"
+ }
+ },
+ "lambdas3stp-test": {
+ "id": "lambdas3stp-test",
+ "path": "sqspstp-existing-queue/lambdas3stp-test",
+ "children": {
+ "ServiceRole": {
+ "id": "ServiceRole",
+ "path": "sqspstp-existing-queue/lambdas3stp-test/ServiceRole",
+ "children": {
+ "ImportServiceRole": {
+ "id": "ImportServiceRole",
+ "path": "sqspstp-existing-queue/lambdas3stp-test/ServiceRole/ImportServiceRole",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.Resource",
+ "version": "2.161.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-existing-queue/lambdas3stp-test/ServiceRole/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::IAM::Role",
+ "aws:cdk:cloudformation:props": {
+ "assumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "lambda.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "managedPolicyArns": [
+ {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
+ ]
+ ]
+ }
+ ]
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.CfnRole",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.Role",
+ "version": "2.161.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-existing-queue/lambdas3stp-test/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::Lambda::Function",
+ "aws:cdk:cloudformation:props": {
+ "code": {
+ "zipFile": "exports.handler = async (event) => console.log(event)"
+ },
+ "handler": "index.handler",
+ "role": {
+ "Fn::GetAtt": [
+ "lambdas3stptestServiceRoleF17BB6C7",
+ "Arn"
+ ]
+ },
+ "runtime": "nodejs20.x"
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_lambda.CfnFunction",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_lambda.Function",
+ "version": "2.161.0"
+ }
+ },
+ "tasks3stp-test": {
+ "id": "tasks3stp-test",
+ "path": "sqspstp-existing-queue/tasks3stp-test",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_stepfunctions_tasks.LambdaInvoke",
+ "version": "2.161.0"
+ }
+ },
+ "test-sqs-pipes-states-construct": {
+ "id": "test-sqs-pipes-states-construct",
+ "path": "sqspstp-existing-queue/test-sqs-pipes-states-construct",
+ "children": {
+ "StateMachineLogGroup": {
+ "id": "StateMachineLogGroup",
+ "path": "sqspstp-existing-queue/test-sqs-pipes-states-construct/StateMachineLogGroup",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-existing-queue/test-sqs-pipes-states-construct/StateMachineLogGroup/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::Logs::LogGroup",
+ "aws:cdk:cloudformation:props": {
+ "logGroupName": {
+ "Fn::Join": [
+ "",
+ [
+ "/aws/vendedlogs/states/constructs/sqspstp-existing-queuetest-sqs-pipes-states-constructStateMachineLog-",
+ {
+ "Fn::Select": [
+ 2,
+ {
+ "Fn::Split": [
+ "/",
+ {
+ "Ref": "AWS::StackId"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ ]
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_logs.LogGroup",
+ "version": "2.161.0"
+ }
+ },
+ "StateMachine": {
+ "id": "StateMachine",
+ "path": "sqspstp-existing-queue/test-sqs-pipes-states-construct/StateMachine",
+ "children": {
+ "Role": {
+ "id": "Role",
+ "path": "sqspstp-existing-queue/test-sqs-pipes-states-construct/StateMachine/Role",
+ "children": {
+ "ImportRole": {
+ "id": "ImportRole",
+ "path": "sqspstp-existing-queue/test-sqs-pipes-states-construct/StateMachine/Role/ImportRole",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.Resource",
+ "version": "2.161.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-existing-queue/test-sqs-pipes-states-construct/StateMachine/Role/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::IAM::Role",
+ "aws:cdk:cloudformation:props": {
+ "assumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "states.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.CfnRole",
+ "version": "2.161.0"
+ }
+ },
+ "DefaultPolicy": {
+ "id": "DefaultPolicy",
+ "path": "sqspstp-existing-queue/test-sqs-pipes-states-construct/StateMachine/Role/DefaultPolicy",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-existing-queue/test-sqs-pipes-states-construct/StateMachine/Role/DefaultPolicy/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::IAM::Policy",
+ "aws:cdk:cloudformation:props": {
+ "policyDocument": {
+ "Statement": [
+ {
+ "Action": "lambda:InvokeFunction",
+ "Effect": "Allow",
+ "Resource": [
+ {
+ "Fn::GetAtt": [
+ "lambdas3stptest9FBDC6CE",
+ "Arn"
+ ]
+ },
+ {
+ "Fn::Join": [
+ "",
+ [
+ {
+ "Fn::GetAtt": [
+ "lambdas3stptest9FBDC6CE",
+ "Arn"
+ ]
+ },
+ ":*"
+ ]
+ ]
+ }
+ ]
+ },
+ {
+ "Action": [
+ "logs:CreateLogDelivery",
+ "logs:DeleteLogDelivery",
+ "logs:DescribeLogGroups",
+ "logs:DescribeResourcePolicies",
+ "logs:GetLogDelivery",
+ "logs:ListLogDeliveries",
+ "logs:PutResourcePolicy",
+ "logs:UpdateLogDelivery"
+ ],
+ "Effect": "Allow",
+ "Resource": "*"
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "policyName": "testsqspipesstatesconstructStateMachineRoleDefaultPolicyD1BA2BF2",
+ "roles": [
+ {
+ "Ref": "testsqspipesstatesconstructStateMachineRoleBF97BFC0"
+ }
+ ]
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.CfnPolicy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.Policy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.Role",
+ "version": "2.161.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-existing-queue/test-sqs-pipes-states-construct/StateMachine/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::StepFunctions::StateMachine",
+ "aws:cdk:cloudformation:props": {
+ "definitionString": {
+ "Fn::Join": [
+ "",
+ [
+ "{\"StartAt\":\"tasks3stp-test\",\"States\":{\"tasks3stp-test\":{\"End\":true,\"Retry\":[{\"ErrorEquals\":[\"Lambda.ClientExecutionTimeoutException\",\"Lambda.ServiceException\",\"Lambda.AWSLambdaException\",\"Lambda.SdkClientException\"],\"IntervalSeconds\":2,\"MaxAttempts\":6,\"BackoffRate\":2}],\"Type\":\"Task\",\"Resource\":\"arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":states:::lambda:invoke\",\"Parameters\":{\"FunctionName\":\"",
+ {
+ "Fn::GetAtt": [
+ "lambdas3stptest9FBDC6CE",
+ "Arn"
+ ]
+ },
+ "\",\"Payload.$\":\"$\"}}}}"
+ ]
+ ]
+ },
+ "loggingConfiguration": {
+ "destinations": [
+ {
+ "cloudWatchLogsLogGroup": {
+ "logGroupArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructStateMachineLogGroupADE94F1D",
+ "Arn"
+ ]
+ }
+ }
+ }
+ ],
+ "level": "ERROR"
+ },
+ "roleArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructStateMachineRoleBF97BFC0",
+ "Arn"
+ ]
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_stepfunctions.CfnStateMachine",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_stepfunctions.StateMachine",
+ "version": "2.161.0"
+ }
+ },
+ "ExecutionFailedAlarm": {
+ "id": "ExecutionFailedAlarm",
+ "path": "sqspstp-existing-queue/test-sqs-pipes-states-construct/ExecutionFailedAlarm",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-existing-queue/test-sqs-pipes-states-construct/ExecutionFailedAlarm/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::CloudWatch::Alarm",
+ "aws:cdk:cloudformation:props": {
+ "alarmDescription": "Alarm for the number of executions that failed exceeded the threshold of 1. ",
+ "comparisonOperator": "GreaterThanOrEqualToThreshold",
+ "dimensions": [
+ {
+ "name": "StateMachineArn",
+ "value": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "evaluationPeriods": 1,
+ "metricName": "ExecutionsFailed",
+ "namespace": "AWS/States",
+ "period": 300,
+ "statistic": "Sum",
+ "threshold": 1
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm",
+ "version": "2.161.0"
+ }
+ },
+ "ExecutionThrottledAlarm": {
+ "id": "ExecutionThrottledAlarm",
+ "path": "sqspstp-existing-queue/test-sqs-pipes-states-construct/ExecutionThrottledAlarm",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-existing-queue/test-sqs-pipes-states-construct/ExecutionThrottledAlarm/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::CloudWatch::Alarm",
+ "aws:cdk:cloudformation:props": {
+ "alarmDescription": "Alarm for the number of executions that throttled exceeded the threshold of 1. ",
+ "comparisonOperator": "GreaterThanOrEqualToThreshold",
+ "dimensions": [
+ {
+ "name": "StateMachineArn",
+ "value": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "evaluationPeriods": 1,
+ "metricName": "ExecutionThrottled",
+ "namespace": "AWS/States",
+ "period": 300,
+ "statistic": "Sum",
+ "threshold": 1
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm",
+ "version": "2.161.0"
+ }
+ },
+ "ExecutionAbortedAlarm": {
+ "id": "ExecutionAbortedAlarm",
+ "path": "sqspstp-existing-queue/test-sqs-pipes-states-construct/ExecutionAbortedAlarm",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-existing-queue/test-sqs-pipes-states-construct/ExecutionAbortedAlarm/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::CloudWatch::Alarm",
+ "aws:cdk:cloudformation:props": {
+ "alarmDescription": "Alarm for the number of executions that aborted exceeded the threshold of 1. ",
+ "comparisonOperator": "GreaterThanOrEqualToThreshold",
+ "dimensions": [
+ {
+ "name": "StateMachineArn",
+ "value": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "evaluationPeriods": 1,
+ "metricName": "ExecutionsAborted",
+ "namespace": "AWS/States",
+ "period": 300,
+ "statistic": "Maximum",
+ "threshold": 1
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm",
+ "version": "2.161.0"
+ }
+ },
+ "PipeRole--test-sqs-pipes-states-construct": {
+ "id": "PipeRole--test-sqs-pipes-states-construct",
+ "path": "sqspstp-existing-queue/test-sqs-pipes-states-construct/PipeRole--test-sqs-pipes-states-construct",
+ "children": {
+ "ImportPipeRole--test-sqs-pipes-states-construct": {
+ "id": "ImportPipeRole--test-sqs-pipes-states-construct",
+ "path": "sqspstp-existing-queue/test-sqs-pipes-states-construct/PipeRole--test-sqs-pipes-states-construct/ImportPipeRole--test-sqs-pipes-states-construct",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.Resource",
+ "version": "2.161.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-existing-queue/test-sqs-pipes-states-construct/PipeRole--test-sqs-pipes-states-construct/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::IAM::Role",
+ "aws:cdk:cloudformation:props": {
+ "assumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "pipes.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "policies": [
+ {
+ "policyName": "sourcePolicy",
+ "policyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes",
+ "sqs:ReceiveMessage"
+ ],
+ "Effect": "Allow",
+ "Resource": {
+ "Fn::GetAtt": [
+ "existingqueue03D57A53",
+ "Arn"
+ ]
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ }
+ },
+ {
+ "policyName": "targetPolicy",
+ "policyDocument": {
+ "Statement": [
+ {
+ "Action": "states:StartExecution",
+ "Effect": "Allow",
+ "Resource": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ }
+ }
+ ]
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.CfnRole",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.Role",
+ "version": "2.161.0"
+ }
+ },
+ "LogGroup-test-sqs-pipes-states-construct": {
+ "id": "LogGroup-test-sqs-pipes-states-construct",
+ "path": "sqspstp-existing-queue/test-sqs-pipes-states-construct/LogGroup-test-sqs-pipes-states-construct",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-existing-queue/test-sqs-pipes-states-construct/LogGroup-test-sqs-pipes-states-construct/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::Logs::LogGroup",
+ "aws:cdk:cloudformation:props": {
+ "logGroupName": {
+ "Fn::Join": [
+ "",
+ [
+ "/aws/vendedlogs/pipes/constructs/sqspstp-existing-queuetest-sqs-pipes-states-constructPipesLog-",
+ {
+ "Fn::Select": [
+ 2,
+ {
+ "Fn::Split": [
+ "/",
+ {
+ "Ref": "AWS::StackId"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ ]
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_logs.LogGroup",
+ "version": "2.161.0"
+ }
+ },
+ "pipe-test-sqs-pipes-states-construct": {
+ "id": "pipe-test-sqs-pipes-states-construct",
+ "path": "sqspstp-existing-queue/test-sqs-pipes-states-construct/pipe-test-sqs-pipes-states-construct",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::Pipes::Pipe",
+ "aws:cdk:cloudformation:props": {
+ "logConfiguration": {
+ "cloudwatchLogsLogDestination": {
+ "logGroupArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructLogGrouptestsqspipesstatesconstructF827FE15",
+ "Arn"
+ ]
+ }
+ },
+ "level": "INFO"
+ },
+ "roleArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructPipeRoletestsqspipesstatesconstruct2CC9A13C",
+ "Arn"
+ ]
+ },
+ "source": {
+ "Fn::GetAtt": [
+ "existingqueue03D57A53",
+ "Arn"
+ ]
+ },
+ "sourceParameters": {},
+ "target": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ },
+ "targetParameters": {
+ "stepFunctionStateMachineParameters": {
+ "invocationType": "FIRE_AND_FORGET"
+ }
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_pipes.CfnPipe",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-solutions-constructs/aws-sqs-pipes-stepfunctions.SqsToPipesToStepfunctions",
+ "version": "2.72.0"
+ }
+ },
+ "Integ": {
+ "id": "Integ",
+ "path": "sqspstp-existing-queue/Integ",
+ "children": {
+ "DefaultTest": {
+ "id": "DefaultTest",
+ "path": "sqspstp-existing-queue/Integ/DefaultTest",
+ "children": {
+ "Default": {
+ "id": "Default",
+ "path": "sqspstp-existing-queue/Integ/DefaultTest/Default",
+ "constructInfo": {
+ "fqn": "constructs.Construct",
+ "version": "10.4.2"
+ }
+ },
+ "DeployAssert": {
+ "id": "DeployAssert",
+ "path": "sqspstp-existing-queue/Integ/DefaultTest/DeployAssert",
+ "children": {
+ "BootstrapVersion": {
+ "id": "BootstrapVersion",
+ "path": "sqspstp-existing-queue/Integ/DefaultTest/DeployAssert/BootstrapVersion",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.CfnParameter",
+ "version": "2.161.0"
+ }
+ },
+ "CheckBootstrapVersion": {
+ "id": "CheckBootstrapVersion",
+ "path": "sqspstp-existing-queue/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.CfnRule",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.Stack",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase",
+ "version": "2.161.0-alpha.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/integ-tests-alpha.IntegTest",
+ "version": "2.161.0-alpha.0"
+ }
+ },
+ "BootstrapVersion": {
+ "id": "BootstrapVersion",
+ "path": "sqspstp-existing-queue/BootstrapVersion",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.CfnParameter",
+ "version": "2.161.0"
+ }
+ },
+ "CheckBootstrapVersion": {
+ "id": "CheckBootstrapVersion",
+ "path": "sqspstp-existing-queue/CheckBootstrapVersion",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.CfnRule",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.Stack",
+ "version": "2.161.0"
+ }
+ },
+ "Tree": {
+ "id": "Tree",
+ "path": "Tree",
+ "constructInfo": {
+ "fqn": "constructs.Construct",
+ "version": "10.4.2"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.App",
+ "version": "2.161.0"
+ }
+ }
+}
\ No newline at end of file
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-existing-queue.ts b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-existing-queue.ts
new file mode 100644
index 000000000..b0defa7a5
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-existing-queue.ts
@@ -0,0 +1,38 @@
+/**
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
+ * with the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES
+ * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+
+/// !cdk-integ *
+import { App, Stack } from "aws-cdk-lib";
+import { SqsToPipesToStepfunctions, SqsToPipesToStepfunctionsProps } from "../lib";
+import { generateIntegStackName } from '@aws-solutions-constructs/core';
+import { IntegTest } from '@aws-cdk/integ-tests-alpha';
+import * as defaults from '@aws-solutions-constructs/core';
+
+const app = new App();
+const stack = new Stack(app, generateIntegStackName(__filename));
+
+const buildQueueResponse = defaults.buildQueue(stack, 'existing-queue', {});
+const existingQueue = buildQueueResponse.queue;
+
+const props: SqsToPipesToStepfunctionsProps = {
+ stateMachineProps: {
+ definitionBody: defaults.CreateTestStateMachineDefinitionBody(stack, 's3stp-test')
+ },
+ existingQueueObj: existingQueue,
+};
+
+new SqsToPipesToStepfunctions(stack, 'test-sqs-pipes-states-construct', props);
+
+new IntegTest(stack, 'Integ', { testCases: [
+ stack
+] });
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-filter.js.snapshot/cdk.out b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-filter.js.snapshot/cdk.out
new file mode 100644
index 000000000..c6e612584
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-filter.js.snapshot/cdk.out
@@ -0,0 +1 @@
+{"version":"38.0.1"}
\ No newline at end of file
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-filter.js.snapshot/integ.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-filter.js.snapshot/integ.json
new file mode 100644
index 000000000..1a5d1089f
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-filter.js.snapshot/integ.json
@@ -0,0 +1,12 @@
+{
+ "version": "38.0.1",
+ "testCases": {
+ "sqspstp-filter/Integ/DefaultTest": {
+ "stacks": [
+ "sqspstp-filter"
+ ],
+ "assertionStack": "sqspstp-filter/Integ/DefaultTest/DeployAssert",
+ "assertionStackName": "sqspstpfilterIntegDefaultTestDeployAssert0C52837E"
+ }
+ }
+}
\ No newline at end of file
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-filter.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-filter.js.snapshot/manifest.json
new file mode 100644
index 000000000..55c5b08b0
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-filter.js.snapshot/manifest.json
@@ -0,0 +1,205 @@
+{
+ "version": "38.0.1",
+ "artifacts": {
+ "sqspstpfilterIntegDefaultTestDeployAssert0C52837E.assets": {
+ "type": "cdk:asset-manifest",
+ "properties": {
+ "file": "sqspstpfilterIntegDefaultTestDeployAssert0C52837E.assets.json",
+ "requiresBootstrapStackVersion": 6,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
+ }
+ },
+ "sqspstpfilterIntegDefaultTestDeployAssert0C52837E": {
+ "type": "aws:cloudformation:stack",
+ "environment": "aws://unknown-account/unknown-region",
+ "properties": {
+ "templateFile": "sqspstpfilterIntegDefaultTestDeployAssert0C52837E.template.json",
+ "terminationProtection": false,
+ "validateOnSynth": false,
+ "notificationArns": [],
+ "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": [
+ "sqspstpfilterIntegDefaultTestDeployAssert0C52837E.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": [
+ "sqspstpfilterIntegDefaultTestDeployAssert0C52837E.assets"
+ ],
+ "metadata": {
+ "/sqspstp-filter/Integ/DefaultTest/DeployAssert/BootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "BootstrapVersion"
+ }
+ ],
+ "/sqspstp-filter/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "CheckBootstrapVersion"
+ }
+ ]
+ },
+ "displayName": "sqspstp-filter/Integ/DefaultTest/DeployAssert"
+ },
+ "sqspstp-filter.assets": {
+ "type": "cdk:asset-manifest",
+ "properties": {
+ "file": "sqspstp-filter.assets.json",
+ "requiresBootstrapStackVersion": 6,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
+ }
+ },
+ "sqspstp-filter": {
+ "type": "aws:cloudformation:stack",
+ "environment": "aws://unknown-account/unknown-region",
+ "properties": {
+ "templateFile": "sqspstp-filter.template.json",
+ "terminationProtection": false,
+ "validateOnSynth": false,
+ "notificationArns": [],
+ "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}/9718069baa56a46ca68c34209de1d1f4f856a5c5137b748f79e84785db1e5ec0.json",
+ "requiresBootstrapStackVersion": 6,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
+ "additionalDependencies": [
+ "sqspstp-filter.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": [
+ "sqspstp-filter.assets"
+ ],
+ "metadata": {
+ "/sqspstp-filter/lambdas3stp-test/ServiceRole/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "lambdas3stptestServiceRoleF17BB6C7"
+ }
+ ],
+ "/sqspstp-filter/lambdas3stp-test/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "lambdas3stptest9FBDC6CE"
+ }
+ ],
+ "/sqspstp-filter/test-sqs-pipes-states-construct/queue-dlq/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructqueuedlq420A82FD"
+ }
+ ],
+ "/sqspstp-filter/test-sqs-pipes-states-construct/queue-dlq/Policy/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructqueuedlqPolicyB1D70483"
+ }
+ ],
+ "/sqspstp-filter/test-sqs-pipes-states-construct/queue/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructqueueA7C76715"
+ }
+ ],
+ "/sqspstp-filter/test-sqs-pipes-states-construct/queue/Policy/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructqueuePolicyFD32B562"
+ }
+ ],
+ "/sqspstp-filter/test-sqs-pipes-states-construct/StateMachineLogGroup/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructStateMachineLogGroupADE94F1D"
+ }
+ ],
+ "/sqspstp-filter/test-sqs-pipes-states-construct/StateMachine/Role/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructStateMachineRoleBF97BFC0"
+ }
+ ],
+ "/sqspstp-filter/test-sqs-pipes-states-construct/StateMachine/Role/DefaultPolicy/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructStateMachineRoleDefaultPolicyD1BA2BF2"
+ }
+ ],
+ "/sqspstp-filter/test-sqs-pipes-states-construct/StateMachine/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ ],
+ "/sqspstp-filter/test-sqs-pipes-states-construct/ExecutionFailedAlarm/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructExecutionFailedAlarm1002FF55"
+ }
+ ],
+ "/sqspstp-filter/test-sqs-pipes-states-construct/ExecutionThrottledAlarm/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructExecutionThrottledAlarm0242B01A"
+ }
+ ],
+ "/sqspstp-filter/test-sqs-pipes-states-construct/ExecutionAbortedAlarm/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructExecutionAbortedAlarm14349A7B"
+ }
+ ],
+ "/sqspstp-filter/test-sqs-pipes-states-construct/PipeRole--test-sqs-pipes-states-construct/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructPipeRoletestsqspipesstatesconstruct2CC9A13C"
+ }
+ ],
+ "/sqspstp-filter/test-sqs-pipes-states-construct/LogGroup-test-sqs-pipes-states-construct/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructLogGrouptestsqspipesstatesconstructF827FE15"
+ }
+ ],
+ "/sqspstp-filter/test-sqs-pipes-states-construct/pipe-test-sqs-pipes-states-construct": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructpipetestsqspipesstatesconstruct71A64A15"
+ }
+ ],
+ "/sqspstp-filter/BootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "BootstrapVersion"
+ }
+ ],
+ "/sqspstp-filter/CheckBootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "CheckBootstrapVersion"
+ }
+ ]
+ },
+ "displayName": "sqspstp-filter"
+ },
+ "Tree": {
+ "type": "cdk:tree",
+ "properties": {
+ "file": "tree.json"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-filter.js.snapshot/sqspstp-filter.assets.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-filter.js.snapshot/sqspstp-filter.assets.json
new file mode 100644
index 000000000..9b4a526a3
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-filter.js.snapshot/sqspstp-filter.assets.json
@@ -0,0 +1,19 @@
+{
+ "version": "38.0.1",
+ "files": {
+ "9718069baa56a46ca68c34209de1d1f4f856a5c5137b748f79e84785db1e5ec0": {
+ "source": {
+ "path": "sqspstp-filter.template.json",
+ "packaging": "file"
+ },
+ "destinations": {
+ "current_account-current_region": {
+ "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
+ "objectKey": "9718069baa56a46ca68c34209de1d1f4f856a5c5137b748f79e84785db1e5ec0.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/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-filter.js.snapshot/sqspstp-filter.template.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-filter.js.snapshot/sqspstp-filter.template.json
new file mode 100644
index 000000000..01d7b5a37
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-filter.js.snapshot/sqspstp-filter.template.json
@@ -0,0 +1,662 @@
+{
+ "Resources": {
+ "lambdas3stptestServiceRoleF17BB6C7": {
+ "Type": "AWS::IAM::Role",
+ "Properties": {
+ "AssumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "lambda.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "ManagedPolicyArns": [
+ {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
+ ]
+ ]
+ }
+ ]
+ }
+ },
+ "lambdas3stptest9FBDC6CE": {
+ "Type": "AWS::Lambda::Function",
+ "Properties": {
+ "Code": {
+ "ZipFile": "exports.handler = async (event) => console.log(event)"
+ },
+ "Handler": "index.handler",
+ "Role": {
+ "Fn::GetAtt": [
+ "lambdas3stptestServiceRoleF17BB6C7",
+ "Arn"
+ ]
+ },
+ "Runtime": "nodejs20.x"
+ },
+ "DependsOn": [
+ "lambdas3stptestServiceRoleF17BB6C7"
+ ],
+ "Metadata": {
+ "cfn_nag": {
+ "rules_to_suppress": [
+ {
+ "id": "W58",
+ "reason": "This Lambda Function is created for integration testing purposes only and is not part of an actual construct"
+ },
+ {
+ "id": "W89",
+ "reason": "This Lambda Function is created for integration testing purposes only and is not part of an actual construct"
+ },
+ {
+ "id": "W92",
+ "reason": "This Lambda Function is created for integration testing purposes only and is not part of an actual construct"
+ }
+ ]
+ }
+ }
+ },
+ "testsqspipesstatesconstructqueuedlq420A82FD": {
+ "Type": "AWS::SQS::Queue",
+ "Properties": {
+ "KmsMasterKeyId": "alias/aws/sqs"
+ },
+ "UpdateReplacePolicy": "Delete",
+ "DeletionPolicy": "Delete"
+ },
+ "testsqspipesstatesconstructqueuedlqPolicyB1D70483": {
+ "Type": "AWS::SQS::QueuePolicy",
+ "Properties": {
+ "PolicyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "sqs:AddPermission",
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes",
+ "sqs:ReceiveMessage",
+ "sqs:RemovePermission",
+ "sqs:SendMessage",
+ "sqs:SetQueueAttributes"
+ ],
+ "Effect": "Allow",
+ "Principal": {
+ "AWS": {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::",
+ {
+ "Ref": "AWS::AccountId"
+ },
+ ":root"
+ ]
+ ]
+ }
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueuedlq420A82FD",
+ "Arn"
+ ]
+ },
+ "Sid": "QueueOwnerOnlyAccess"
+ },
+ {
+ "Action": "SQS:*",
+ "Condition": {
+ "Bool": {
+ "aws:SecureTransport": "false"
+ }
+ },
+ "Effect": "Deny",
+ "Principal": {
+ "AWS": "*"
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueuedlq420A82FD",
+ "Arn"
+ ]
+ },
+ "Sid": "HttpsOnly"
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "Queues": [
+ {
+ "Ref": "testsqspipesstatesconstructqueuedlq420A82FD"
+ }
+ ]
+ }
+ },
+ "testsqspipesstatesconstructqueueA7C76715": {
+ "Type": "AWS::SQS::Queue",
+ "Properties": {
+ "KmsMasterKeyId": "alias/aws/sqs",
+ "RedrivePolicy": {
+ "deadLetterTargetArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueuedlq420A82FD",
+ "Arn"
+ ]
+ },
+ "maxReceiveCount": 15
+ }
+ },
+ "UpdateReplacePolicy": "Delete",
+ "DeletionPolicy": "Delete"
+ },
+ "testsqspipesstatesconstructqueuePolicyFD32B562": {
+ "Type": "AWS::SQS::QueuePolicy",
+ "Properties": {
+ "PolicyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "sqs:AddPermission",
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes",
+ "sqs:ReceiveMessage",
+ "sqs:RemovePermission",
+ "sqs:SendMessage",
+ "sqs:SetQueueAttributes"
+ ],
+ "Effect": "Allow",
+ "Principal": {
+ "AWS": {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::",
+ {
+ "Ref": "AWS::AccountId"
+ },
+ ":root"
+ ]
+ ]
+ }
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ },
+ "Sid": "QueueOwnerOnlyAccess"
+ },
+ {
+ "Action": "SQS:*",
+ "Condition": {
+ "Bool": {
+ "aws:SecureTransport": "false"
+ }
+ },
+ "Effect": "Deny",
+ "Principal": {
+ "AWS": "*"
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ },
+ "Sid": "HttpsOnly"
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "Queues": [
+ {
+ "Ref": "testsqspipesstatesconstructqueueA7C76715"
+ }
+ ]
+ }
+ },
+ "testsqspipesstatesconstructStateMachineLogGroupADE94F1D": {
+ "Type": "AWS::Logs::LogGroup",
+ "Properties": {
+ "LogGroupName": {
+ "Fn::Join": [
+ "",
+ [
+ "/aws/vendedlogs/states/constructs/sqspstp-filtertest-sqs-pipes-states-constructStateMachineLog-",
+ {
+ "Fn::Select": [
+ 2,
+ {
+ "Fn::Split": [
+ "/",
+ {
+ "Ref": "AWS::StackId"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ ]
+ }
+ },
+ "UpdateReplacePolicy": "Retain",
+ "DeletionPolicy": "Retain",
+ "Metadata": {
+ "cfn_nag": {
+ "rules_to_suppress": [
+ {
+ "id": "W86",
+ "reason": "Retention period for CloudWatchLogs LogGroups are set to 'Never Expire' to preserve customer data indefinitely"
+ },
+ {
+ "id": "W84",
+ "reason": "By default CloudWatchLogs LogGroups data is encrypted using the CloudWatch server-side encryption keys (AWS Managed Keys)"
+ }
+ ]
+ }
+ }
+ },
+ "testsqspipesstatesconstructStateMachineRoleBF97BFC0": {
+ "Type": "AWS::IAM::Role",
+ "Properties": {
+ "AssumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "states.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ }
+ }
+ },
+ "testsqspipesstatesconstructStateMachineRoleDefaultPolicyD1BA2BF2": {
+ "Type": "AWS::IAM::Policy",
+ "Properties": {
+ "PolicyDocument": {
+ "Statement": [
+ {
+ "Action": "lambda:InvokeFunction",
+ "Effect": "Allow",
+ "Resource": [
+ {
+ "Fn::GetAtt": [
+ "lambdas3stptest9FBDC6CE",
+ "Arn"
+ ]
+ },
+ {
+ "Fn::Join": [
+ "",
+ [
+ {
+ "Fn::GetAtt": [
+ "lambdas3stptest9FBDC6CE",
+ "Arn"
+ ]
+ },
+ ":*"
+ ]
+ ]
+ }
+ ]
+ },
+ {
+ "Action": [
+ "logs:CreateLogDelivery",
+ "logs:DeleteLogDelivery",
+ "logs:DescribeLogGroups",
+ "logs:DescribeResourcePolicies",
+ "logs:GetLogDelivery",
+ "logs:ListLogDeliveries",
+ "logs:PutResourcePolicy",
+ "logs:UpdateLogDelivery"
+ ],
+ "Effect": "Allow",
+ "Resource": "*"
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "PolicyName": "testsqspipesstatesconstructStateMachineRoleDefaultPolicyD1BA2BF2",
+ "Roles": [
+ {
+ "Ref": "testsqspipesstatesconstructStateMachineRoleBF97BFC0"
+ }
+ ]
+ },
+ "Metadata": {
+ "cfn_nag": {
+ "rules_to_suppress": [
+ {
+ "id": "W12",
+ "reason": "These are CDK defaults. The 'LogDelivery' actions do not support resource-level authorizations. Any logging is done by State Machine code"
+ }
+ ]
+ }
+ }
+ },
+ "testsqspipesstatesconstructStateMachine29272AA9": {
+ "Type": "AWS::StepFunctions::StateMachine",
+ "Properties": {
+ "DefinitionString": {
+ "Fn::Join": [
+ "",
+ [
+ "{\"StartAt\":\"tasks3stp-test\",\"States\":{\"tasks3stp-test\":{\"End\":true,\"Retry\":[{\"ErrorEquals\":[\"Lambda.ClientExecutionTimeoutException\",\"Lambda.ServiceException\",\"Lambda.AWSLambdaException\",\"Lambda.SdkClientException\"],\"IntervalSeconds\":2,\"MaxAttempts\":6,\"BackoffRate\":2}],\"Type\":\"Task\",\"Resource\":\"arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":states:::lambda:invoke\",\"Parameters\":{\"FunctionName\":\"",
+ {
+ "Fn::GetAtt": [
+ "lambdas3stptest9FBDC6CE",
+ "Arn"
+ ]
+ },
+ "\",\"Payload.$\":\"$\"}}}}"
+ ]
+ ]
+ },
+ "LoggingConfiguration": {
+ "Destinations": [
+ {
+ "CloudWatchLogsLogGroup": {
+ "LogGroupArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructStateMachineLogGroupADE94F1D",
+ "Arn"
+ ]
+ }
+ }
+ }
+ ],
+ "Level": "ERROR"
+ },
+ "RoleArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructStateMachineRoleBF97BFC0",
+ "Arn"
+ ]
+ }
+ },
+ "DependsOn": [
+ "testsqspipesstatesconstructStateMachineRoleDefaultPolicyD1BA2BF2",
+ "testsqspipesstatesconstructStateMachineRoleBF97BFC0"
+ ],
+ "UpdateReplacePolicy": "Delete",
+ "DeletionPolicy": "Delete"
+ },
+ "testsqspipesstatesconstructExecutionFailedAlarm1002FF55": {
+ "Type": "AWS::CloudWatch::Alarm",
+ "Properties": {
+ "AlarmDescription": "Alarm for the number of executions that failed exceeded the threshold of 1. ",
+ "ComparisonOperator": "GreaterThanOrEqualToThreshold",
+ "Dimensions": [
+ {
+ "Name": "StateMachineArn",
+ "Value": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "EvaluationPeriods": 1,
+ "MetricName": "ExecutionsFailed",
+ "Namespace": "AWS/States",
+ "Period": 300,
+ "Statistic": "Sum",
+ "Threshold": 1
+ }
+ },
+ "testsqspipesstatesconstructExecutionThrottledAlarm0242B01A": {
+ "Type": "AWS::CloudWatch::Alarm",
+ "Properties": {
+ "AlarmDescription": "Alarm for the number of executions that throttled exceeded the threshold of 1. ",
+ "ComparisonOperator": "GreaterThanOrEqualToThreshold",
+ "Dimensions": [
+ {
+ "Name": "StateMachineArn",
+ "Value": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "EvaluationPeriods": 1,
+ "MetricName": "ExecutionThrottled",
+ "Namespace": "AWS/States",
+ "Period": 300,
+ "Statistic": "Sum",
+ "Threshold": 1
+ }
+ },
+ "testsqspipesstatesconstructExecutionAbortedAlarm14349A7B": {
+ "Type": "AWS::CloudWatch::Alarm",
+ "Properties": {
+ "AlarmDescription": "Alarm for the number of executions that aborted exceeded the threshold of 1. ",
+ "ComparisonOperator": "GreaterThanOrEqualToThreshold",
+ "Dimensions": [
+ {
+ "Name": "StateMachineArn",
+ "Value": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "EvaluationPeriods": 1,
+ "MetricName": "ExecutionsAborted",
+ "Namespace": "AWS/States",
+ "Period": 300,
+ "Statistic": "Maximum",
+ "Threshold": 1
+ }
+ },
+ "testsqspipesstatesconstructPipeRoletestsqspipesstatesconstruct2CC9A13C": {
+ "Type": "AWS::IAM::Role",
+ "Properties": {
+ "AssumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "pipes.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "Policies": [
+ {
+ "PolicyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes",
+ "sqs:ReceiveMessage"
+ ],
+ "Effect": "Allow",
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "PolicyName": "sourcePolicy"
+ },
+ {
+ "PolicyDocument": {
+ "Statement": [
+ {
+ "Action": "states:StartExecution",
+ "Effect": "Allow",
+ "Resource": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "PolicyName": "targetPolicy"
+ }
+ ]
+ },
+ "Metadata": {
+ "guard": {
+ "SuppressedRules": [
+ "IAM_NO_INLINE_POLICY_CHECK"
+ ]
+ }
+ }
+ },
+ "testsqspipesstatesconstructLogGrouptestsqspipesstatesconstructF827FE15": {
+ "Type": "AWS::Logs::LogGroup",
+ "Properties": {
+ "LogGroupName": {
+ "Fn::Join": [
+ "",
+ [
+ "/aws/vendedlogs/pipes/constructs/sqspstp-filtertest-sqs-pipes-states-constructPipesLog-",
+ {
+ "Fn::Select": [
+ 2,
+ {
+ "Fn::Split": [
+ "/",
+ {
+ "Ref": "AWS::StackId"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ ]
+ }
+ },
+ "UpdateReplacePolicy": "Retain",
+ "DeletionPolicy": "Retain",
+ "Metadata": {
+ "cfn_nag": {
+ "rules_to_suppress": [
+ {
+ "id": "W86",
+ "reason": "Retention period for CloudWatchLogs LogGroups are set to 'Never Expire' to preserve customer data indefinitely"
+ },
+ {
+ "id": "W84",
+ "reason": "By default CloudWatchLogs LogGroups data is encrypted using the CloudWatch server-side encryption keys (AWS Managed Keys)"
+ }
+ ]
+ }
+ }
+ },
+ "testsqspipesstatesconstructpipetestsqspipesstatesconstruct71A64A15": {
+ "Type": "AWS::Pipes::Pipe",
+ "Properties": {
+ "LogConfiguration": {
+ "CloudwatchLogsLogDestination": {
+ "LogGroupArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructLogGrouptestsqspipesstatesconstructF827FE15",
+ "Arn"
+ ]
+ }
+ },
+ "Level": "INFO"
+ },
+ "RoleArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructPipeRoletestsqspipesstatesconstruct2CC9A13C",
+ "Arn"
+ ]
+ },
+ "Source": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ },
+ "SourceParameters": {
+ "FilterCriteria": {
+ "Filters": [
+ {
+ "Pattern": "{\n \"body\": {\n \"state\": [\"open\"]\n }\n}"
+ }
+ ]
+ }
+ },
+ "Target": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ },
+ "TargetParameters": {
+ "StepFunctionStateMachineParameters": {
+ "InvocationType": "FIRE_AND_FORGET"
+ }
+ }
+ }
+ }
+ },
+ "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/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-filter.js.snapshot/sqspstpfilterIntegDefaultTestDeployAssert0C52837E.assets.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-filter.js.snapshot/sqspstpfilterIntegDefaultTestDeployAssert0C52837E.assets.json
new file mode 100644
index 000000000..54bc044e7
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-filter.js.snapshot/sqspstpfilterIntegDefaultTestDeployAssert0C52837E.assets.json
@@ -0,0 +1,19 @@
+{
+ "version": "38.0.1",
+ "files": {
+ "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": {
+ "source": {
+ "path": "sqspstpfilterIntegDefaultTestDeployAssert0C52837E.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/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-filter.js.snapshot/sqspstpfilterIntegDefaultTestDeployAssert0C52837E.template.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-filter.js.snapshot/sqspstpfilterIntegDefaultTestDeployAssert0C52837E.template.json
new file mode 100644
index 000000000..ad9d0fb73
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-filter.js.snapshot/sqspstpfilterIntegDefaultTestDeployAssert0C52837E.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/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-filter.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-filter.js.snapshot/tree.json
new file mode 100644
index 000000000..a57e56adb
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-filter.js.snapshot/tree.json
@@ -0,0 +1,965 @@
+{
+ "version": "tree-0.1",
+ "tree": {
+ "id": "App",
+ "path": "",
+ "children": {
+ "sqspstp-filter": {
+ "id": "sqspstp-filter",
+ "path": "sqspstp-filter",
+ "children": {
+ "lambdas3stp-test": {
+ "id": "lambdas3stp-test",
+ "path": "sqspstp-filter/lambdas3stp-test",
+ "children": {
+ "ServiceRole": {
+ "id": "ServiceRole",
+ "path": "sqspstp-filter/lambdas3stp-test/ServiceRole",
+ "children": {
+ "ImportServiceRole": {
+ "id": "ImportServiceRole",
+ "path": "sqspstp-filter/lambdas3stp-test/ServiceRole/ImportServiceRole",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.Resource",
+ "version": "2.161.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-filter/lambdas3stp-test/ServiceRole/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::IAM::Role",
+ "aws:cdk:cloudformation:props": {
+ "assumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "lambda.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "managedPolicyArns": [
+ {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
+ ]
+ ]
+ }
+ ]
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.CfnRole",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.Role",
+ "version": "2.161.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-filter/lambdas3stp-test/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::Lambda::Function",
+ "aws:cdk:cloudformation:props": {
+ "code": {
+ "zipFile": "exports.handler = async (event) => console.log(event)"
+ },
+ "handler": "index.handler",
+ "role": {
+ "Fn::GetAtt": [
+ "lambdas3stptestServiceRoleF17BB6C7",
+ "Arn"
+ ]
+ },
+ "runtime": "nodejs20.x"
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_lambda.CfnFunction",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_lambda.Function",
+ "version": "2.161.0"
+ }
+ },
+ "tasks3stp-test": {
+ "id": "tasks3stp-test",
+ "path": "sqspstp-filter/tasks3stp-test",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_stepfunctions_tasks.LambdaInvoke",
+ "version": "2.161.0"
+ }
+ },
+ "test-sqs-pipes-states-construct": {
+ "id": "test-sqs-pipes-states-construct",
+ "path": "sqspstp-filter/test-sqs-pipes-states-construct",
+ "children": {
+ "queue-dlq": {
+ "id": "queue-dlq",
+ "path": "sqspstp-filter/test-sqs-pipes-states-construct/queue-dlq",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-filter/test-sqs-pipes-states-construct/queue-dlq/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::SQS::Queue",
+ "aws:cdk:cloudformation:props": {
+ "kmsMasterKeyId": "alias/aws/sqs"
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.CfnQueue",
+ "version": "2.161.0"
+ }
+ },
+ "Policy": {
+ "id": "Policy",
+ "path": "sqspstp-filter/test-sqs-pipes-states-construct/queue-dlq/Policy",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-filter/test-sqs-pipes-states-construct/queue-dlq/Policy/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::SQS::QueuePolicy",
+ "aws:cdk:cloudformation:props": {
+ "policyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "sqs:AddPermission",
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes",
+ "sqs:ReceiveMessage",
+ "sqs:RemovePermission",
+ "sqs:SendMessage",
+ "sqs:SetQueueAttributes"
+ ],
+ "Effect": "Allow",
+ "Principal": {
+ "AWS": {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::",
+ {
+ "Ref": "AWS::AccountId"
+ },
+ ":root"
+ ]
+ ]
+ }
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueuedlq420A82FD",
+ "Arn"
+ ]
+ },
+ "Sid": "QueueOwnerOnlyAccess"
+ },
+ {
+ "Action": "SQS:*",
+ "Condition": {
+ "Bool": {
+ "aws:SecureTransport": "false"
+ }
+ },
+ "Effect": "Deny",
+ "Principal": {
+ "AWS": "*"
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueuedlq420A82FD",
+ "Arn"
+ ]
+ },
+ "Sid": "HttpsOnly"
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "queues": [
+ {
+ "Ref": "testsqspipesstatesconstructqueuedlq420A82FD"
+ }
+ ]
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.Queue",
+ "version": "2.161.0"
+ }
+ },
+ "queue": {
+ "id": "queue",
+ "path": "sqspstp-filter/test-sqs-pipes-states-construct/queue",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-filter/test-sqs-pipes-states-construct/queue/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::SQS::Queue",
+ "aws:cdk:cloudformation:props": {
+ "kmsMasterKeyId": "alias/aws/sqs",
+ "redrivePolicy": {
+ "deadLetterTargetArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueuedlq420A82FD",
+ "Arn"
+ ]
+ },
+ "maxReceiveCount": 15
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.CfnQueue",
+ "version": "2.161.0"
+ }
+ },
+ "Policy": {
+ "id": "Policy",
+ "path": "sqspstp-filter/test-sqs-pipes-states-construct/queue/Policy",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-filter/test-sqs-pipes-states-construct/queue/Policy/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::SQS::QueuePolicy",
+ "aws:cdk:cloudformation:props": {
+ "policyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "sqs:AddPermission",
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes",
+ "sqs:ReceiveMessage",
+ "sqs:RemovePermission",
+ "sqs:SendMessage",
+ "sqs:SetQueueAttributes"
+ ],
+ "Effect": "Allow",
+ "Principal": {
+ "AWS": {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::",
+ {
+ "Ref": "AWS::AccountId"
+ },
+ ":root"
+ ]
+ ]
+ }
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ },
+ "Sid": "QueueOwnerOnlyAccess"
+ },
+ {
+ "Action": "SQS:*",
+ "Condition": {
+ "Bool": {
+ "aws:SecureTransport": "false"
+ }
+ },
+ "Effect": "Deny",
+ "Principal": {
+ "AWS": "*"
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ },
+ "Sid": "HttpsOnly"
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "queues": [
+ {
+ "Ref": "testsqspipesstatesconstructqueueA7C76715"
+ }
+ ]
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.Queue",
+ "version": "2.161.0"
+ }
+ },
+ "StateMachineLogGroup": {
+ "id": "StateMachineLogGroup",
+ "path": "sqspstp-filter/test-sqs-pipes-states-construct/StateMachineLogGroup",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-filter/test-sqs-pipes-states-construct/StateMachineLogGroup/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::Logs::LogGroup",
+ "aws:cdk:cloudformation:props": {
+ "logGroupName": {
+ "Fn::Join": [
+ "",
+ [
+ "/aws/vendedlogs/states/constructs/sqspstp-filtertest-sqs-pipes-states-constructStateMachineLog-",
+ {
+ "Fn::Select": [
+ 2,
+ {
+ "Fn::Split": [
+ "/",
+ {
+ "Ref": "AWS::StackId"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ ]
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_logs.LogGroup",
+ "version": "2.161.0"
+ }
+ },
+ "StateMachine": {
+ "id": "StateMachine",
+ "path": "sqspstp-filter/test-sqs-pipes-states-construct/StateMachine",
+ "children": {
+ "Role": {
+ "id": "Role",
+ "path": "sqspstp-filter/test-sqs-pipes-states-construct/StateMachine/Role",
+ "children": {
+ "ImportRole": {
+ "id": "ImportRole",
+ "path": "sqspstp-filter/test-sqs-pipes-states-construct/StateMachine/Role/ImportRole",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.Resource",
+ "version": "2.161.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-filter/test-sqs-pipes-states-construct/StateMachine/Role/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::IAM::Role",
+ "aws:cdk:cloudformation:props": {
+ "assumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "states.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.CfnRole",
+ "version": "2.161.0"
+ }
+ },
+ "DefaultPolicy": {
+ "id": "DefaultPolicy",
+ "path": "sqspstp-filter/test-sqs-pipes-states-construct/StateMachine/Role/DefaultPolicy",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-filter/test-sqs-pipes-states-construct/StateMachine/Role/DefaultPolicy/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::IAM::Policy",
+ "aws:cdk:cloudformation:props": {
+ "policyDocument": {
+ "Statement": [
+ {
+ "Action": "lambda:InvokeFunction",
+ "Effect": "Allow",
+ "Resource": [
+ {
+ "Fn::GetAtt": [
+ "lambdas3stptest9FBDC6CE",
+ "Arn"
+ ]
+ },
+ {
+ "Fn::Join": [
+ "",
+ [
+ {
+ "Fn::GetAtt": [
+ "lambdas3stptest9FBDC6CE",
+ "Arn"
+ ]
+ },
+ ":*"
+ ]
+ ]
+ }
+ ]
+ },
+ {
+ "Action": [
+ "logs:CreateLogDelivery",
+ "logs:DeleteLogDelivery",
+ "logs:DescribeLogGroups",
+ "logs:DescribeResourcePolicies",
+ "logs:GetLogDelivery",
+ "logs:ListLogDeliveries",
+ "logs:PutResourcePolicy",
+ "logs:UpdateLogDelivery"
+ ],
+ "Effect": "Allow",
+ "Resource": "*"
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "policyName": "testsqspipesstatesconstructStateMachineRoleDefaultPolicyD1BA2BF2",
+ "roles": [
+ {
+ "Ref": "testsqspipesstatesconstructStateMachineRoleBF97BFC0"
+ }
+ ]
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.CfnPolicy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.Policy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.Role",
+ "version": "2.161.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-filter/test-sqs-pipes-states-construct/StateMachine/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::StepFunctions::StateMachine",
+ "aws:cdk:cloudformation:props": {
+ "definitionString": {
+ "Fn::Join": [
+ "",
+ [
+ "{\"StartAt\":\"tasks3stp-test\",\"States\":{\"tasks3stp-test\":{\"End\":true,\"Retry\":[{\"ErrorEquals\":[\"Lambda.ClientExecutionTimeoutException\",\"Lambda.ServiceException\",\"Lambda.AWSLambdaException\",\"Lambda.SdkClientException\"],\"IntervalSeconds\":2,\"MaxAttempts\":6,\"BackoffRate\":2}],\"Type\":\"Task\",\"Resource\":\"arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":states:::lambda:invoke\",\"Parameters\":{\"FunctionName\":\"",
+ {
+ "Fn::GetAtt": [
+ "lambdas3stptest9FBDC6CE",
+ "Arn"
+ ]
+ },
+ "\",\"Payload.$\":\"$\"}}}}"
+ ]
+ ]
+ },
+ "loggingConfiguration": {
+ "destinations": [
+ {
+ "cloudWatchLogsLogGroup": {
+ "logGroupArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructStateMachineLogGroupADE94F1D",
+ "Arn"
+ ]
+ }
+ }
+ }
+ ],
+ "level": "ERROR"
+ },
+ "roleArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructStateMachineRoleBF97BFC0",
+ "Arn"
+ ]
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_stepfunctions.CfnStateMachine",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_stepfunctions.StateMachine",
+ "version": "2.161.0"
+ }
+ },
+ "ExecutionFailedAlarm": {
+ "id": "ExecutionFailedAlarm",
+ "path": "sqspstp-filter/test-sqs-pipes-states-construct/ExecutionFailedAlarm",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-filter/test-sqs-pipes-states-construct/ExecutionFailedAlarm/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::CloudWatch::Alarm",
+ "aws:cdk:cloudformation:props": {
+ "alarmDescription": "Alarm for the number of executions that failed exceeded the threshold of 1. ",
+ "comparisonOperator": "GreaterThanOrEqualToThreshold",
+ "dimensions": [
+ {
+ "name": "StateMachineArn",
+ "value": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "evaluationPeriods": 1,
+ "metricName": "ExecutionsFailed",
+ "namespace": "AWS/States",
+ "period": 300,
+ "statistic": "Sum",
+ "threshold": 1
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm",
+ "version": "2.161.0"
+ }
+ },
+ "ExecutionThrottledAlarm": {
+ "id": "ExecutionThrottledAlarm",
+ "path": "sqspstp-filter/test-sqs-pipes-states-construct/ExecutionThrottledAlarm",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-filter/test-sqs-pipes-states-construct/ExecutionThrottledAlarm/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::CloudWatch::Alarm",
+ "aws:cdk:cloudformation:props": {
+ "alarmDescription": "Alarm for the number of executions that throttled exceeded the threshold of 1. ",
+ "comparisonOperator": "GreaterThanOrEqualToThreshold",
+ "dimensions": [
+ {
+ "name": "StateMachineArn",
+ "value": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "evaluationPeriods": 1,
+ "metricName": "ExecutionThrottled",
+ "namespace": "AWS/States",
+ "period": 300,
+ "statistic": "Sum",
+ "threshold": 1
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm",
+ "version": "2.161.0"
+ }
+ },
+ "ExecutionAbortedAlarm": {
+ "id": "ExecutionAbortedAlarm",
+ "path": "sqspstp-filter/test-sqs-pipes-states-construct/ExecutionAbortedAlarm",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-filter/test-sqs-pipes-states-construct/ExecutionAbortedAlarm/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::CloudWatch::Alarm",
+ "aws:cdk:cloudformation:props": {
+ "alarmDescription": "Alarm for the number of executions that aborted exceeded the threshold of 1. ",
+ "comparisonOperator": "GreaterThanOrEqualToThreshold",
+ "dimensions": [
+ {
+ "name": "StateMachineArn",
+ "value": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "evaluationPeriods": 1,
+ "metricName": "ExecutionsAborted",
+ "namespace": "AWS/States",
+ "period": 300,
+ "statistic": "Maximum",
+ "threshold": 1
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm",
+ "version": "2.161.0"
+ }
+ },
+ "PipeRole--test-sqs-pipes-states-construct": {
+ "id": "PipeRole--test-sqs-pipes-states-construct",
+ "path": "sqspstp-filter/test-sqs-pipes-states-construct/PipeRole--test-sqs-pipes-states-construct",
+ "children": {
+ "ImportPipeRole--test-sqs-pipes-states-construct": {
+ "id": "ImportPipeRole--test-sqs-pipes-states-construct",
+ "path": "sqspstp-filter/test-sqs-pipes-states-construct/PipeRole--test-sqs-pipes-states-construct/ImportPipeRole--test-sqs-pipes-states-construct",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.Resource",
+ "version": "2.161.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-filter/test-sqs-pipes-states-construct/PipeRole--test-sqs-pipes-states-construct/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::IAM::Role",
+ "aws:cdk:cloudformation:props": {
+ "assumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "pipes.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "policies": [
+ {
+ "policyName": "sourcePolicy",
+ "policyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes",
+ "sqs:ReceiveMessage"
+ ],
+ "Effect": "Allow",
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ }
+ },
+ {
+ "policyName": "targetPolicy",
+ "policyDocument": {
+ "Statement": [
+ {
+ "Action": "states:StartExecution",
+ "Effect": "Allow",
+ "Resource": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ }
+ }
+ ]
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.CfnRole",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.Role",
+ "version": "2.161.0"
+ }
+ },
+ "LogGroup-test-sqs-pipes-states-construct": {
+ "id": "LogGroup-test-sqs-pipes-states-construct",
+ "path": "sqspstp-filter/test-sqs-pipes-states-construct/LogGroup-test-sqs-pipes-states-construct",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-filter/test-sqs-pipes-states-construct/LogGroup-test-sqs-pipes-states-construct/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::Logs::LogGroup",
+ "aws:cdk:cloudformation:props": {
+ "logGroupName": {
+ "Fn::Join": [
+ "",
+ [
+ "/aws/vendedlogs/pipes/constructs/sqspstp-filtertest-sqs-pipes-states-constructPipesLog-",
+ {
+ "Fn::Select": [
+ 2,
+ {
+ "Fn::Split": [
+ "/",
+ {
+ "Ref": "AWS::StackId"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ ]
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_logs.LogGroup",
+ "version": "2.161.0"
+ }
+ },
+ "pipe-test-sqs-pipes-states-construct": {
+ "id": "pipe-test-sqs-pipes-states-construct",
+ "path": "sqspstp-filter/test-sqs-pipes-states-construct/pipe-test-sqs-pipes-states-construct",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::Pipes::Pipe",
+ "aws:cdk:cloudformation:props": {
+ "logConfiguration": {
+ "cloudwatchLogsLogDestination": {
+ "logGroupArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructLogGrouptestsqspipesstatesconstructF827FE15",
+ "Arn"
+ ]
+ }
+ },
+ "level": "INFO"
+ },
+ "roleArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructPipeRoletestsqspipesstatesconstruct2CC9A13C",
+ "Arn"
+ ]
+ },
+ "source": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ },
+ "sourceParameters": {
+ "filterCriteria": {
+ "filters": [
+ {
+ "pattern": "{\n \"body\": {\n \"state\": [\"open\"]\n }\n}"
+ }
+ ]
+ }
+ },
+ "target": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ },
+ "targetParameters": {
+ "stepFunctionStateMachineParameters": {
+ "invocationType": "FIRE_AND_FORGET"
+ }
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_pipes.CfnPipe",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-solutions-constructs/aws-sqs-pipes-stepfunctions.SqsToPipesToStepfunctions",
+ "version": "2.72.0"
+ }
+ },
+ "Integ": {
+ "id": "Integ",
+ "path": "sqspstp-filter/Integ",
+ "children": {
+ "DefaultTest": {
+ "id": "DefaultTest",
+ "path": "sqspstp-filter/Integ/DefaultTest",
+ "children": {
+ "Default": {
+ "id": "Default",
+ "path": "sqspstp-filter/Integ/DefaultTest/Default",
+ "constructInfo": {
+ "fqn": "constructs.Construct",
+ "version": "10.4.2"
+ }
+ },
+ "DeployAssert": {
+ "id": "DeployAssert",
+ "path": "sqspstp-filter/Integ/DefaultTest/DeployAssert",
+ "children": {
+ "BootstrapVersion": {
+ "id": "BootstrapVersion",
+ "path": "sqspstp-filter/Integ/DefaultTest/DeployAssert/BootstrapVersion",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.CfnParameter",
+ "version": "2.161.0"
+ }
+ },
+ "CheckBootstrapVersion": {
+ "id": "CheckBootstrapVersion",
+ "path": "sqspstp-filter/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.CfnRule",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.Stack",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase",
+ "version": "2.161.0-alpha.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/integ-tests-alpha.IntegTest",
+ "version": "2.161.0-alpha.0"
+ }
+ },
+ "BootstrapVersion": {
+ "id": "BootstrapVersion",
+ "path": "sqspstp-filter/BootstrapVersion",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.CfnParameter",
+ "version": "2.161.0"
+ }
+ },
+ "CheckBootstrapVersion": {
+ "id": "CheckBootstrapVersion",
+ "path": "sqspstp-filter/CheckBootstrapVersion",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.CfnRule",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.Stack",
+ "version": "2.161.0"
+ }
+ },
+ "Tree": {
+ "id": "Tree",
+ "path": "Tree",
+ "constructInfo": {
+ "fqn": "constructs.Construct",
+ "version": "10.4.2"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.App",
+ "version": "2.161.0"
+ }
+ }
+}
\ No newline at end of file
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-filter.ts b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-filter.ts
new file mode 100644
index 000000000..47a5a20e0
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-filter.ts
@@ -0,0 +1,47 @@
+/**
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
+ * with the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES
+ * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+
+/// !cdk-integ *
+import { App, Stack } from "aws-cdk-lib";
+import { SqsToPipesToStepfunctions, SqsToPipesToStepfunctionsProps } from "../lib";
+import { generateIntegStackName } from '@aws-solutions-constructs/core';
+import { IntegTest } from '@aws-cdk/integ-tests-alpha';
+import * as defaults from '@aws-solutions-constructs/core';
+
+const app = new App();
+const stack = new Stack(app, generateIntegStackName(__filename));
+
+const testFilterPattern = `{
+ "body": {
+ "state": ["open"]
+ }
+}`;
+
+const props: SqsToPipesToStepfunctionsProps = {
+ stateMachineProps: {
+ definitionBody: defaults.CreateTestStateMachineDefinitionBody(stack, 's3stp-test')
+ },
+ pipeProps: {
+ sourceParameters: {
+ filterCriteria: {
+ filters: [{ pattern: testFilterPattern }],
+ },
+ }
+ }
+};
+
+new SqsToPipesToStepfunctions(stack, 'test-sqs-pipes-states-construct', props);
+
+new IntegTest(stack, 'Integ', { testCases: [
+ stack
+] });
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-lambda-function-enrichment.js.snapshot/asset.33adcab38bd8c4e154734b436a40ee81920a89cd6c787ce62302c33df5e1dfcb/index.js b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-lambda-function-enrichment.js.snapshot/asset.33adcab38bd8c4e154734b436a40ee81920a89cd6c787ce62302c33df5e1dfcb/index.js
new file mode 100644
index 000000000..34d92af16
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-lambda-function-enrichment.js.snapshot/asset.33adcab38bd8c4e154734b436a40ee81920a89cd6c787ce62302c33df5e1dfcb/index.js
@@ -0,0 +1,9 @@
+exports.handler = async (event) => {
+ console.log(event);
+ const response = event.map((x) =>{
+ const body = JSON.parse(x.body);
+ body.newAttrib = "content";
+ return body;
+ });
+ return response;
+}
\ No newline at end of file
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-lambda-function-enrichment.js.snapshot/cdk.out b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-lambda-function-enrichment.js.snapshot/cdk.out
new file mode 100644
index 000000000..c6e612584
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-lambda-function-enrichment.js.snapshot/cdk.out
@@ -0,0 +1 @@
+{"version":"38.0.1"}
\ No newline at end of file
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-lambda-function-enrichment.js.snapshot/integ.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-lambda-function-enrichment.js.snapshot/integ.json
new file mode 100644
index 000000000..ec57a54b0
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-lambda-function-enrichment.js.snapshot/integ.json
@@ -0,0 +1,12 @@
+{
+ "version": "38.0.1",
+ "testCases": {
+ "sqspstp-lambda-function-enrichment/Integ/DefaultTest": {
+ "stacks": [
+ "sqspstp-lambda-function-enrichment"
+ ],
+ "assertionStack": "sqspstp-lambda-function-enrichment/Integ/DefaultTest/DeployAssert",
+ "assertionStackName": "sqspstplambdafunctionenrichmentIntegDefaultTestDeployAssert1F2A8125"
+ }
+ }
+}
\ No newline at end of file
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-lambda-function-enrichment.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-lambda-function-enrichment.js.snapshot/manifest.json
new file mode 100644
index 000000000..0469c4df6
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-lambda-function-enrichment.js.snapshot/manifest.json
@@ -0,0 +1,223 @@
+{
+ "version": "38.0.1",
+ "artifacts": {
+ "sqspstplambdafunctionenrichmentIntegDefaultTestDeployAssert1F2A8125.assets": {
+ "type": "cdk:asset-manifest",
+ "properties": {
+ "file": "sqspstplambdafunctionenrichmentIntegDefaultTestDeployAssert1F2A8125.assets.json",
+ "requiresBootstrapStackVersion": 6,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
+ }
+ },
+ "sqspstplambdafunctionenrichmentIntegDefaultTestDeployAssert1F2A8125": {
+ "type": "aws:cloudformation:stack",
+ "environment": "aws://unknown-account/unknown-region",
+ "properties": {
+ "templateFile": "sqspstplambdafunctionenrichmentIntegDefaultTestDeployAssert1F2A8125.template.json",
+ "terminationProtection": false,
+ "validateOnSynth": false,
+ "notificationArns": [],
+ "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": [
+ "sqspstplambdafunctionenrichmentIntegDefaultTestDeployAssert1F2A8125.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": [
+ "sqspstplambdafunctionenrichmentIntegDefaultTestDeployAssert1F2A8125.assets"
+ ],
+ "metadata": {
+ "/sqspstp-lambda-function-enrichment/Integ/DefaultTest/DeployAssert/BootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "BootstrapVersion"
+ }
+ ],
+ "/sqspstp-lambda-function-enrichment/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "CheckBootstrapVersion"
+ }
+ ]
+ },
+ "displayName": "sqspstp-lambda-function-enrichment/Integ/DefaultTest/DeployAssert"
+ },
+ "sqspstp-lambda-function-enrichment.assets": {
+ "type": "cdk:asset-manifest",
+ "properties": {
+ "file": "sqspstp-lambda-function-enrichment.assets.json",
+ "requiresBootstrapStackVersion": 6,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
+ }
+ },
+ "sqspstp-lambda-function-enrichment": {
+ "type": "aws:cloudformation:stack",
+ "environment": "aws://unknown-account/unknown-region",
+ "properties": {
+ "templateFile": "sqspstp-lambda-function-enrichment.template.json",
+ "terminationProtection": false,
+ "validateOnSynth": false,
+ "notificationArns": [],
+ "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}/306dbf92baf052489aeba6e3114641443f51d18af1130ff101b339295e2f7776.json",
+ "requiresBootstrapStackVersion": 6,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
+ "additionalDependencies": [
+ "sqspstp-lambda-function-enrichment.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": [
+ "sqspstp-lambda-function-enrichment.assets"
+ ],
+ "metadata": {
+ "/sqspstp-lambda-function-enrichment/enrichment-function/ServiceRole/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "enrichmentfunctionServiceRoleF21A0515"
+ }
+ ],
+ "/sqspstp-lambda-function-enrichment/enrichment-function/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "enrichmentfunction84C1BE72"
+ }
+ ],
+ "/sqspstp-lambda-function-enrichment/lambdas3stp-test/ServiceRole/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "lambdas3stptestServiceRoleF17BB6C7"
+ }
+ ],
+ "/sqspstp-lambda-function-enrichment/lambdas3stp-test/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "lambdas3stptest9FBDC6CE"
+ }
+ ],
+ "/sqspstp-lambda-function-enrichment/test-sqs-pipes-states-construct/queue-dlq/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructqueuedlq420A82FD"
+ }
+ ],
+ "/sqspstp-lambda-function-enrichment/test-sqs-pipes-states-construct/queue-dlq/Policy/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructqueuedlqPolicyB1D70483"
+ }
+ ],
+ "/sqspstp-lambda-function-enrichment/test-sqs-pipes-states-construct/queue/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructqueueA7C76715"
+ }
+ ],
+ "/sqspstp-lambda-function-enrichment/test-sqs-pipes-states-construct/queue/Policy/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructqueuePolicyFD32B562"
+ }
+ ],
+ "/sqspstp-lambda-function-enrichment/test-sqs-pipes-states-construct/StateMachineLogGroup/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructStateMachineLogGroupADE94F1D"
+ }
+ ],
+ "/sqspstp-lambda-function-enrichment/test-sqs-pipes-states-construct/StateMachine/Role/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructStateMachineRoleBF97BFC0"
+ }
+ ],
+ "/sqspstp-lambda-function-enrichment/test-sqs-pipes-states-construct/StateMachine/Role/DefaultPolicy/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructStateMachineRoleDefaultPolicyD1BA2BF2"
+ }
+ ],
+ "/sqspstp-lambda-function-enrichment/test-sqs-pipes-states-construct/StateMachine/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ ],
+ "/sqspstp-lambda-function-enrichment/test-sqs-pipes-states-construct/ExecutionFailedAlarm/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructExecutionFailedAlarm1002FF55"
+ }
+ ],
+ "/sqspstp-lambda-function-enrichment/test-sqs-pipes-states-construct/ExecutionThrottledAlarm/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructExecutionThrottledAlarm0242B01A"
+ }
+ ],
+ "/sqspstp-lambda-function-enrichment/test-sqs-pipes-states-construct/ExecutionAbortedAlarm/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructExecutionAbortedAlarm14349A7B"
+ }
+ ],
+ "/sqspstp-lambda-function-enrichment/test-sqs-pipes-states-construct/PipeRole--test-sqs-pipes-states-construct/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructPipeRoletestsqspipesstatesconstruct2CC9A13C"
+ }
+ ],
+ "/sqspstp-lambda-function-enrichment/test-sqs-pipes-states-construct/enrichmentpolicytest-sqs-pipes-states-construct/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructenrichmentpolicytestsqspipesstatesconstructC752476A"
+ }
+ ],
+ "/sqspstp-lambda-function-enrichment/test-sqs-pipes-states-construct/LogGroup-test-sqs-pipes-states-construct/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructLogGrouptestsqspipesstatesconstructF827FE15"
+ }
+ ],
+ "/sqspstp-lambda-function-enrichment/test-sqs-pipes-states-construct/pipe-test-sqs-pipes-states-construct": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructpipetestsqspipesstatesconstruct71A64A15"
+ }
+ ],
+ "/sqspstp-lambda-function-enrichment/BootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "BootstrapVersion"
+ }
+ ],
+ "/sqspstp-lambda-function-enrichment/CheckBootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "CheckBootstrapVersion"
+ }
+ ]
+ },
+ "displayName": "sqspstp-lambda-function-enrichment"
+ },
+ "Tree": {
+ "type": "cdk:tree",
+ "properties": {
+ "file": "tree.json"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-lambda-function-enrichment.js.snapshot/sqspstp-lambda-function-enrichment.assets.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-lambda-function-enrichment.js.snapshot/sqspstp-lambda-function-enrichment.assets.json
new file mode 100644
index 000000000..655b0fb9c
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-lambda-function-enrichment.js.snapshot/sqspstp-lambda-function-enrichment.assets.json
@@ -0,0 +1,32 @@
+{
+ "version": "38.0.1",
+ "files": {
+ "33adcab38bd8c4e154734b436a40ee81920a89cd6c787ce62302c33df5e1dfcb": {
+ "source": {
+ "path": "asset.33adcab38bd8c4e154734b436a40ee81920a89cd6c787ce62302c33df5e1dfcb",
+ "packaging": "zip"
+ },
+ "destinations": {
+ "current_account-current_region": {
+ "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
+ "objectKey": "33adcab38bd8c4e154734b436a40ee81920a89cd6c787ce62302c33df5e1dfcb.zip",
+ "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
+ }
+ }
+ },
+ "306dbf92baf052489aeba6e3114641443f51d18af1130ff101b339295e2f7776": {
+ "source": {
+ "path": "sqspstp-lambda-function-enrichment.template.json",
+ "packaging": "file"
+ },
+ "destinations": {
+ "current_account-current_region": {
+ "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
+ "objectKey": "306dbf92baf052489aeba6e3114641443f51d18af1130ff101b339295e2f7776.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/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-lambda-function-enrichment.js.snapshot/sqspstp-lambda-function-enrichment.template.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-lambda-function-enrichment.js.snapshot/sqspstp-lambda-function-enrichment.template.json
new file mode 100644
index 000000000..66eaa8321
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-lambda-function-enrichment.js.snapshot/sqspstp-lambda-function-enrichment.template.json
@@ -0,0 +1,757 @@
+{
+ "Resources": {
+ "enrichmentfunctionServiceRoleF21A0515": {
+ "Type": "AWS::IAM::Role",
+ "Properties": {
+ "AssumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "lambda.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "ManagedPolicyArns": [
+ {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
+ ]
+ ]
+ }
+ ]
+ }
+ },
+ "enrichmentfunction84C1BE72": {
+ "Type": "AWS::Lambda::Function",
+ "Properties": {
+ "Code": {
+ "S3Bucket": {
+ "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
+ },
+ "S3Key": "33adcab38bd8c4e154734b436a40ee81920a89cd6c787ce62302c33df5e1dfcb.zip"
+ },
+ "Handler": "index.handler",
+ "Role": {
+ "Fn::GetAtt": [
+ "enrichmentfunctionServiceRoleF21A0515",
+ "Arn"
+ ]
+ },
+ "Runtime": "nodejs20.x"
+ },
+ "DependsOn": [
+ "enrichmentfunctionServiceRoleF21A0515"
+ ],
+ "Metadata": {
+ "cfn_nag": {
+ "rules_to_suppress": [
+ {
+ "id": "W58",
+ "reason": "This Lambda Function is created for integration testing purposes only and is not part of an actual construct"
+ },
+ {
+ "id": "W89",
+ "reason": "This Lambda Function is created for integration testing purposes only and is not part of an actual construct"
+ },
+ {
+ "id": "W92",
+ "reason": "This Lambda Function is created for integration testing purposes only and is not part of an actual construct"
+ }
+ ]
+ }
+ }
+ },
+ "lambdas3stptestServiceRoleF17BB6C7": {
+ "Type": "AWS::IAM::Role",
+ "Properties": {
+ "AssumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "lambda.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "ManagedPolicyArns": [
+ {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
+ ]
+ ]
+ }
+ ]
+ }
+ },
+ "lambdas3stptest9FBDC6CE": {
+ "Type": "AWS::Lambda::Function",
+ "Properties": {
+ "Code": {
+ "ZipFile": "exports.handler = async (event) => console.log(event)"
+ },
+ "Handler": "index.handler",
+ "Role": {
+ "Fn::GetAtt": [
+ "lambdas3stptestServiceRoleF17BB6C7",
+ "Arn"
+ ]
+ },
+ "Runtime": "nodejs20.x"
+ },
+ "DependsOn": [
+ "lambdas3stptestServiceRoleF17BB6C7"
+ ],
+ "Metadata": {
+ "cfn_nag": {
+ "rules_to_suppress": [
+ {
+ "id": "W58",
+ "reason": "This Lambda Function is created for integration testing purposes only and is not part of an actual construct"
+ },
+ {
+ "id": "W89",
+ "reason": "This Lambda Function is created for integration testing purposes only and is not part of an actual construct"
+ },
+ {
+ "id": "W92",
+ "reason": "This Lambda Function is created for integration testing purposes only and is not part of an actual construct"
+ }
+ ]
+ }
+ }
+ },
+ "testsqspipesstatesconstructqueuedlq420A82FD": {
+ "Type": "AWS::SQS::Queue",
+ "Properties": {
+ "KmsMasterKeyId": "alias/aws/sqs"
+ },
+ "UpdateReplacePolicy": "Delete",
+ "DeletionPolicy": "Delete"
+ },
+ "testsqspipesstatesconstructqueuedlqPolicyB1D70483": {
+ "Type": "AWS::SQS::QueuePolicy",
+ "Properties": {
+ "PolicyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "sqs:AddPermission",
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes",
+ "sqs:ReceiveMessage",
+ "sqs:RemovePermission",
+ "sqs:SendMessage",
+ "sqs:SetQueueAttributes"
+ ],
+ "Effect": "Allow",
+ "Principal": {
+ "AWS": {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::",
+ {
+ "Ref": "AWS::AccountId"
+ },
+ ":root"
+ ]
+ ]
+ }
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueuedlq420A82FD",
+ "Arn"
+ ]
+ },
+ "Sid": "QueueOwnerOnlyAccess"
+ },
+ {
+ "Action": "SQS:*",
+ "Condition": {
+ "Bool": {
+ "aws:SecureTransport": "false"
+ }
+ },
+ "Effect": "Deny",
+ "Principal": {
+ "AWS": "*"
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueuedlq420A82FD",
+ "Arn"
+ ]
+ },
+ "Sid": "HttpsOnly"
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "Queues": [
+ {
+ "Ref": "testsqspipesstatesconstructqueuedlq420A82FD"
+ }
+ ]
+ }
+ },
+ "testsqspipesstatesconstructqueueA7C76715": {
+ "Type": "AWS::SQS::Queue",
+ "Properties": {
+ "KmsMasterKeyId": "alias/aws/sqs",
+ "RedrivePolicy": {
+ "deadLetterTargetArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueuedlq420A82FD",
+ "Arn"
+ ]
+ },
+ "maxReceiveCount": 15
+ }
+ },
+ "UpdateReplacePolicy": "Delete",
+ "DeletionPolicy": "Delete"
+ },
+ "testsqspipesstatesconstructqueuePolicyFD32B562": {
+ "Type": "AWS::SQS::QueuePolicy",
+ "Properties": {
+ "PolicyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "sqs:AddPermission",
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes",
+ "sqs:ReceiveMessage",
+ "sqs:RemovePermission",
+ "sqs:SendMessage",
+ "sqs:SetQueueAttributes"
+ ],
+ "Effect": "Allow",
+ "Principal": {
+ "AWS": {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::",
+ {
+ "Ref": "AWS::AccountId"
+ },
+ ":root"
+ ]
+ ]
+ }
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ },
+ "Sid": "QueueOwnerOnlyAccess"
+ },
+ {
+ "Action": "SQS:*",
+ "Condition": {
+ "Bool": {
+ "aws:SecureTransport": "false"
+ }
+ },
+ "Effect": "Deny",
+ "Principal": {
+ "AWS": "*"
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ },
+ "Sid": "HttpsOnly"
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "Queues": [
+ {
+ "Ref": "testsqspipesstatesconstructqueueA7C76715"
+ }
+ ]
+ }
+ },
+ "testsqspipesstatesconstructStateMachineLogGroupADE94F1D": {
+ "Type": "AWS::Logs::LogGroup",
+ "Properties": {
+ "LogGroupName": {
+ "Fn::Join": [
+ "",
+ [
+ "/aws/vendedlogs/states/constructs/sqspstp-lambda-function-enrichmenttest-sqs-pipes-states-constructStateMachineLog-",
+ {
+ "Fn::Select": [
+ 2,
+ {
+ "Fn::Split": [
+ "/",
+ {
+ "Ref": "AWS::StackId"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ ]
+ }
+ },
+ "UpdateReplacePolicy": "Retain",
+ "DeletionPolicy": "Retain",
+ "Metadata": {
+ "cfn_nag": {
+ "rules_to_suppress": [
+ {
+ "id": "W86",
+ "reason": "Retention period for CloudWatchLogs LogGroups are set to 'Never Expire' to preserve customer data indefinitely"
+ },
+ {
+ "id": "W84",
+ "reason": "By default CloudWatchLogs LogGroups data is encrypted using the CloudWatch server-side encryption keys (AWS Managed Keys)"
+ }
+ ]
+ }
+ }
+ },
+ "testsqspipesstatesconstructStateMachineRoleBF97BFC0": {
+ "Type": "AWS::IAM::Role",
+ "Properties": {
+ "AssumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "states.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ }
+ }
+ },
+ "testsqspipesstatesconstructStateMachineRoleDefaultPolicyD1BA2BF2": {
+ "Type": "AWS::IAM::Policy",
+ "Properties": {
+ "PolicyDocument": {
+ "Statement": [
+ {
+ "Action": "lambda:InvokeFunction",
+ "Effect": "Allow",
+ "Resource": [
+ {
+ "Fn::GetAtt": [
+ "lambdas3stptest9FBDC6CE",
+ "Arn"
+ ]
+ },
+ {
+ "Fn::Join": [
+ "",
+ [
+ {
+ "Fn::GetAtt": [
+ "lambdas3stptest9FBDC6CE",
+ "Arn"
+ ]
+ },
+ ":*"
+ ]
+ ]
+ }
+ ]
+ },
+ {
+ "Action": [
+ "logs:CreateLogDelivery",
+ "logs:DeleteLogDelivery",
+ "logs:DescribeLogGroups",
+ "logs:DescribeResourcePolicies",
+ "logs:GetLogDelivery",
+ "logs:ListLogDeliveries",
+ "logs:PutResourcePolicy",
+ "logs:UpdateLogDelivery"
+ ],
+ "Effect": "Allow",
+ "Resource": "*"
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "PolicyName": "testsqspipesstatesconstructStateMachineRoleDefaultPolicyD1BA2BF2",
+ "Roles": [
+ {
+ "Ref": "testsqspipesstatesconstructStateMachineRoleBF97BFC0"
+ }
+ ]
+ },
+ "Metadata": {
+ "cfn_nag": {
+ "rules_to_suppress": [
+ {
+ "id": "W12",
+ "reason": "These are CDK defaults. The 'LogDelivery' actions do not support resource-level authorizations. Any logging is done by State Machine code"
+ }
+ ]
+ }
+ }
+ },
+ "testsqspipesstatesconstructStateMachine29272AA9": {
+ "Type": "AWS::StepFunctions::StateMachine",
+ "Properties": {
+ "DefinitionString": {
+ "Fn::Join": [
+ "",
+ [
+ "{\"StartAt\":\"tasks3stp-test\",\"States\":{\"tasks3stp-test\":{\"End\":true,\"Retry\":[{\"ErrorEquals\":[\"Lambda.ClientExecutionTimeoutException\",\"Lambda.ServiceException\",\"Lambda.AWSLambdaException\",\"Lambda.SdkClientException\"],\"IntervalSeconds\":2,\"MaxAttempts\":6,\"BackoffRate\":2}],\"Type\":\"Task\",\"Resource\":\"arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":states:::lambda:invoke\",\"Parameters\":{\"FunctionName\":\"",
+ {
+ "Fn::GetAtt": [
+ "lambdas3stptest9FBDC6CE",
+ "Arn"
+ ]
+ },
+ "\",\"Payload.$\":\"$\"}}}}"
+ ]
+ ]
+ },
+ "LoggingConfiguration": {
+ "Destinations": [
+ {
+ "CloudWatchLogsLogGroup": {
+ "LogGroupArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructStateMachineLogGroupADE94F1D",
+ "Arn"
+ ]
+ }
+ }
+ }
+ ],
+ "Level": "ERROR"
+ },
+ "RoleArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructStateMachineRoleBF97BFC0",
+ "Arn"
+ ]
+ }
+ },
+ "DependsOn": [
+ "testsqspipesstatesconstructStateMachineRoleDefaultPolicyD1BA2BF2",
+ "testsqspipesstatesconstructStateMachineRoleBF97BFC0"
+ ],
+ "UpdateReplacePolicy": "Delete",
+ "DeletionPolicy": "Delete"
+ },
+ "testsqspipesstatesconstructExecutionFailedAlarm1002FF55": {
+ "Type": "AWS::CloudWatch::Alarm",
+ "Properties": {
+ "AlarmDescription": "Alarm for the number of executions that failed exceeded the threshold of 1. ",
+ "ComparisonOperator": "GreaterThanOrEqualToThreshold",
+ "Dimensions": [
+ {
+ "Name": "StateMachineArn",
+ "Value": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "EvaluationPeriods": 1,
+ "MetricName": "ExecutionsFailed",
+ "Namespace": "AWS/States",
+ "Period": 300,
+ "Statistic": "Sum",
+ "Threshold": 1
+ }
+ },
+ "testsqspipesstatesconstructExecutionThrottledAlarm0242B01A": {
+ "Type": "AWS::CloudWatch::Alarm",
+ "Properties": {
+ "AlarmDescription": "Alarm for the number of executions that throttled exceeded the threshold of 1. ",
+ "ComparisonOperator": "GreaterThanOrEqualToThreshold",
+ "Dimensions": [
+ {
+ "Name": "StateMachineArn",
+ "Value": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "EvaluationPeriods": 1,
+ "MetricName": "ExecutionThrottled",
+ "Namespace": "AWS/States",
+ "Period": 300,
+ "Statistic": "Sum",
+ "Threshold": 1
+ }
+ },
+ "testsqspipesstatesconstructExecutionAbortedAlarm14349A7B": {
+ "Type": "AWS::CloudWatch::Alarm",
+ "Properties": {
+ "AlarmDescription": "Alarm for the number of executions that aborted exceeded the threshold of 1. ",
+ "ComparisonOperator": "GreaterThanOrEqualToThreshold",
+ "Dimensions": [
+ {
+ "Name": "StateMachineArn",
+ "Value": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "EvaluationPeriods": 1,
+ "MetricName": "ExecutionsAborted",
+ "Namespace": "AWS/States",
+ "Period": 300,
+ "Statistic": "Maximum",
+ "Threshold": 1
+ }
+ },
+ "testsqspipesstatesconstructPipeRoletestsqspipesstatesconstruct2CC9A13C": {
+ "Type": "AWS::IAM::Role",
+ "Properties": {
+ "AssumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "pipes.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "Policies": [
+ {
+ "PolicyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes",
+ "sqs:ReceiveMessage"
+ ],
+ "Effect": "Allow",
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "PolicyName": "sourcePolicy"
+ },
+ {
+ "PolicyDocument": {
+ "Statement": [
+ {
+ "Action": "states:StartExecution",
+ "Effect": "Allow",
+ "Resource": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "PolicyName": "targetPolicy"
+ }
+ ]
+ },
+ "Metadata": {
+ "guard": {
+ "SuppressedRules": [
+ "IAM_NO_INLINE_POLICY_CHECK"
+ ]
+ }
+ }
+ },
+ "testsqspipesstatesconstructenrichmentpolicytestsqspipesstatesconstructC752476A": {
+ "Type": "AWS::IAM::Policy",
+ "Properties": {
+ "PolicyDocument": {
+ "Statement": [
+ {
+ "Action": "lambda:InvokeFunction",
+ "Effect": "Allow",
+ "Resource": {
+ "Fn::GetAtt": [
+ "enrichmentfunction84C1BE72",
+ "Arn"
+ ]
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "PolicyName": "testsqspipesstatesconstructenrichmentpolicytestsqspipesstatesconstructC752476A",
+ "Roles": [
+ {
+ "Ref": "testsqspipesstatesconstructPipeRoletestsqspipesstatesconstruct2CC9A13C"
+ }
+ ]
+ }
+ },
+ "testsqspipesstatesconstructLogGrouptestsqspipesstatesconstructF827FE15": {
+ "Type": "AWS::Logs::LogGroup",
+ "Properties": {
+ "LogGroupName": {
+ "Fn::Join": [
+ "",
+ [
+ "/aws/vendedlogs/pipes/constructs/sqspstp-lambda-function-enrichmenttest-sqs-pipes-states-constructPipesLog-",
+ {
+ "Fn::Select": [
+ 2,
+ {
+ "Fn::Split": [
+ "/",
+ {
+ "Ref": "AWS::StackId"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ ]
+ }
+ },
+ "UpdateReplacePolicy": "Retain",
+ "DeletionPolicy": "Retain",
+ "Metadata": {
+ "cfn_nag": {
+ "rules_to_suppress": [
+ {
+ "id": "W86",
+ "reason": "Retention period for CloudWatchLogs LogGroups are set to 'Never Expire' to preserve customer data indefinitely"
+ },
+ {
+ "id": "W84",
+ "reason": "By default CloudWatchLogs LogGroups data is encrypted using the CloudWatch server-side encryption keys (AWS Managed Keys)"
+ }
+ ]
+ }
+ }
+ },
+ "testsqspipesstatesconstructpipetestsqspipesstatesconstruct71A64A15": {
+ "Type": "AWS::Pipes::Pipe",
+ "Properties": {
+ "Enrichment": {
+ "Fn::GetAtt": [
+ "enrichmentfunction84C1BE72",
+ "Arn"
+ ]
+ },
+ "LogConfiguration": {
+ "CloudwatchLogsLogDestination": {
+ "LogGroupArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructLogGrouptestsqspipesstatesconstructF827FE15",
+ "Arn"
+ ]
+ }
+ },
+ "Level": "TRACE"
+ },
+ "RoleArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructPipeRoletestsqspipesstatesconstruct2CC9A13C",
+ "Arn"
+ ]
+ },
+ "Source": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ },
+ "SourceParameters": {},
+ "Target": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ },
+ "TargetParameters": {
+ "StepFunctionStateMachineParameters": {
+ "InvocationType": "FIRE_AND_FORGET"
+ }
+ }
+ }
+ }
+ },
+ "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/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-lambda-function-enrichment.js.snapshot/sqspstplambdafunctionenrichmentIntegDefaultTestDeployAssert1F2A8125.assets.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-lambda-function-enrichment.js.snapshot/sqspstplambdafunctionenrichmentIntegDefaultTestDeployAssert1F2A8125.assets.json
new file mode 100644
index 000000000..5f52af412
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-lambda-function-enrichment.js.snapshot/sqspstplambdafunctionenrichmentIntegDefaultTestDeployAssert1F2A8125.assets.json
@@ -0,0 +1,19 @@
+{
+ "version": "38.0.1",
+ "files": {
+ "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": {
+ "source": {
+ "path": "sqspstplambdafunctionenrichmentIntegDefaultTestDeployAssert1F2A8125.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/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-lambda-function-enrichment.js.snapshot/sqspstplambdafunctionenrichmentIntegDefaultTestDeployAssert1F2A8125.template.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-lambda-function-enrichment.js.snapshot/sqspstplambdafunctionenrichmentIntegDefaultTestDeployAssert1F2A8125.template.json
new file mode 100644
index 000000000..ad9d0fb73
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-lambda-function-enrichment.js.snapshot/sqspstplambdafunctionenrichmentIntegDefaultTestDeployAssert1F2A8125.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/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-lambda-function-enrichment.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-lambda-function-enrichment.js.snapshot/tree.json
new file mode 100644
index 000000000..09798a6be
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-lambda-function-enrichment.js.snapshot/tree.json
@@ -0,0 +1,1127 @@
+{
+ "version": "tree-0.1",
+ "tree": {
+ "id": "App",
+ "path": "",
+ "children": {
+ "sqspstp-lambda-function-enrichment": {
+ "id": "sqspstp-lambda-function-enrichment",
+ "path": "sqspstp-lambda-function-enrichment",
+ "children": {
+ "enrichment-function": {
+ "id": "enrichment-function",
+ "path": "sqspstp-lambda-function-enrichment/enrichment-function",
+ "children": {
+ "ServiceRole": {
+ "id": "ServiceRole",
+ "path": "sqspstp-lambda-function-enrichment/enrichment-function/ServiceRole",
+ "children": {
+ "ImportServiceRole": {
+ "id": "ImportServiceRole",
+ "path": "sqspstp-lambda-function-enrichment/enrichment-function/ServiceRole/ImportServiceRole",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.Resource",
+ "version": "2.161.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-lambda-function-enrichment/enrichment-function/ServiceRole/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::IAM::Role",
+ "aws:cdk:cloudformation:props": {
+ "assumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "lambda.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "managedPolicyArns": [
+ {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
+ ]
+ ]
+ }
+ ]
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.CfnRole",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.Role",
+ "version": "2.161.0"
+ }
+ },
+ "Code": {
+ "id": "Code",
+ "path": "sqspstp-lambda-function-enrichment/enrichment-function/Code",
+ "children": {
+ "Stage": {
+ "id": "Stage",
+ "path": "sqspstp-lambda-function-enrichment/enrichment-function/Code/Stage",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.AssetStaging",
+ "version": "2.161.0"
+ }
+ },
+ "AssetBucket": {
+ "id": "AssetBucket",
+ "path": "sqspstp-lambda-function-enrichment/enrichment-function/Code/AssetBucket",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_s3.BucketBase",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_s3_assets.Asset",
+ "version": "2.161.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-lambda-function-enrichment/enrichment-function/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::Lambda::Function",
+ "aws:cdk:cloudformation:props": {
+ "code": {
+ "s3Bucket": {
+ "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
+ },
+ "s3Key": "33adcab38bd8c4e154734b436a40ee81920a89cd6c787ce62302c33df5e1dfcb.zip"
+ },
+ "handler": "index.handler",
+ "role": {
+ "Fn::GetAtt": [
+ "enrichmentfunctionServiceRoleF21A0515",
+ "Arn"
+ ]
+ },
+ "runtime": "nodejs20.x"
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_lambda.CfnFunction",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_lambda.Function",
+ "version": "2.161.0"
+ }
+ },
+ "lambdas3stp-test": {
+ "id": "lambdas3stp-test",
+ "path": "sqspstp-lambda-function-enrichment/lambdas3stp-test",
+ "children": {
+ "ServiceRole": {
+ "id": "ServiceRole",
+ "path": "sqspstp-lambda-function-enrichment/lambdas3stp-test/ServiceRole",
+ "children": {
+ "ImportServiceRole": {
+ "id": "ImportServiceRole",
+ "path": "sqspstp-lambda-function-enrichment/lambdas3stp-test/ServiceRole/ImportServiceRole",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.Resource",
+ "version": "2.161.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-lambda-function-enrichment/lambdas3stp-test/ServiceRole/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::IAM::Role",
+ "aws:cdk:cloudformation:props": {
+ "assumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "lambda.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "managedPolicyArns": [
+ {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
+ ]
+ ]
+ }
+ ]
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.CfnRole",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.Role",
+ "version": "2.161.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-lambda-function-enrichment/lambdas3stp-test/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::Lambda::Function",
+ "aws:cdk:cloudformation:props": {
+ "code": {
+ "zipFile": "exports.handler = async (event) => console.log(event)"
+ },
+ "handler": "index.handler",
+ "role": {
+ "Fn::GetAtt": [
+ "lambdas3stptestServiceRoleF17BB6C7",
+ "Arn"
+ ]
+ },
+ "runtime": "nodejs20.x"
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_lambda.CfnFunction",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_lambda.Function",
+ "version": "2.161.0"
+ }
+ },
+ "tasks3stp-test": {
+ "id": "tasks3stp-test",
+ "path": "sqspstp-lambda-function-enrichment/tasks3stp-test",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_stepfunctions_tasks.LambdaInvoke",
+ "version": "2.161.0"
+ }
+ },
+ "test-sqs-pipes-states-construct": {
+ "id": "test-sqs-pipes-states-construct",
+ "path": "sqspstp-lambda-function-enrichment/test-sqs-pipes-states-construct",
+ "children": {
+ "queue-dlq": {
+ "id": "queue-dlq",
+ "path": "sqspstp-lambda-function-enrichment/test-sqs-pipes-states-construct/queue-dlq",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-lambda-function-enrichment/test-sqs-pipes-states-construct/queue-dlq/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::SQS::Queue",
+ "aws:cdk:cloudformation:props": {
+ "kmsMasterKeyId": "alias/aws/sqs"
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.CfnQueue",
+ "version": "2.161.0"
+ }
+ },
+ "Policy": {
+ "id": "Policy",
+ "path": "sqspstp-lambda-function-enrichment/test-sqs-pipes-states-construct/queue-dlq/Policy",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-lambda-function-enrichment/test-sqs-pipes-states-construct/queue-dlq/Policy/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::SQS::QueuePolicy",
+ "aws:cdk:cloudformation:props": {
+ "policyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "sqs:AddPermission",
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes",
+ "sqs:ReceiveMessage",
+ "sqs:RemovePermission",
+ "sqs:SendMessage",
+ "sqs:SetQueueAttributes"
+ ],
+ "Effect": "Allow",
+ "Principal": {
+ "AWS": {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::",
+ {
+ "Ref": "AWS::AccountId"
+ },
+ ":root"
+ ]
+ ]
+ }
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueuedlq420A82FD",
+ "Arn"
+ ]
+ },
+ "Sid": "QueueOwnerOnlyAccess"
+ },
+ {
+ "Action": "SQS:*",
+ "Condition": {
+ "Bool": {
+ "aws:SecureTransport": "false"
+ }
+ },
+ "Effect": "Deny",
+ "Principal": {
+ "AWS": "*"
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueuedlq420A82FD",
+ "Arn"
+ ]
+ },
+ "Sid": "HttpsOnly"
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "queues": [
+ {
+ "Ref": "testsqspipesstatesconstructqueuedlq420A82FD"
+ }
+ ]
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.Queue",
+ "version": "2.161.0"
+ }
+ },
+ "queue": {
+ "id": "queue",
+ "path": "sqspstp-lambda-function-enrichment/test-sqs-pipes-states-construct/queue",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-lambda-function-enrichment/test-sqs-pipes-states-construct/queue/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::SQS::Queue",
+ "aws:cdk:cloudformation:props": {
+ "kmsMasterKeyId": "alias/aws/sqs",
+ "redrivePolicy": {
+ "deadLetterTargetArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueuedlq420A82FD",
+ "Arn"
+ ]
+ },
+ "maxReceiveCount": 15
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.CfnQueue",
+ "version": "2.161.0"
+ }
+ },
+ "Policy": {
+ "id": "Policy",
+ "path": "sqspstp-lambda-function-enrichment/test-sqs-pipes-states-construct/queue/Policy",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-lambda-function-enrichment/test-sqs-pipes-states-construct/queue/Policy/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::SQS::QueuePolicy",
+ "aws:cdk:cloudformation:props": {
+ "policyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "sqs:AddPermission",
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes",
+ "sqs:ReceiveMessage",
+ "sqs:RemovePermission",
+ "sqs:SendMessage",
+ "sqs:SetQueueAttributes"
+ ],
+ "Effect": "Allow",
+ "Principal": {
+ "AWS": {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::",
+ {
+ "Ref": "AWS::AccountId"
+ },
+ ":root"
+ ]
+ ]
+ }
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ },
+ "Sid": "QueueOwnerOnlyAccess"
+ },
+ {
+ "Action": "SQS:*",
+ "Condition": {
+ "Bool": {
+ "aws:SecureTransport": "false"
+ }
+ },
+ "Effect": "Deny",
+ "Principal": {
+ "AWS": "*"
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ },
+ "Sid": "HttpsOnly"
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "queues": [
+ {
+ "Ref": "testsqspipesstatesconstructqueueA7C76715"
+ }
+ ]
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.Queue",
+ "version": "2.161.0"
+ }
+ },
+ "StateMachineLogGroup": {
+ "id": "StateMachineLogGroup",
+ "path": "sqspstp-lambda-function-enrichment/test-sqs-pipes-states-construct/StateMachineLogGroup",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-lambda-function-enrichment/test-sqs-pipes-states-construct/StateMachineLogGroup/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::Logs::LogGroup",
+ "aws:cdk:cloudformation:props": {
+ "logGroupName": {
+ "Fn::Join": [
+ "",
+ [
+ "/aws/vendedlogs/states/constructs/sqspstp-lambda-function-enrichmenttest-sqs-pipes-states-constructStateMachineLog-",
+ {
+ "Fn::Select": [
+ 2,
+ {
+ "Fn::Split": [
+ "/",
+ {
+ "Ref": "AWS::StackId"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ ]
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_logs.LogGroup",
+ "version": "2.161.0"
+ }
+ },
+ "StateMachine": {
+ "id": "StateMachine",
+ "path": "sqspstp-lambda-function-enrichment/test-sqs-pipes-states-construct/StateMachine",
+ "children": {
+ "Role": {
+ "id": "Role",
+ "path": "sqspstp-lambda-function-enrichment/test-sqs-pipes-states-construct/StateMachine/Role",
+ "children": {
+ "ImportRole": {
+ "id": "ImportRole",
+ "path": "sqspstp-lambda-function-enrichment/test-sqs-pipes-states-construct/StateMachine/Role/ImportRole",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.Resource",
+ "version": "2.161.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-lambda-function-enrichment/test-sqs-pipes-states-construct/StateMachine/Role/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::IAM::Role",
+ "aws:cdk:cloudformation:props": {
+ "assumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "states.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.CfnRole",
+ "version": "2.161.0"
+ }
+ },
+ "DefaultPolicy": {
+ "id": "DefaultPolicy",
+ "path": "sqspstp-lambda-function-enrichment/test-sqs-pipes-states-construct/StateMachine/Role/DefaultPolicy",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-lambda-function-enrichment/test-sqs-pipes-states-construct/StateMachine/Role/DefaultPolicy/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::IAM::Policy",
+ "aws:cdk:cloudformation:props": {
+ "policyDocument": {
+ "Statement": [
+ {
+ "Action": "lambda:InvokeFunction",
+ "Effect": "Allow",
+ "Resource": [
+ {
+ "Fn::GetAtt": [
+ "lambdas3stptest9FBDC6CE",
+ "Arn"
+ ]
+ },
+ {
+ "Fn::Join": [
+ "",
+ [
+ {
+ "Fn::GetAtt": [
+ "lambdas3stptest9FBDC6CE",
+ "Arn"
+ ]
+ },
+ ":*"
+ ]
+ ]
+ }
+ ]
+ },
+ {
+ "Action": [
+ "logs:CreateLogDelivery",
+ "logs:DeleteLogDelivery",
+ "logs:DescribeLogGroups",
+ "logs:DescribeResourcePolicies",
+ "logs:GetLogDelivery",
+ "logs:ListLogDeliveries",
+ "logs:PutResourcePolicy",
+ "logs:UpdateLogDelivery"
+ ],
+ "Effect": "Allow",
+ "Resource": "*"
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "policyName": "testsqspipesstatesconstructStateMachineRoleDefaultPolicyD1BA2BF2",
+ "roles": [
+ {
+ "Ref": "testsqspipesstatesconstructStateMachineRoleBF97BFC0"
+ }
+ ]
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.CfnPolicy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.Policy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.Role",
+ "version": "2.161.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-lambda-function-enrichment/test-sqs-pipes-states-construct/StateMachine/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::StepFunctions::StateMachine",
+ "aws:cdk:cloudformation:props": {
+ "definitionString": {
+ "Fn::Join": [
+ "",
+ [
+ "{\"StartAt\":\"tasks3stp-test\",\"States\":{\"tasks3stp-test\":{\"End\":true,\"Retry\":[{\"ErrorEquals\":[\"Lambda.ClientExecutionTimeoutException\",\"Lambda.ServiceException\",\"Lambda.AWSLambdaException\",\"Lambda.SdkClientException\"],\"IntervalSeconds\":2,\"MaxAttempts\":6,\"BackoffRate\":2}],\"Type\":\"Task\",\"Resource\":\"arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":states:::lambda:invoke\",\"Parameters\":{\"FunctionName\":\"",
+ {
+ "Fn::GetAtt": [
+ "lambdas3stptest9FBDC6CE",
+ "Arn"
+ ]
+ },
+ "\",\"Payload.$\":\"$\"}}}}"
+ ]
+ ]
+ },
+ "loggingConfiguration": {
+ "destinations": [
+ {
+ "cloudWatchLogsLogGroup": {
+ "logGroupArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructStateMachineLogGroupADE94F1D",
+ "Arn"
+ ]
+ }
+ }
+ }
+ ],
+ "level": "ERROR"
+ },
+ "roleArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructStateMachineRoleBF97BFC0",
+ "Arn"
+ ]
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_stepfunctions.CfnStateMachine",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_stepfunctions.StateMachine",
+ "version": "2.161.0"
+ }
+ },
+ "ExecutionFailedAlarm": {
+ "id": "ExecutionFailedAlarm",
+ "path": "sqspstp-lambda-function-enrichment/test-sqs-pipes-states-construct/ExecutionFailedAlarm",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-lambda-function-enrichment/test-sqs-pipes-states-construct/ExecutionFailedAlarm/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::CloudWatch::Alarm",
+ "aws:cdk:cloudformation:props": {
+ "alarmDescription": "Alarm for the number of executions that failed exceeded the threshold of 1. ",
+ "comparisonOperator": "GreaterThanOrEqualToThreshold",
+ "dimensions": [
+ {
+ "name": "StateMachineArn",
+ "value": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "evaluationPeriods": 1,
+ "metricName": "ExecutionsFailed",
+ "namespace": "AWS/States",
+ "period": 300,
+ "statistic": "Sum",
+ "threshold": 1
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm",
+ "version": "2.161.0"
+ }
+ },
+ "ExecutionThrottledAlarm": {
+ "id": "ExecutionThrottledAlarm",
+ "path": "sqspstp-lambda-function-enrichment/test-sqs-pipes-states-construct/ExecutionThrottledAlarm",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-lambda-function-enrichment/test-sqs-pipes-states-construct/ExecutionThrottledAlarm/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::CloudWatch::Alarm",
+ "aws:cdk:cloudformation:props": {
+ "alarmDescription": "Alarm for the number of executions that throttled exceeded the threshold of 1. ",
+ "comparisonOperator": "GreaterThanOrEqualToThreshold",
+ "dimensions": [
+ {
+ "name": "StateMachineArn",
+ "value": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "evaluationPeriods": 1,
+ "metricName": "ExecutionThrottled",
+ "namespace": "AWS/States",
+ "period": 300,
+ "statistic": "Sum",
+ "threshold": 1
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm",
+ "version": "2.161.0"
+ }
+ },
+ "ExecutionAbortedAlarm": {
+ "id": "ExecutionAbortedAlarm",
+ "path": "sqspstp-lambda-function-enrichment/test-sqs-pipes-states-construct/ExecutionAbortedAlarm",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-lambda-function-enrichment/test-sqs-pipes-states-construct/ExecutionAbortedAlarm/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::CloudWatch::Alarm",
+ "aws:cdk:cloudformation:props": {
+ "alarmDescription": "Alarm for the number of executions that aborted exceeded the threshold of 1. ",
+ "comparisonOperator": "GreaterThanOrEqualToThreshold",
+ "dimensions": [
+ {
+ "name": "StateMachineArn",
+ "value": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "evaluationPeriods": 1,
+ "metricName": "ExecutionsAborted",
+ "namespace": "AWS/States",
+ "period": 300,
+ "statistic": "Maximum",
+ "threshold": 1
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm",
+ "version": "2.161.0"
+ }
+ },
+ "PipeRole--test-sqs-pipes-states-construct": {
+ "id": "PipeRole--test-sqs-pipes-states-construct",
+ "path": "sqspstp-lambda-function-enrichment/test-sqs-pipes-states-construct/PipeRole--test-sqs-pipes-states-construct",
+ "children": {
+ "ImportPipeRole--test-sqs-pipes-states-construct": {
+ "id": "ImportPipeRole--test-sqs-pipes-states-construct",
+ "path": "sqspstp-lambda-function-enrichment/test-sqs-pipes-states-construct/PipeRole--test-sqs-pipes-states-construct/ImportPipeRole--test-sqs-pipes-states-construct",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.Resource",
+ "version": "2.161.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-lambda-function-enrichment/test-sqs-pipes-states-construct/PipeRole--test-sqs-pipes-states-construct/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::IAM::Role",
+ "aws:cdk:cloudformation:props": {
+ "assumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "pipes.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "policies": [
+ {
+ "policyName": "sourcePolicy",
+ "policyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes",
+ "sqs:ReceiveMessage"
+ ],
+ "Effect": "Allow",
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ }
+ },
+ {
+ "policyName": "targetPolicy",
+ "policyDocument": {
+ "Statement": [
+ {
+ "Action": "states:StartExecution",
+ "Effect": "Allow",
+ "Resource": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ }
+ }
+ ]
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.CfnRole",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.Role",
+ "version": "2.161.0"
+ }
+ },
+ "enrichmentpolicytest-sqs-pipes-states-construct": {
+ "id": "enrichmentpolicytest-sqs-pipes-states-construct",
+ "path": "sqspstp-lambda-function-enrichment/test-sqs-pipes-states-construct/enrichmentpolicytest-sqs-pipes-states-construct",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-lambda-function-enrichment/test-sqs-pipes-states-construct/enrichmentpolicytest-sqs-pipes-states-construct/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::IAM::Policy",
+ "aws:cdk:cloudformation:props": {
+ "policyDocument": {
+ "Statement": [
+ {
+ "Action": "lambda:InvokeFunction",
+ "Effect": "Allow",
+ "Resource": {
+ "Fn::GetAtt": [
+ "enrichmentfunction84C1BE72",
+ "Arn"
+ ]
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "policyName": "testsqspipesstatesconstructenrichmentpolicytestsqspipesstatesconstructC752476A",
+ "roles": [
+ {
+ "Ref": "testsqspipesstatesconstructPipeRoletestsqspipesstatesconstruct2CC9A13C"
+ }
+ ]
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.CfnPolicy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.Policy",
+ "version": "2.161.0"
+ }
+ },
+ "LogGroup-test-sqs-pipes-states-construct": {
+ "id": "LogGroup-test-sqs-pipes-states-construct",
+ "path": "sqspstp-lambda-function-enrichment/test-sqs-pipes-states-construct/LogGroup-test-sqs-pipes-states-construct",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-lambda-function-enrichment/test-sqs-pipes-states-construct/LogGroup-test-sqs-pipes-states-construct/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::Logs::LogGroup",
+ "aws:cdk:cloudformation:props": {
+ "logGroupName": {
+ "Fn::Join": [
+ "",
+ [
+ "/aws/vendedlogs/pipes/constructs/sqspstp-lambda-function-enrichmenttest-sqs-pipes-states-constructPipesLog-",
+ {
+ "Fn::Select": [
+ 2,
+ {
+ "Fn::Split": [
+ "/",
+ {
+ "Ref": "AWS::StackId"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ ]
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_logs.LogGroup",
+ "version": "2.161.0"
+ }
+ },
+ "pipe-test-sqs-pipes-states-construct": {
+ "id": "pipe-test-sqs-pipes-states-construct",
+ "path": "sqspstp-lambda-function-enrichment/test-sqs-pipes-states-construct/pipe-test-sqs-pipes-states-construct",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::Pipes::Pipe",
+ "aws:cdk:cloudformation:props": {
+ "enrichment": {
+ "Fn::GetAtt": [
+ "enrichmentfunction84C1BE72",
+ "Arn"
+ ]
+ },
+ "logConfiguration": {
+ "cloudwatchLogsLogDestination": {
+ "logGroupArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructLogGrouptestsqspipesstatesconstructF827FE15",
+ "Arn"
+ ]
+ }
+ },
+ "level": "TRACE"
+ },
+ "roleArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructPipeRoletestsqspipesstatesconstruct2CC9A13C",
+ "Arn"
+ ]
+ },
+ "source": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ },
+ "sourceParameters": {},
+ "target": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ },
+ "targetParameters": {
+ "stepFunctionStateMachineParameters": {
+ "invocationType": "FIRE_AND_FORGET"
+ }
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_pipes.CfnPipe",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-solutions-constructs/aws-sqs-pipes-stepfunctions.SqsToPipesToStepfunctions",
+ "version": "2.72.0"
+ }
+ },
+ "Integ": {
+ "id": "Integ",
+ "path": "sqspstp-lambda-function-enrichment/Integ",
+ "children": {
+ "DefaultTest": {
+ "id": "DefaultTest",
+ "path": "sqspstp-lambda-function-enrichment/Integ/DefaultTest",
+ "children": {
+ "Default": {
+ "id": "Default",
+ "path": "sqspstp-lambda-function-enrichment/Integ/DefaultTest/Default",
+ "constructInfo": {
+ "fqn": "constructs.Construct",
+ "version": "10.4.2"
+ }
+ },
+ "DeployAssert": {
+ "id": "DeployAssert",
+ "path": "sqspstp-lambda-function-enrichment/Integ/DefaultTest/DeployAssert",
+ "children": {
+ "BootstrapVersion": {
+ "id": "BootstrapVersion",
+ "path": "sqspstp-lambda-function-enrichment/Integ/DefaultTest/DeployAssert/BootstrapVersion",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.CfnParameter",
+ "version": "2.161.0"
+ }
+ },
+ "CheckBootstrapVersion": {
+ "id": "CheckBootstrapVersion",
+ "path": "sqspstp-lambda-function-enrichment/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.CfnRule",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.Stack",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase",
+ "version": "2.161.0-alpha.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/integ-tests-alpha.IntegTest",
+ "version": "2.161.0-alpha.0"
+ }
+ },
+ "BootstrapVersion": {
+ "id": "BootstrapVersion",
+ "path": "sqspstp-lambda-function-enrichment/BootstrapVersion",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.CfnParameter",
+ "version": "2.161.0"
+ }
+ },
+ "CheckBootstrapVersion": {
+ "id": "CheckBootstrapVersion",
+ "path": "sqspstp-lambda-function-enrichment/CheckBootstrapVersion",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.CfnRule",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.Stack",
+ "version": "2.161.0"
+ }
+ },
+ "Tree": {
+ "id": "Tree",
+ "path": "Tree",
+ "constructInfo": {
+ "fqn": "constructs.Construct",
+ "version": "10.4.2"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.App",
+ "version": "2.161.0"
+ }
+ }
+}
\ No newline at end of file
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-lambda-function-enrichment.ts b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-lambda-function-enrichment.ts
new file mode 100644
index 000000000..d14e81f84
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-lambda-function-enrichment.ts
@@ -0,0 +1,43 @@
+/**
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
+ * with the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES
+ * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+
+/// !cdk-integ *
+import { App, Stack } from "aws-cdk-lib";
+import { SqsToPipesToStepfunctions, SqsToPipesToStepfunctionsProps } from "../lib";
+import { generateIntegStackName } from '@aws-solutions-constructs/core';
+import { IntegTest } from '@aws-cdk/integ-tests-alpha';
+import * as defaults from '@aws-solutions-constructs/core';
+import * as lambda from 'aws-cdk-lib/aws-lambda';
+
+const app = new App();
+const stack = new Stack(app, generateIntegStackName(__filename));
+
+const enrichmentFunction = new lambda.Function(stack, 'enrichment-function', {
+ runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME,
+ handler: 'index.handler',
+ code: lambda.Code.fromAsset(`${__dirname}/lambda`)
+});
+
+const props: SqsToPipesToStepfunctionsProps = {
+ stateMachineProps: {
+ definitionBody: defaults.CreateTestStateMachineDefinitionBody(stack, 's3stp-test')
+ },
+ enrichmentFunction,
+ logLevel: defaults.PipesLogLevel.TRACE
+};
+
+new SqsToPipesToStepfunctions(stack, 'test-sqs-pipes-states-construct', props);
+
+new IntegTest(stack, 'Integ', { testCases: [
+ stack
+] });
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-logs-off.js.snapshot/cdk.out b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-logs-off.js.snapshot/cdk.out
new file mode 100644
index 000000000..c6e612584
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-logs-off.js.snapshot/cdk.out
@@ -0,0 +1 @@
+{"version":"38.0.1"}
\ No newline at end of file
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-logs-off.js.snapshot/integ.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-logs-off.js.snapshot/integ.json
new file mode 100644
index 000000000..30487a45f
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-logs-off.js.snapshot/integ.json
@@ -0,0 +1,12 @@
+{
+ "version": "38.0.1",
+ "testCases": {
+ "sqspstp-logs-off/Integ/DefaultTest": {
+ "stacks": [
+ "sqspstp-logs-off"
+ ],
+ "assertionStack": "sqspstp-logs-off/Integ/DefaultTest/DeployAssert",
+ "assertionStackName": "sqspstplogsoffIntegDefaultTestDeployAssert25C29ACD"
+ }
+ }
+}
\ No newline at end of file
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-logs-off.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-logs-off.js.snapshot/manifest.json
new file mode 100644
index 000000000..3982a409a
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-logs-off.js.snapshot/manifest.json
@@ -0,0 +1,199 @@
+{
+ "version": "38.0.1",
+ "artifacts": {
+ "sqspstplogsoffIntegDefaultTestDeployAssert25C29ACD.assets": {
+ "type": "cdk:asset-manifest",
+ "properties": {
+ "file": "sqspstplogsoffIntegDefaultTestDeployAssert25C29ACD.assets.json",
+ "requiresBootstrapStackVersion": 6,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
+ }
+ },
+ "sqspstplogsoffIntegDefaultTestDeployAssert25C29ACD": {
+ "type": "aws:cloudformation:stack",
+ "environment": "aws://unknown-account/unknown-region",
+ "properties": {
+ "templateFile": "sqspstplogsoffIntegDefaultTestDeployAssert25C29ACD.template.json",
+ "terminationProtection": false,
+ "validateOnSynth": false,
+ "notificationArns": [],
+ "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": [
+ "sqspstplogsoffIntegDefaultTestDeployAssert25C29ACD.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": [
+ "sqspstplogsoffIntegDefaultTestDeployAssert25C29ACD.assets"
+ ],
+ "metadata": {
+ "/sqspstp-logs-off/Integ/DefaultTest/DeployAssert/BootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "BootstrapVersion"
+ }
+ ],
+ "/sqspstp-logs-off/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "CheckBootstrapVersion"
+ }
+ ]
+ },
+ "displayName": "sqspstp-logs-off/Integ/DefaultTest/DeployAssert"
+ },
+ "sqspstp-logs-off.assets": {
+ "type": "cdk:asset-manifest",
+ "properties": {
+ "file": "sqspstp-logs-off.assets.json",
+ "requiresBootstrapStackVersion": 6,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
+ }
+ },
+ "sqspstp-logs-off": {
+ "type": "aws:cloudformation:stack",
+ "environment": "aws://unknown-account/unknown-region",
+ "properties": {
+ "templateFile": "sqspstp-logs-off.template.json",
+ "terminationProtection": false,
+ "validateOnSynth": false,
+ "notificationArns": [],
+ "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}/89d69078e83c9ebe41b3cf105e9646d5e699dda56f3ebddf3e090119e71faab9.json",
+ "requiresBootstrapStackVersion": 6,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
+ "additionalDependencies": [
+ "sqspstp-logs-off.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": [
+ "sqspstp-logs-off.assets"
+ ],
+ "metadata": {
+ "/sqspstp-logs-off/lambdas3stp-test/ServiceRole/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "lambdas3stptestServiceRoleF17BB6C7"
+ }
+ ],
+ "/sqspstp-logs-off/lambdas3stp-test/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "lambdas3stptest9FBDC6CE"
+ }
+ ],
+ "/sqspstp-logs-off/test-sqs-pipes-states-construct/queue-dlq/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructqueuedlq420A82FD"
+ }
+ ],
+ "/sqspstp-logs-off/test-sqs-pipes-states-construct/queue-dlq/Policy/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructqueuedlqPolicyB1D70483"
+ }
+ ],
+ "/sqspstp-logs-off/test-sqs-pipes-states-construct/queue/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructqueueA7C76715"
+ }
+ ],
+ "/sqspstp-logs-off/test-sqs-pipes-states-construct/queue/Policy/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructqueuePolicyFD32B562"
+ }
+ ],
+ "/sqspstp-logs-off/test-sqs-pipes-states-construct/StateMachineLogGroup/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructStateMachineLogGroupADE94F1D"
+ }
+ ],
+ "/sqspstp-logs-off/test-sqs-pipes-states-construct/StateMachine/Role/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructStateMachineRoleBF97BFC0"
+ }
+ ],
+ "/sqspstp-logs-off/test-sqs-pipes-states-construct/StateMachine/Role/DefaultPolicy/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructStateMachineRoleDefaultPolicyD1BA2BF2"
+ }
+ ],
+ "/sqspstp-logs-off/test-sqs-pipes-states-construct/StateMachine/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ ],
+ "/sqspstp-logs-off/test-sqs-pipes-states-construct/ExecutionFailedAlarm/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructExecutionFailedAlarm1002FF55"
+ }
+ ],
+ "/sqspstp-logs-off/test-sqs-pipes-states-construct/ExecutionThrottledAlarm/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructExecutionThrottledAlarm0242B01A"
+ }
+ ],
+ "/sqspstp-logs-off/test-sqs-pipes-states-construct/ExecutionAbortedAlarm/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructExecutionAbortedAlarm14349A7B"
+ }
+ ],
+ "/sqspstp-logs-off/test-sqs-pipes-states-construct/PipeRole--test-sqs-pipes-states-construct/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructPipeRoletestsqspipesstatesconstruct2CC9A13C"
+ }
+ ],
+ "/sqspstp-logs-off/test-sqs-pipes-states-construct/pipe-test-sqs-pipes-states-construct": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructpipetestsqspipesstatesconstruct71A64A15"
+ }
+ ],
+ "/sqspstp-logs-off/BootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "BootstrapVersion"
+ }
+ ],
+ "/sqspstp-logs-off/CheckBootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "CheckBootstrapVersion"
+ }
+ ]
+ },
+ "displayName": "sqspstp-logs-off"
+ },
+ "Tree": {
+ "type": "cdk:tree",
+ "properties": {
+ "file": "tree.json"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-logs-off.js.snapshot/sqspstp-logs-off.assets.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-logs-off.js.snapshot/sqspstp-logs-off.assets.json
new file mode 100644
index 000000000..db15a94a5
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-logs-off.js.snapshot/sqspstp-logs-off.assets.json
@@ -0,0 +1,19 @@
+{
+ "version": "38.0.1",
+ "files": {
+ "89d69078e83c9ebe41b3cf105e9646d5e699dda56f3ebddf3e090119e71faab9": {
+ "source": {
+ "path": "sqspstp-logs-off.template.json",
+ "packaging": "file"
+ },
+ "destinations": {
+ "current_account-current_region": {
+ "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
+ "objectKey": "89d69078e83c9ebe41b3cf105e9646d5e699dda56f3ebddf3e090119e71faab9.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/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-logs-off.js.snapshot/sqspstp-logs-off.template.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-logs-off.js.snapshot/sqspstp-logs-off.template.json
new file mode 100644
index 000000000..25e530493
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-logs-off.js.snapshot/sqspstp-logs-off.template.json
@@ -0,0 +1,601 @@
+{
+ "Resources": {
+ "lambdas3stptestServiceRoleF17BB6C7": {
+ "Type": "AWS::IAM::Role",
+ "Properties": {
+ "AssumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "lambda.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "ManagedPolicyArns": [
+ {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
+ ]
+ ]
+ }
+ ]
+ }
+ },
+ "lambdas3stptest9FBDC6CE": {
+ "Type": "AWS::Lambda::Function",
+ "Properties": {
+ "Code": {
+ "ZipFile": "exports.handler = async (event) => console.log(event)"
+ },
+ "Handler": "index.handler",
+ "Role": {
+ "Fn::GetAtt": [
+ "lambdas3stptestServiceRoleF17BB6C7",
+ "Arn"
+ ]
+ },
+ "Runtime": "nodejs20.x"
+ },
+ "DependsOn": [
+ "lambdas3stptestServiceRoleF17BB6C7"
+ ],
+ "Metadata": {
+ "cfn_nag": {
+ "rules_to_suppress": [
+ {
+ "id": "W58",
+ "reason": "This Lambda Function is created for integration testing purposes only and is not part of an actual construct"
+ },
+ {
+ "id": "W89",
+ "reason": "This Lambda Function is created for integration testing purposes only and is not part of an actual construct"
+ },
+ {
+ "id": "W92",
+ "reason": "This Lambda Function is created for integration testing purposes only and is not part of an actual construct"
+ }
+ ]
+ }
+ }
+ },
+ "testsqspipesstatesconstructqueuedlq420A82FD": {
+ "Type": "AWS::SQS::Queue",
+ "Properties": {
+ "KmsMasterKeyId": "alias/aws/sqs"
+ },
+ "UpdateReplacePolicy": "Delete",
+ "DeletionPolicy": "Delete"
+ },
+ "testsqspipesstatesconstructqueuedlqPolicyB1D70483": {
+ "Type": "AWS::SQS::QueuePolicy",
+ "Properties": {
+ "PolicyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "sqs:AddPermission",
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes",
+ "sqs:ReceiveMessage",
+ "sqs:RemovePermission",
+ "sqs:SendMessage",
+ "sqs:SetQueueAttributes"
+ ],
+ "Effect": "Allow",
+ "Principal": {
+ "AWS": {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::",
+ {
+ "Ref": "AWS::AccountId"
+ },
+ ":root"
+ ]
+ ]
+ }
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueuedlq420A82FD",
+ "Arn"
+ ]
+ },
+ "Sid": "QueueOwnerOnlyAccess"
+ },
+ {
+ "Action": "SQS:*",
+ "Condition": {
+ "Bool": {
+ "aws:SecureTransport": "false"
+ }
+ },
+ "Effect": "Deny",
+ "Principal": {
+ "AWS": "*"
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueuedlq420A82FD",
+ "Arn"
+ ]
+ },
+ "Sid": "HttpsOnly"
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "Queues": [
+ {
+ "Ref": "testsqspipesstatesconstructqueuedlq420A82FD"
+ }
+ ]
+ }
+ },
+ "testsqspipesstatesconstructqueueA7C76715": {
+ "Type": "AWS::SQS::Queue",
+ "Properties": {
+ "KmsMasterKeyId": "alias/aws/sqs",
+ "RedrivePolicy": {
+ "deadLetterTargetArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueuedlq420A82FD",
+ "Arn"
+ ]
+ },
+ "maxReceiveCount": 15
+ }
+ },
+ "UpdateReplacePolicy": "Delete",
+ "DeletionPolicy": "Delete"
+ },
+ "testsqspipesstatesconstructqueuePolicyFD32B562": {
+ "Type": "AWS::SQS::QueuePolicy",
+ "Properties": {
+ "PolicyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "sqs:AddPermission",
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes",
+ "sqs:ReceiveMessage",
+ "sqs:RemovePermission",
+ "sqs:SendMessage",
+ "sqs:SetQueueAttributes"
+ ],
+ "Effect": "Allow",
+ "Principal": {
+ "AWS": {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::",
+ {
+ "Ref": "AWS::AccountId"
+ },
+ ":root"
+ ]
+ ]
+ }
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ },
+ "Sid": "QueueOwnerOnlyAccess"
+ },
+ {
+ "Action": "SQS:*",
+ "Condition": {
+ "Bool": {
+ "aws:SecureTransport": "false"
+ }
+ },
+ "Effect": "Deny",
+ "Principal": {
+ "AWS": "*"
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ },
+ "Sid": "HttpsOnly"
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "Queues": [
+ {
+ "Ref": "testsqspipesstatesconstructqueueA7C76715"
+ }
+ ]
+ }
+ },
+ "testsqspipesstatesconstructStateMachineLogGroupADE94F1D": {
+ "Type": "AWS::Logs::LogGroup",
+ "Properties": {
+ "LogGroupName": {
+ "Fn::Join": [
+ "",
+ [
+ "/aws/vendedlogs/states/constructs/sqspstp-logs-offtest-sqs-pipes-states-constructStateMachineLog-",
+ {
+ "Fn::Select": [
+ 2,
+ {
+ "Fn::Split": [
+ "/",
+ {
+ "Ref": "AWS::StackId"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ ]
+ }
+ },
+ "UpdateReplacePolicy": "Retain",
+ "DeletionPolicy": "Retain",
+ "Metadata": {
+ "cfn_nag": {
+ "rules_to_suppress": [
+ {
+ "id": "W86",
+ "reason": "Retention period for CloudWatchLogs LogGroups are set to 'Never Expire' to preserve customer data indefinitely"
+ },
+ {
+ "id": "W84",
+ "reason": "By default CloudWatchLogs LogGroups data is encrypted using the CloudWatch server-side encryption keys (AWS Managed Keys)"
+ }
+ ]
+ }
+ }
+ },
+ "testsqspipesstatesconstructStateMachineRoleBF97BFC0": {
+ "Type": "AWS::IAM::Role",
+ "Properties": {
+ "AssumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "states.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ }
+ }
+ },
+ "testsqspipesstatesconstructStateMachineRoleDefaultPolicyD1BA2BF2": {
+ "Type": "AWS::IAM::Policy",
+ "Properties": {
+ "PolicyDocument": {
+ "Statement": [
+ {
+ "Action": "lambda:InvokeFunction",
+ "Effect": "Allow",
+ "Resource": [
+ {
+ "Fn::GetAtt": [
+ "lambdas3stptest9FBDC6CE",
+ "Arn"
+ ]
+ },
+ {
+ "Fn::Join": [
+ "",
+ [
+ {
+ "Fn::GetAtt": [
+ "lambdas3stptest9FBDC6CE",
+ "Arn"
+ ]
+ },
+ ":*"
+ ]
+ ]
+ }
+ ]
+ },
+ {
+ "Action": [
+ "logs:CreateLogDelivery",
+ "logs:DeleteLogDelivery",
+ "logs:DescribeLogGroups",
+ "logs:DescribeResourcePolicies",
+ "logs:GetLogDelivery",
+ "logs:ListLogDeliveries",
+ "logs:PutResourcePolicy",
+ "logs:UpdateLogDelivery"
+ ],
+ "Effect": "Allow",
+ "Resource": "*"
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "PolicyName": "testsqspipesstatesconstructStateMachineRoleDefaultPolicyD1BA2BF2",
+ "Roles": [
+ {
+ "Ref": "testsqspipesstatesconstructStateMachineRoleBF97BFC0"
+ }
+ ]
+ },
+ "Metadata": {
+ "cfn_nag": {
+ "rules_to_suppress": [
+ {
+ "id": "W12",
+ "reason": "These are CDK defaults. The 'LogDelivery' actions do not support resource-level authorizations. Any logging is done by State Machine code"
+ }
+ ]
+ }
+ }
+ },
+ "testsqspipesstatesconstructStateMachine29272AA9": {
+ "Type": "AWS::StepFunctions::StateMachine",
+ "Properties": {
+ "DefinitionString": {
+ "Fn::Join": [
+ "",
+ [
+ "{\"StartAt\":\"tasks3stp-test\",\"States\":{\"tasks3stp-test\":{\"End\":true,\"Retry\":[{\"ErrorEquals\":[\"Lambda.ClientExecutionTimeoutException\",\"Lambda.ServiceException\",\"Lambda.AWSLambdaException\",\"Lambda.SdkClientException\"],\"IntervalSeconds\":2,\"MaxAttempts\":6,\"BackoffRate\":2}],\"Type\":\"Task\",\"Resource\":\"arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":states:::lambda:invoke\",\"Parameters\":{\"FunctionName\":\"",
+ {
+ "Fn::GetAtt": [
+ "lambdas3stptest9FBDC6CE",
+ "Arn"
+ ]
+ },
+ "\",\"Payload.$\":\"$\"}}}}"
+ ]
+ ]
+ },
+ "LoggingConfiguration": {
+ "Destinations": [
+ {
+ "CloudWatchLogsLogGroup": {
+ "LogGroupArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructStateMachineLogGroupADE94F1D",
+ "Arn"
+ ]
+ }
+ }
+ }
+ ],
+ "Level": "ERROR"
+ },
+ "RoleArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructStateMachineRoleBF97BFC0",
+ "Arn"
+ ]
+ }
+ },
+ "DependsOn": [
+ "testsqspipesstatesconstructStateMachineRoleDefaultPolicyD1BA2BF2",
+ "testsqspipesstatesconstructStateMachineRoleBF97BFC0"
+ ],
+ "UpdateReplacePolicy": "Delete",
+ "DeletionPolicy": "Delete"
+ },
+ "testsqspipesstatesconstructExecutionFailedAlarm1002FF55": {
+ "Type": "AWS::CloudWatch::Alarm",
+ "Properties": {
+ "AlarmDescription": "Alarm for the number of executions that failed exceeded the threshold of 1. ",
+ "ComparisonOperator": "GreaterThanOrEqualToThreshold",
+ "Dimensions": [
+ {
+ "Name": "StateMachineArn",
+ "Value": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "EvaluationPeriods": 1,
+ "MetricName": "ExecutionsFailed",
+ "Namespace": "AWS/States",
+ "Period": 300,
+ "Statistic": "Sum",
+ "Threshold": 1
+ }
+ },
+ "testsqspipesstatesconstructExecutionThrottledAlarm0242B01A": {
+ "Type": "AWS::CloudWatch::Alarm",
+ "Properties": {
+ "AlarmDescription": "Alarm for the number of executions that throttled exceeded the threshold of 1. ",
+ "ComparisonOperator": "GreaterThanOrEqualToThreshold",
+ "Dimensions": [
+ {
+ "Name": "StateMachineArn",
+ "Value": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "EvaluationPeriods": 1,
+ "MetricName": "ExecutionThrottled",
+ "Namespace": "AWS/States",
+ "Period": 300,
+ "Statistic": "Sum",
+ "Threshold": 1
+ }
+ },
+ "testsqspipesstatesconstructExecutionAbortedAlarm14349A7B": {
+ "Type": "AWS::CloudWatch::Alarm",
+ "Properties": {
+ "AlarmDescription": "Alarm for the number of executions that aborted exceeded the threshold of 1. ",
+ "ComparisonOperator": "GreaterThanOrEqualToThreshold",
+ "Dimensions": [
+ {
+ "Name": "StateMachineArn",
+ "Value": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "EvaluationPeriods": 1,
+ "MetricName": "ExecutionsAborted",
+ "Namespace": "AWS/States",
+ "Period": 300,
+ "Statistic": "Maximum",
+ "Threshold": 1
+ }
+ },
+ "testsqspipesstatesconstructPipeRoletestsqspipesstatesconstruct2CC9A13C": {
+ "Type": "AWS::IAM::Role",
+ "Properties": {
+ "AssumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "pipes.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "Policies": [
+ {
+ "PolicyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes",
+ "sqs:ReceiveMessage"
+ ],
+ "Effect": "Allow",
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "PolicyName": "sourcePolicy"
+ },
+ {
+ "PolicyDocument": {
+ "Statement": [
+ {
+ "Action": "states:StartExecution",
+ "Effect": "Allow",
+ "Resource": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "PolicyName": "targetPolicy"
+ }
+ ]
+ },
+ "Metadata": {
+ "guard": {
+ "SuppressedRules": [
+ "IAM_NO_INLINE_POLICY_CHECK"
+ ]
+ }
+ }
+ },
+ "testsqspipesstatesconstructpipetestsqspipesstatesconstruct71A64A15": {
+ "Type": "AWS::Pipes::Pipe",
+ "Properties": {
+ "RoleArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructPipeRoletestsqspipesstatesconstruct2CC9A13C",
+ "Arn"
+ ]
+ },
+ "Source": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ },
+ "SourceParameters": {},
+ "Target": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ },
+ "TargetParameters": {
+ "StepFunctionStateMachineParameters": {
+ "InvocationType": "FIRE_AND_FORGET"
+ }
+ }
+ }
+ }
+ },
+ "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/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-logs-off.js.snapshot/sqspstplogsoffIntegDefaultTestDeployAssert25C29ACD.assets.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-logs-off.js.snapshot/sqspstplogsoffIntegDefaultTestDeployAssert25C29ACD.assets.json
new file mode 100644
index 000000000..5c2973437
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-logs-off.js.snapshot/sqspstplogsoffIntegDefaultTestDeployAssert25C29ACD.assets.json
@@ -0,0 +1,19 @@
+{
+ "version": "38.0.1",
+ "files": {
+ "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": {
+ "source": {
+ "path": "sqspstplogsoffIntegDefaultTestDeployAssert25C29ACD.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/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-logs-off.js.snapshot/sqspstplogsoffIntegDefaultTestDeployAssert25C29ACD.template.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-logs-off.js.snapshot/sqspstplogsoffIntegDefaultTestDeployAssert25C29ACD.template.json
new file mode 100644
index 000000000..ad9d0fb73
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-logs-off.js.snapshot/sqspstplogsoffIntegDefaultTestDeployAssert25C29ACD.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/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-logs-off.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-logs-off.js.snapshot/tree.json
new file mode 100644
index 000000000..cf89ae5c2
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-logs-off.js.snapshot/tree.json
@@ -0,0 +1,902 @@
+{
+ "version": "tree-0.1",
+ "tree": {
+ "id": "App",
+ "path": "",
+ "children": {
+ "sqspstp-logs-off": {
+ "id": "sqspstp-logs-off",
+ "path": "sqspstp-logs-off",
+ "children": {
+ "lambdas3stp-test": {
+ "id": "lambdas3stp-test",
+ "path": "sqspstp-logs-off/lambdas3stp-test",
+ "children": {
+ "ServiceRole": {
+ "id": "ServiceRole",
+ "path": "sqspstp-logs-off/lambdas3stp-test/ServiceRole",
+ "children": {
+ "ImportServiceRole": {
+ "id": "ImportServiceRole",
+ "path": "sqspstp-logs-off/lambdas3stp-test/ServiceRole/ImportServiceRole",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.Resource",
+ "version": "2.161.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-logs-off/lambdas3stp-test/ServiceRole/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::IAM::Role",
+ "aws:cdk:cloudformation:props": {
+ "assumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "lambda.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "managedPolicyArns": [
+ {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
+ ]
+ ]
+ }
+ ]
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.CfnRole",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.Role",
+ "version": "2.161.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-logs-off/lambdas3stp-test/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::Lambda::Function",
+ "aws:cdk:cloudformation:props": {
+ "code": {
+ "zipFile": "exports.handler = async (event) => console.log(event)"
+ },
+ "handler": "index.handler",
+ "role": {
+ "Fn::GetAtt": [
+ "lambdas3stptestServiceRoleF17BB6C7",
+ "Arn"
+ ]
+ },
+ "runtime": "nodejs20.x"
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_lambda.CfnFunction",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_lambda.Function",
+ "version": "2.161.0"
+ }
+ },
+ "tasks3stp-test": {
+ "id": "tasks3stp-test",
+ "path": "sqspstp-logs-off/tasks3stp-test",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_stepfunctions_tasks.LambdaInvoke",
+ "version": "2.161.0"
+ }
+ },
+ "test-sqs-pipes-states-construct": {
+ "id": "test-sqs-pipes-states-construct",
+ "path": "sqspstp-logs-off/test-sqs-pipes-states-construct",
+ "children": {
+ "queue-dlq": {
+ "id": "queue-dlq",
+ "path": "sqspstp-logs-off/test-sqs-pipes-states-construct/queue-dlq",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-logs-off/test-sqs-pipes-states-construct/queue-dlq/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::SQS::Queue",
+ "aws:cdk:cloudformation:props": {
+ "kmsMasterKeyId": "alias/aws/sqs"
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.CfnQueue",
+ "version": "2.161.0"
+ }
+ },
+ "Policy": {
+ "id": "Policy",
+ "path": "sqspstp-logs-off/test-sqs-pipes-states-construct/queue-dlq/Policy",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-logs-off/test-sqs-pipes-states-construct/queue-dlq/Policy/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::SQS::QueuePolicy",
+ "aws:cdk:cloudformation:props": {
+ "policyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "sqs:AddPermission",
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes",
+ "sqs:ReceiveMessage",
+ "sqs:RemovePermission",
+ "sqs:SendMessage",
+ "sqs:SetQueueAttributes"
+ ],
+ "Effect": "Allow",
+ "Principal": {
+ "AWS": {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::",
+ {
+ "Ref": "AWS::AccountId"
+ },
+ ":root"
+ ]
+ ]
+ }
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueuedlq420A82FD",
+ "Arn"
+ ]
+ },
+ "Sid": "QueueOwnerOnlyAccess"
+ },
+ {
+ "Action": "SQS:*",
+ "Condition": {
+ "Bool": {
+ "aws:SecureTransport": "false"
+ }
+ },
+ "Effect": "Deny",
+ "Principal": {
+ "AWS": "*"
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueuedlq420A82FD",
+ "Arn"
+ ]
+ },
+ "Sid": "HttpsOnly"
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "queues": [
+ {
+ "Ref": "testsqspipesstatesconstructqueuedlq420A82FD"
+ }
+ ]
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.Queue",
+ "version": "2.161.0"
+ }
+ },
+ "queue": {
+ "id": "queue",
+ "path": "sqspstp-logs-off/test-sqs-pipes-states-construct/queue",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-logs-off/test-sqs-pipes-states-construct/queue/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::SQS::Queue",
+ "aws:cdk:cloudformation:props": {
+ "kmsMasterKeyId": "alias/aws/sqs",
+ "redrivePolicy": {
+ "deadLetterTargetArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueuedlq420A82FD",
+ "Arn"
+ ]
+ },
+ "maxReceiveCount": 15
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.CfnQueue",
+ "version": "2.161.0"
+ }
+ },
+ "Policy": {
+ "id": "Policy",
+ "path": "sqspstp-logs-off/test-sqs-pipes-states-construct/queue/Policy",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-logs-off/test-sqs-pipes-states-construct/queue/Policy/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::SQS::QueuePolicy",
+ "aws:cdk:cloudformation:props": {
+ "policyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "sqs:AddPermission",
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes",
+ "sqs:ReceiveMessage",
+ "sqs:RemovePermission",
+ "sqs:SendMessage",
+ "sqs:SetQueueAttributes"
+ ],
+ "Effect": "Allow",
+ "Principal": {
+ "AWS": {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::",
+ {
+ "Ref": "AWS::AccountId"
+ },
+ ":root"
+ ]
+ ]
+ }
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ },
+ "Sid": "QueueOwnerOnlyAccess"
+ },
+ {
+ "Action": "SQS:*",
+ "Condition": {
+ "Bool": {
+ "aws:SecureTransport": "false"
+ }
+ },
+ "Effect": "Deny",
+ "Principal": {
+ "AWS": "*"
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ },
+ "Sid": "HttpsOnly"
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "queues": [
+ {
+ "Ref": "testsqspipesstatesconstructqueueA7C76715"
+ }
+ ]
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.Queue",
+ "version": "2.161.0"
+ }
+ },
+ "StateMachineLogGroup": {
+ "id": "StateMachineLogGroup",
+ "path": "sqspstp-logs-off/test-sqs-pipes-states-construct/StateMachineLogGroup",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-logs-off/test-sqs-pipes-states-construct/StateMachineLogGroup/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::Logs::LogGroup",
+ "aws:cdk:cloudformation:props": {
+ "logGroupName": {
+ "Fn::Join": [
+ "",
+ [
+ "/aws/vendedlogs/states/constructs/sqspstp-logs-offtest-sqs-pipes-states-constructStateMachineLog-",
+ {
+ "Fn::Select": [
+ 2,
+ {
+ "Fn::Split": [
+ "/",
+ {
+ "Ref": "AWS::StackId"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ ]
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_logs.LogGroup",
+ "version": "2.161.0"
+ }
+ },
+ "StateMachine": {
+ "id": "StateMachine",
+ "path": "sqspstp-logs-off/test-sqs-pipes-states-construct/StateMachine",
+ "children": {
+ "Role": {
+ "id": "Role",
+ "path": "sqspstp-logs-off/test-sqs-pipes-states-construct/StateMachine/Role",
+ "children": {
+ "ImportRole": {
+ "id": "ImportRole",
+ "path": "sqspstp-logs-off/test-sqs-pipes-states-construct/StateMachine/Role/ImportRole",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.Resource",
+ "version": "2.161.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-logs-off/test-sqs-pipes-states-construct/StateMachine/Role/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::IAM::Role",
+ "aws:cdk:cloudformation:props": {
+ "assumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "states.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.CfnRole",
+ "version": "2.161.0"
+ }
+ },
+ "DefaultPolicy": {
+ "id": "DefaultPolicy",
+ "path": "sqspstp-logs-off/test-sqs-pipes-states-construct/StateMachine/Role/DefaultPolicy",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-logs-off/test-sqs-pipes-states-construct/StateMachine/Role/DefaultPolicy/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::IAM::Policy",
+ "aws:cdk:cloudformation:props": {
+ "policyDocument": {
+ "Statement": [
+ {
+ "Action": "lambda:InvokeFunction",
+ "Effect": "Allow",
+ "Resource": [
+ {
+ "Fn::GetAtt": [
+ "lambdas3stptest9FBDC6CE",
+ "Arn"
+ ]
+ },
+ {
+ "Fn::Join": [
+ "",
+ [
+ {
+ "Fn::GetAtt": [
+ "lambdas3stptest9FBDC6CE",
+ "Arn"
+ ]
+ },
+ ":*"
+ ]
+ ]
+ }
+ ]
+ },
+ {
+ "Action": [
+ "logs:CreateLogDelivery",
+ "logs:DeleteLogDelivery",
+ "logs:DescribeLogGroups",
+ "logs:DescribeResourcePolicies",
+ "logs:GetLogDelivery",
+ "logs:ListLogDeliveries",
+ "logs:PutResourcePolicy",
+ "logs:UpdateLogDelivery"
+ ],
+ "Effect": "Allow",
+ "Resource": "*"
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "policyName": "testsqspipesstatesconstructStateMachineRoleDefaultPolicyD1BA2BF2",
+ "roles": [
+ {
+ "Ref": "testsqspipesstatesconstructStateMachineRoleBF97BFC0"
+ }
+ ]
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.CfnPolicy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.Policy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.Role",
+ "version": "2.161.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-logs-off/test-sqs-pipes-states-construct/StateMachine/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::StepFunctions::StateMachine",
+ "aws:cdk:cloudformation:props": {
+ "definitionString": {
+ "Fn::Join": [
+ "",
+ [
+ "{\"StartAt\":\"tasks3stp-test\",\"States\":{\"tasks3stp-test\":{\"End\":true,\"Retry\":[{\"ErrorEquals\":[\"Lambda.ClientExecutionTimeoutException\",\"Lambda.ServiceException\",\"Lambda.AWSLambdaException\",\"Lambda.SdkClientException\"],\"IntervalSeconds\":2,\"MaxAttempts\":6,\"BackoffRate\":2}],\"Type\":\"Task\",\"Resource\":\"arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":states:::lambda:invoke\",\"Parameters\":{\"FunctionName\":\"",
+ {
+ "Fn::GetAtt": [
+ "lambdas3stptest9FBDC6CE",
+ "Arn"
+ ]
+ },
+ "\",\"Payload.$\":\"$\"}}}}"
+ ]
+ ]
+ },
+ "loggingConfiguration": {
+ "destinations": [
+ {
+ "cloudWatchLogsLogGroup": {
+ "logGroupArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructStateMachineLogGroupADE94F1D",
+ "Arn"
+ ]
+ }
+ }
+ }
+ ],
+ "level": "ERROR"
+ },
+ "roleArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructStateMachineRoleBF97BFC0",
+ "Arn"
+ ]
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_stepfunctions.CfnStateMachine",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_stepfunctions.StateMachine",
+ "version": "2.161.0"
+ }
+ },
+ "ExecutionFailedAlarm": {
+ "id": "ExecutionFailedAlarm",
+ "path": "sqspstp-logs-off/test-sqs-pipes-states-construct/ExecutionFailedAlarm",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-logs-off/test-sqs-pipes-states-construct/ExecutionFailedAlarm/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::CloudWatch::Alarm",
+ "aws:cdk:cloudformation:props": {
+ "alarmDescription": "Alarm for the number of executions that failed exceeded the threshold of 1. ",
+ "comparisonOperator": "GreaterThanOrEqualToThreshold",
+ "dimensions": [
+ {
+ "name": "StateMachineArn",
+ "value": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "evaluationPeriods": 1,
+ "metricName": "ExecutionsFailed",
+ "namespace": "AWS/States",
+ "period": 300,
+ "statistic": "Sum",
+ "threshold": 1
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm",
+ "version": "2.161.0"
+ }
+ },
+ "ExecutionThrottledAlarm": {
+ "id": "ExecutionThrottledAlarm",
+ "path": "sqspstp-logs-off/test-sqs-pipes-states-construct/ExecutionThrottledAlarm",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-logs-off/test-sqs-pipes-states-construct/ExecutionThrottledAlarm/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::CloudWatch::Alarm",
+ "aws:cdk:cloudformation:props": {
+ "alarmDescription": "Alarm for the number of executions that throttled exceeded the threshold of 1. ",
+ "comparisonOperator": "GreaterThanOrEqualToThreshold",
+ "dimensions": [
+ {
+ "name": "StateMachineArn",
+ "value": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "evaluationPeriods": 1,
+ "metricName": "ExecutionThrottled",
+ "namespace": "AWS/States",
+ "period": 300,
+ "statistic": "Sum",
+ "threshold": 1
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm",
+ "version": "2.161.0"
+ }
+ },
+ "ExecutionAbortedAlarm": {
+ "id": "ExecutionAbortedAlarm",
+ "path": "sqspstp-logs-off/test-sqs-pipes-states-construct/ExecutionAbortedAlarm",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-logs-off/test-sqs-pipes-states-construct/ExecutionAbortedAlarm/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::CloudWatch::Alarm",
+ "aws:cdk:cloudformation:props": {
+ "alarmDescription": "Alarm for the number of executions that aborted exceeded the threshold of 1. ",
+ "comparisonOperator": "GreaterThanOrEqualToThreshold",
+ "dimensions": [
+ {
+ "name": "StateMachineArn",
+ "value": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "evaluationPeriods": 1,
+ "metricName": "ExecutionsAborted",
+ "namespace": "AWS/States",
+ "period": 300,
+ "statistic": "Maximum",
+ "threshold": 1
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm",
+ "version": "2.161.0"
+ }
+ },
+ "PipeRole--test-sqs-pipes-states-construct": {
+ "id": "PipeRole--test-sqs-pipes-states-construct",
+ "path": "sqspstp-logs-off/test-sqs-pipes-states-construct/PipeRole--test-sqs-pipes-states-construct",
+ "children": {
+ "ImportPipeRole--test-sqs-pipes-states-construct": {
+ "id": "ImportPipeRole--test-sqs-pipes-states-construct",
+ "path": "sqspstp-logs-off/test-sqs-pipes-states-construct/PipeRole--test-sqs-pipes-states-construct/ImportPipeRole--test-sqs-pipes-states-construct",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.Resource",
+ "version": "2.161.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-logs-off/test-sqs-pipes-states-construct/PipeRole--test-sqs-pipes-states-construct/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::IAM::Role",
+ "aws:cdk:cloudformation:props": {
+ "assumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "pipes.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "policies": [
+ {
+ "policyName": "sourcePolicy",
+ "policyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes",
+ "sqs:ReceiveMessage"
+ ],
+ "Effect": "Allow",
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ }
+ },
+ {
+ "policyName": "targetPolicy",
+ "policyDocument": {
+ "Statement": [
+ {
+ "Action": "states:StartExecution",
+ "Effect": "Allow",
+ "Resource": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ }
+ }
+ ]
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.CfnRole",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.Role",
+ "version": "2.161.0"
+ }
+ },
+ "pipe-test-sqs-pipes-states-construct": {
+ "id": "pipe-test-sqs-pipes-states-construct",
+ "path": "sqspstp-logs-off/test-sqs-pipes-states-construct/pipe-test-sqs-pipes-states-construct",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::Pipes::Pipe",
+ "aws:cdk:cloudformation:props": {
+ "roleArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructPipeRoletestsqspipesstatesconstruct2CC9A13C",
+ "Arn"
+ ]
+ },
+ "source": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ },
+ "sourceParameters": {},
+ "target": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ },
+ "targetParameters": {
+ "stepFunctionStateMachineParameters": {
+ "invocationType": "FIRE_AND_FORGET"
+ }
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_pipes.CfnPipe",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-solutions-constructs/aws-sqs-pipes-stepfunctions.SqsToPipesToStepfunctions",
+ "version": "2.72.0"
+ }
+ },
+ "Integ": {
+ "id": "Integ",
+ "path": "sqspstp-logs-off/Integ",
+ "children": {
+ "DefaultTest": {
+ "id": "DefaultTest",
+ "path": "sqspstp-logs-off/Integ/DefaultTest",
+ "children": {
+ "Default": {
+ "id": "Default",
+ "path": "sqspstp-logs-off/Integ/DefaultTest/Default",
+ "constructInfo": {
+ "fqn": "constructs.Construct",
+ "version": "10.4.2"
+ }
+ },
+ "DeployAssert": {
+ "id": "DeployAssert",
+ "path": "sqspstp-logs-off/Integ/DefaultTest/DeployAssert",
+ "children": {
+ "BootstrapVersion": {
+ "id": "BootstrapVersion",
+ "path": "sqspstp-logs-off/Integ/DefaultTest/DeployAssert/BootstrapVersion",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.CfnParameter",
+ "version": "2.161.0"
+ }
+ },
+ "CheckBootstrapVersion": {
+ "id": "CheckBootstrapVersion",
+ "path": "sqspstp-logs-off/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.CfnRule",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.Stack",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase",
+ "version": "2.161.0-alpha.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/integ-tests-alpha.IntegTest",
+ "version": "2.161.0-alpha.0"
+ }
+ },
+ "BootstrapVersion": {
+ "id": "BootstrapVersion",
+ "path": "sqspstp-logs-off/BootstrapVersion",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.CfnParameter",
+ "version": "2.161.0"
+ }
+ },
+ "CheckBootstrapVersion": {
+ "id": "CheckBootstrapVersion",
+ "path": "sqspstp-logs-off/CheckBootstrapVersion",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.CfnRule",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.Stack",
+ "version": "2.161.0"
+ }
+ },
+ "Tree": {
+ "id": "Tree",
+ "path": "Tree",
+ "constructInfo": {
+ "fqn": "constructs.Construct",
+ "version": "10.4.2"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.App",
+ "version": "2.161.0"
+ }
+ }
+}
\ No newline at end of file
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-logs-off.ts b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-logs-off.ts
new file mode 100644
index 000000000..696796857
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-logs-off.ts
@@ -0,0 +1,35 @@
+/**
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
+ * with the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES
+ * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+
+/// !cdk-integ *
+import { App, Stack } from "aws-cdk-lib";
+import { SqsToPipesToStepfunctions, SqsToPipesToStepfunctionsProps } from "../lib";
+import { generateIntegStackName } from '@aws-solutions-constructs/core';
+import { IntegTest } from '@aws-cdk/integ-tests-alpha';
+import * as defaults from '@aws-solutions-constructs/core';
+
+const app = new App();
+const stack = new Stack(app, generateIntegStackName(__filename));
+
+const props: SqsToPipesToStepfunctionsProps = {
+ stateMachineProps: {
+ definitionBody: defaults.CreateTestStateMachineDefinitionBody(stack, 's3stp-test')
+ },
+ logLevel: defaults.PipesLogLevel.OFF
+};
+
+new SqsToPipesToStepfunctions(stack, 'test-sqs-pipes-states-construct', props);
+
+new IntegTest(stack, 'Integ', { testCases: [
+ stack
+] });
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-no-arguments.js.snapshot/cdk.out b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-no-arguments.js.snapshot/cdk.out
new file mode 100644
index 000000000..c6e612584
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-no-arguments.js.snapshot/cdk.out
@@ -0,0 +1 @@
+{"version":"38.0.1"}
\ No newline at end of file
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-no-arguments.js.snapshot/integ.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-no-arguments.js.snapshot/integ.json
new file mode 100644
index 000000000..3a9622c9e
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-no-arguments.js.snapshot/integ.json
@@ -0,0 +1,12 @@
+{
+ "version": "38.0.1",
+ "testCases": {
+ "sqspstp-no-arguments/Integ/DefaultTest": {
+ "stacks": [
+ "sqspstp-no-arguments"
+ ],
+ "assertionStack": "sqspstp-no-arguments/Integ/DefaultTest/DeployAssert",
+ "assertionStackName": "sqspstpnoargumentsIntegDefaultTestDeployAssert83953622"
+ }
+ }
+}
\ No newline at end of file
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-no-arguments.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-no-arguments.js.snapshot/manifest.json
new file mode 100644
index 000000000..856a9a94c
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-no-arguments.js.snapshot/manifest.json
@@ -0,0 +1,205 @@
+{
+ "version": "38.0.1",
+ "artifacts": {
+ "sqspstpnoargumentsIntegDefaultTestDeployAssert83953622.assets": {
+ "type": "cdk:asset-manifest",
+ "properties": {
+ "file": "sqspstpnoargumentsIntegDefaultTestDeployAssert83953622.assets.json",
+ "requiresBootstrapStackVersion": 6,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
+ }
+ },
+ "sqspstpnoargumentsIntegDefaultTestDeployAssert83953622": {
+ "type": "aws:cloudformation:stack",
+ "environment": "aws://unknown-account/unknown-region",
+ "properties": {
+ "templateFile": "sqspstpnoargumentsIntegDefaultTestDeployAssert83953622.template.json",
+ "terminationProtection": false,
+ "validateOnSynth": false,
+ "notificationArns": [],
+ "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": [
+ "sqspstpnoargumentsIntegDefaultTestDeployAssert83953622.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": [
+ "sqspstpnoargumentsIntegDefaultTestDeployAssert83953622.assets"
+ ],
+ "metadata": {
+ "/sqspstp-no-arguments/Integ/DefaultTest/DeployAssert/BootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "BootstrapVersion"
+ }
+ ],
+ "/sqspstp-no-arguments/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "CheckBootstrapVersion"
+ }
+ ]
+ },
+ "displayName": "sqspstp-no-arguments/Integ/DefaultTest/DeployAssert"
+ },
+ "sqspstp-no-arguments.assets": {
+ "type": "cdk:asset-manifest",
+ "properties": {
+ "file": "sqspstp-no-arguments.assets.json",
+ "requiresBootstrapStackVersion": 6,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
+ }
+ },
+ "sqspstp-no-arguments": {
+ "type": "aws:cloudformation:stack",
+ "environment": "aws://unknown-account/unknown-region",
+ "properties": {
+ "templateFile": "sqspstp-no-arguments.template.json",
+ "terminationProtection": false,
+ "validateOnSynth": false,
+ "notificationArns": [],
+ "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}/20815c0b1c24ed41b6c31ad1fb21b7cc5502c5f051ec5a21657d78b5bfd7efbd.json",
+ "requiresBootstrapStackVersion": 6,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
+ "additionalDependencies": [
+ "sqspstp-no-arguments.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": [
+ "sqspstp-no-arguments.assets"
+ ],
+ "metadata": {
+ "/sqspstp-no-arguments/lambdas3stp-test/ServiceRole/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "lambdas3stptestServiceRoleF17BB6C7"
+ }
+ ],
+ "/sqspstp-no-arguments/lambdas3stp-test/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "lambdas3stptest9FBDC6CE"
+ }
+ ],
+ "/sqspstp-no-arguments/test-sqs-pipes-states-construct/queue-dlq/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructqueuedlq420A82FD"
+ }
+ ],
+ "/sqspstp-no-arguments/test-sqs-pipes-states-construct/queue-dlq/Policy/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructqueuedlqPolicyB1D70483"
+ }
+ ],
+ "/sqspstp-no-arguments/test-sqs-pipes-states-construct/queue/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructqueueA7C76715"
+ }
+ ],
+ "/sqspstp-no-arguments/test-sqs-pipes-states-construct/queue/Policy/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructqueuePolicyFD32B562"
+ }
+ ],
+ "/sqspstp-no-arguments/test-sqs-pipes-states-construct/StateMachineLogGroup/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructStateMachineLogGroupADE94F1D"
+ }
+ ],
+ "/sqspstp-no-arguments/test-sqs-pipes-states-construct/StateMachine/Role/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructStateMachineRoleBF97BFC0"
+ }
+ ],
+ "/sqspstp-no-arguments/test-sqs-pipes-states-construct/StateMachine/Role/DefaultPolicy/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructStateMachineRoleDefaultPolicyD1BA2BF2"
+ }
+ ],
+ "/sqspstp-no-arguments/test-sqs-pipes-states-construct/StateMachine/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ ],
+ "/sqspstp-no-arguments/test-sqs-pipes-states-construct/ExecutionFailedAlarm/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructExecutionFailedAlarm1002FF55"
+ }
+ ],
+ "/sqspstp-no-arguments/test-sqs-pipes-states-construct/ExecutionThrottledAlarm/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructExecutionThrottledAlarm0242B01A"
+ }
+ ],
+ "/sqspstp-no-arguments/test-sqs-pipes-states-construct/ExecutionAbortedAlarm/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructExecutionAbortedAlarm14349A7B"
+ }
+ ],
+ "/sqspstp-no-arguments/test-sqs-pipes-states-construct/PipeRole--test-sqs-pipes-states-construct/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructPipeRoletestsqspipesstatesconstruct2CC9A13C"
+ }
+ ],
+ "/sqspstp-no-arguments/test-sqs-pipes-states-construct/LogGroup-test-sqs-pipes-states-construct/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructLogGrouptestsqspipesstatesconstructF827FE15"
+ }
+ ],
+ "/sqspstp-no-arguments/test-sqs-pipes-states-construct/pipe-test-sqs-pipes-states-construct": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructpipetestsqspipesstatesconstruct71A64A15"
+ }
+ ],
+ "/sqspstp-no-arguments/BootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "BootstrapVersion"
+ }
+ ],
+ "/sqspstp-no-arguments/CheckBootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "CheckBootstrapVersion"
+ }
+ ]
+ },
+ "displayName": "sqspstp-no-arguments"
+ },
+ "Tree": {
+ "type": "cdk:tree",
+ "properties": {
+ "file": "tree.json"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-no-arguments.js.snapshot/sqspstp-no-arguments.assets.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-no-arguments.js.snapshot/sqspstp-no-arguments.assets.json
new file mode 100644
index 000000000..9e5153e92
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-no-arguments.js.snapshot/sqspstp-no-arguments.assets.json
@@ -0,0 +1,19 @@
+{
+ "version": "38.0.1",
+ "files": {
+ "20815c0b1c24ed41b6c31ad1fb21b7cc5502c5f051ec5a21657d78b5bfd7efbd": {
+ "source": {
+ "path": "sqspstp-no-arguments.template.json",
+ "packaging": "file"
+ },
+ "destinations": {
+ "current_account-current_region": {
+ "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
+ "objectKey": "20815c0b1c24ed41b6c31ad1fb21b7cc5502c5f051ec5a21657d78b5bfd7efbd.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/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-no-arguments.js.snapshot/sqspstp-no-arguments.template.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-no-arguments.js.snapshot/sqspstp-no-arguments.template.json
new file mode 100644
index 000000000..4d703dac8
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-no-arguments.js.snapshot/sqspstp-no-arguments.template.json
@@ -0,0 +1,654 @@
+{
+ "Resources": {
+ "lambdas3stptestServiceRoleF17BB6C7": {
+ "Type": "AWS::IAM::Role",
+ "Properties": {
+ "AssumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "lambda.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "ManagedPolicyArns": [
+ {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
+ ]
+ ]
+ }
+ ]
+ }
+ },
+ "lambdas3stptest9FBDC6CE": {
+ "Type": "AWS::Lambda::Function",
+ "Properties": {
+ "Code": {
+ "ZipFile": "exports.handler = async (event) => console.log(event)"
+ },
+ "Handler": "index.handler",
+ "Role": {
+ "Fn::GetAtt": [
+ "lambdas3stptestServiceRoleF17BB6C7",
+ "Arn"
+ ]
+ },
+ "Runtime": "nodejs20.x"
+ },
+ "DependsOn": [
+ "lambdas3stptestServiceRoleF17BB6C7"
+ ],
+ "Metadata": {
+ "cfn_nag": {
+ "rules_to_suppress": [
+ {
+ "id": "W58",
+ "reason": "This Lambda Function is created for integration testing purposes only and is not part of an actual construct"
+ },
+ {
+ "id": "W89",
+ "reason": "This Lambda Function is created for integration testing purposes only and is not part of an actual construct"
+ },
+ {
+ "id": "W92",
+ "reason": "This Lambda Function is created for integration testing purposes only and is not part of an actual construct"
+ }
+ ]
+ }
+ }
+ },
+ "testsqspipesstatesconstructqueuedlq420A82FD": {
+ "Type": "AWS::SQS::Queue",
+ "Properties": {
+ "KmsMasterKeyId": "alias/aws/sqs"
+ },
+ "UpdateReplacePolicy": "Delete",
+ "DeletionPolicy": "Delete"
+ },
+ "testsqspipesstatesconstructqueuedlqPolicyB1D70483": {
+ "Type": "AWS::SQS::QueuePolicy",
+ "Properties": {
+ "PolicyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "sqs:AddPermission",
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes",
+ "sqs:ReceiveMessage",
+ "sqs:RemovePermission",
+ "sqs:SendMessage",
+ "sqs:SetQueueAttributes"
+ ],
+ "Effect": "Allow",
+ "Principal": {
+ "AWS": {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::",
+ {
+ "Ref": "AWS::AccountId"
+ },
+ ":root"
+ ]
+ ]
+ }
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueuedlq420A82FD",
+ "Arn"
+ ]
+ },
+ "Sid": "QueueOwnerOnlyAccess"
+ },
+ {
+ "Action": "SQS:*",
+ "Condition": {
+ "Bool": {
+ "aws:SecureTransport": "false"
+ }
+ },
+ "Effect": "Deny",
+ "Principal": {
+ "AWS": "*"
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueuedlq420A82FD",
+ "Arn"
+ ]
+ },
+ "Sid": "HttpsOnly"
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "Queues": [
+ {
+ "Ref": "testsqspipesstatesconstructqueuedlq420A82FD"
+ }
+ ]
+ }
+ },
+ "testsqspipesstatesconstructqueueA7C76715": {
+ "Type": "AWS::SQS::Queue",
+ "Properties": {
+ "KmsMasterKeyId": "alias/aws/sqs",
+ "RedrivePolicy": {
+ "deadLetterTargetArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueuedlq420A82FD",
+ "Arn"
+ ]
+ },
+ "maxReceiveCount": 15
+ }
+ },
+ "UpdateReplacePolicy": "Delete",
+ "DeletionPolicy": "Delete"
+ },
+ "testsqspipesstatesconstructqueuePolicyFD32B562": {
+ "Type": "AWS::SQS::QueuePolicy",
+ "Properties": {
+ "PolicyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "sqs:AddPermission",
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes",
+ "sqs:ReceiveMessage",
+ "sqs:RemovePermission",
+ "sqs:SendMessage",
+ "sqs:SetQueueAttributes"
+ ],
+ "Effect": "Allow",
+ "Principal": {
+ "AWS": {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::",
+ {
+ "Ref": "AWS::AccountId"
+ },
+ ":root"
+ ]
+ ]
+ }
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ },
+ "Sid": "QueueOwnerOnlyAccess"
+ },
+ {
+ "Action": "SQS:*",
+ "Condition": {
+ "Bool": {
+ "aws:SecureTransport": "false"
+ }
+ },
+ "Effect": "Deny",
+ "Principal": {
+ "AWS": "*"
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ },
+ "Sid": "HttpsOnly"
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "Queues": [
+ {
+ "Ref": "testsqspipesstatesconstructqueueA7C76715"
+ }
+ ]
+ }
+ },
+ "testsqspipesstatesconstructStateMachineLogGroupADE94F1D": {
+ "Type": "AWS::Logs::LogGroup",
+ "Properties": {
+ "LogGroupName": {
+ "Fn::Join": [
+ "",
+ [
+ "/aws/vendedlogs/states/constructs/sqspstp-no-argumentstest-sqs-pipes-states-constructStateMachineLog-",
+ {
+ "Fn::Select": [
+ 2,
+ {
+ "Fn::Split": [
+ "/",
+ {
+ "Ref": "AWS::StackId"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ ]
+ }
+ },
+ "UpdateReplacePolicy": "Retain",
+ "DeletionPolicy": "Retain",
+ "Metadata": {
+ "cfn_nag": {
+ "rules_to_suppress": [
+ {
+ "id": "W86",
+ "reason": "Retention period for CloudWatchLogs LogGroups are set to 'Never Expire' to preserve customer data indefinitely"
+ },
+ {
+ "id": "W84",
+ "reason": "By default CloudWatchLogs LogGroups data is encrypted using the CloudWatch server-side encryption keys (AWS Managed Keys)"
+ }
+ ]
+ }
+ }
+ },
+ "testsqspipesstatesconstructStateMachineRoleBF97BFC0": {
+ "Type": "AWS::IAM::Role",
+ "Properties": {
+ "AssumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "states.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ }
+ }
+ },
+ "testsqspipesstatesconstructStateMachineRoleDefaultPolicyD1BA2BF2": {
+ "Type": "AWS::IAM::Policy",
+ "Properties": {
+ "PolicyDocument": {
+ "Statement": [
+ {
+ "Action": "lambda:InvokeFunction",
+ "Effect": "Allow",
+ "Resource": [
+ {
+ "Fn::GetAtt": [
+ "lambdas3stptest9FBDC6CE",
+ "Arn"
+ ]
+ },
+ {
+ "Fn::Join": [
+ "",
+ [
+ {
+ "Fn::GetAtt": [
+ "lambdas3stptest9FBDC6CE",
+ "Arn"
+ ]
+ },
+ ":*"
+ ]
+ ]
+ }
+ ]
+ },
+ {
+ "Action": [
+ "logs:CreateLogDelivery",
+ "logs:DeleteLogDelivery",
+ "logs:DescribeLogGroups",
+ "logs:DescribeResourcePolicies",
+ "logs:GetLogDelivery",
+ "logs:ListLogDeliveries",
+ "logs:PutResourcePolicy",
+ "logs:UpdateLogDelivery"
+ ],
+ "Effect": "Allow",
+ "Resource": "*"
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "PolicyName": "testsqspipesstatesconstructStateMachineRoleDefaultPolicyD1BA2BF2",
+ "Roles": [
+ {
+ "Ref": "testsqspipesstatesconstructStateMachineRoleBF97BFC0"
+ }
+ ]
+ },
+ "Metadata": {
+ "cfn_nag": {
+ "rules_to_suppress": [
+ {
+ "id": "W12",
+ "reason": "These are CDK defaults. The 'LogDelivery' actions do not support resource-level authorizations. Any logging is done by State Machine code"
+ }
+ ]
+ }
+ }
+ },
+ "testsqspipesstatesconstructStateMachine29272AA9": {
+ "Type": "AWS::StepFunctions::StateMachine",
+ "Properties": {
+ "DefinitionString": {
+ "Fn::Join": [
+ "",
+ [
+ "{\"StartAt\":\"tasks3stp-test\",\"States\":{\"tasks3stp-test\":{\"End\":true,\"Retry\":[{\"ErrorEquals\":[\"Lambda.ClientExecutionTimeoutException\",\"Lambda.ServiceException\",\"Lambda.AWSLambdaException\",\"Lambda.SdkClientException\"],\"IntervalSeconds\":2,\"MaxAttempts\":6,\"BackoffRate\":2}],\"Type\":\"Task\",\"Resource\":\"arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":states:::lambda:invoke\",\"Parameters\":{\"FunctionName\":\"",
+ {
+ "Fn::GetAtt": [
+ "lambdas3stptest9FBDC6CE",
+ "Arn"
+ ]
+ },
+ "\",\"Payload.$\":\"$\"}}}}"
+ ]
+ ]
+ },
+ "LoggingConfiguration": {
+ "Destinations": [
+ {
+ "CloudWatchLogsLogGroup": {
+ "LogGroupArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructStateMachineLogGroupADE94F1D",
+ "Arn"
+ ]
+ }
+ }
+ }
+ ],
+ "Level": "ERROR"
+ },
+ "RoleArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructStateMachineRoleBF97BFC0",
+ "Arn"
+ ]
+ }
+ },
+ "DependsOn": [
+ "testsqspipesstatesconstructStateMachineRoleDefaultPolicyD1BA2BF2",
+ "testsqspipesstatesconstructStateMachineRoleBF97BFC0"
+ ],
+ "UpdateReplacePolicy": "Delete",
+ "DeletionPolicy": "Delete"
+ },
+ "testsqspipesstatesconstructExecutionFailedAlarm1002FF55": {
+ "Type": "AWS::CloudWatch::Alarm",
+ "Properties": {
+ "AlarmDescription": "Alarm for the number of executions that failed exceeded the threshold of 1. ",
+ "ComparisonOperator": "GreaterThanOrEqualToThreshold",
+ "Dimensions": [
+ {
+ "Name": "StateMachineArn",
+ "Value": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "EvaluationPeriods": 1,
+ "MetricName": "ExecutionsFailed",
+ "Namespace": "AWS/States",
+ "Period": 300,
+ "Statistic": "Sum",
+ "Threshold": 1
+ }
+ },
+ "testsqspipesstatesconstructExecutionThrottledAlarm0242B01A": {
+ "Type": "AWS::CloudWatch::Alarm",
+ "Properties": {
+ "AlarmDescription": "Alarm for the number of executions that throttled exceeded the threshold of 1. ",
+ "ComparisonOperator": "GreaterThanOrEqualToThreshold",
+ "Dimensions": [
+ {
+ "Name": "StateMachineArn",
+ "Value": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "EvaluationPeriods": 1,
+ "MetricName": "ExecutionThrottled",
+ "Namespace": "AWS/States",
+ "Period": 300,
+ "Statistic": "Sum",
+ "Threshold": 1
+ }
+ },
+ "testsqspipesstatesconstructExecutionAbortedAlarm14349A7B": {
+ "Type": "AWS::CloudWatch::Alarm",
+ "Properties": {
+ "AlarmDescription": "Alarm for the number of executions that aborted exceeded the threshold of 1. ",
+ "ComparisonOperator": "GreaterThanOrEqualToThreshold",
+ "Dimensions": [
+ {
+ "Name": "StateMachineArn",
+ "Value": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "EvaluationPeriods": 1,
+ "MetricName": "ExecutionsAborted",
+ "Namespace": "AWS/States",
+ "Period": 300,
+ "Statistic": "Maximum",
+ "Threshold": 1
+ }
+ },
+ "testsqspipesstatesconstructPipeRoletestsqspipesstatesconstruct2CC9A13C": {
+ "Type": "AWS::IAM::Role",
+ "Properties": {
+ "AssumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "pipes.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "Policies": [
+ {
+ "PolicyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes",
+ "sqs:ReceiveMessage"
+ ],
+ "Effect": "Allow",
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "PolicyName": "sourcePolicy"
+ },
+ {
+ "PolicyDocument": {
+ "Statement": [
+ {
+ "Action": "states:StartExecution",
+ "Effect": "Allow",
+ "Resource": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "PolicyName": "targetPolicy"
+ }
+ ]
+ },
+ "Metadata": {
+ "guard": {
+ "SuppressedRules": [
+ "IAM_NO_INLINE_POLICY_CHECK"
+ ]
+ }
+ }
+ },
+ "testsqspipesstatesconstructLogGrouptestsqspipesstatesconstructF827FE15": {
+ "Type": "AWS::Logs::LogGroup",
+ "Properties": {
+ "LogGroupName": {
+ "Fn::Join": [
+ "",
+ [
+ "/aws/vendedlogs/pipes/constructs/sqspstp-no-argumentstest-sqs-pipes-states-constructPipesLog-",
+ {
+ "Fn::Select": [
+ 2,
+ {
+ "Fn::Split": [
+ "/",
+ {
+ "Ref": "AWS::StackId"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ ]
+ }
+ },
+ "UpdateReplacePolicy": "Retain",
+ "DeletionPolicy": "Retain",
+ "Metadata": {
+ "cfn_nag": {
+ "rules_to_suppress": [
+ {
+ "id": "W86",
+ "reason": "Retention period for CloudWatchLogs LogGroups are set to 'Never Expire' to preserve customer data indefinitely"
+ },
+ {
+ "id": "W84",
+ "reason": "By default CloudWatchLogs LogGroups data is encrypted using the CloudWatch server-side encryption keys (AWS Managed Keys)"
+ }
+ ]
+ }
+ }
+ },
+ "testsqspipesstatesconstructpipetestsqspipesstatesconstruct71A64A15": {
+ "Type": "AWS::Pipes::Pipe",
+ "Properties": {
+ "LogConfiguration": {
+ "CloudwatchLogsLogDestination": {
+ "LogGroupArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructLogGrouptestsqspipesstatesconstructF827FE15",
+ "Arn"
+ ]
+ }
+ },
+ "Level": "INFO"
+ },
+ "RoleArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructPipeRoletestsqspipesstatesconstruct2CC9A13C",
+ "Arn"
+ ]
+ },
+ "Source": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ },
+ "SourceParameters": {},
+ "Target": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ },
+ "TargetParameters": {
+ "StepFunctionStateMachineParameters": {
+ "InvocationType": "FIRE_AND_FORGET"
+ }
+ }
+ }
+ }
+ },
+ "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/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-no-arguments.js.snapshot/sqspstpnoargumentsIntegDefaultTestDeployAssert83953622.assets.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-no-arguments.js.snapshot/sqspstpnoargumentsIntegDefaultTestDeployAssert83953622.assets.json
new file mode 100644
index 000000000..8d519bfdb
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-no-arguments.js.snapshot/sqspstpnoargumentsIntegDefaultTestDeployAssert83953622.assets.json
@@ -0,0 +1,19 @@
+{
+ "version": "38.0.1",
+ "files": {
+ "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": {
+ "source": {
+ "path": "sqspstpnoargumentsIntegDefaultTestDeployAssert83953622.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/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-no-arguments.js.snapshot/sqspstpnoargumentsIntegDefaultTestDeployAssert83953622.template.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-no-arguments.js.snapshot/sqspstpnoargumentsIntegDefaultTestDeployAssert83953622.template.json
new file mode 100644
index 000000000..ad9d0fb73
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-no-arguments.js.snapshot/sqspstpnoargumentsIntegDefaultTestDeployAssert83953622.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/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-no-arguments.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-no-arguments.js.snapshot/tree.json
new file mode 100644
index 000000000..b638a39cd
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-no-arguments.js.snapshot/tree.json
@@ -0,0 +1,957 @@
+{
+ "version": "tree-0.1",
+ "tree": {
+ "id": "App",
+ "path": "",
+ "children": {
+ "sqspstp-no-arguments": {
+ "id": "sqspstp-no-arguments",
+ "path": "sqspstp-no-arguments",
+ "children": {
+ "lambdas3stp-test": {
+ "id": "lambdas3stp-test",
+ "path": "sqspstp-no-arguments/lambdas3stp-test",
+ "children": {
+ "ServiceRole": {
+ "id": "ServiceRole",
+ "path": "sqspstp-no-arguments/lambdas3stp-test/ServiceRole",
+ "children": {
+ "ImportServiceRole": {
+ "id": "ImportServiceRole",
+ "path": "sqspstp-no-arguments/lambdas3stp-test/ServiceRole/ImportServiceRole",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.Resource",
+ "version": "2.161.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-no-arguments/lambdas3stp-test/ServiceRole/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::IAM::Role",
+ "aws:cdk:cloudformation:props": {
+ "assumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "lambda.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "managedPolicyArns": [
+ {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
+ ]
+ ]
+ }
+ ]
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.CfnRole",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.Role",
+ "version": "2.161.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-no-arguments/lambdas3stp-test/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::Lambda::Function",
+ "aws:cdk:cloudformation:props": {
+ "code": {
+ "zipFile": "exports.handler = async (event) => console.log(event)"
+ },
+ "handler": "index.handler",
+ "role": {
+ "Fn::GetAtt": [
+ "lambdas3stptestServiceRoleF17BB6C7",
+ "Arn"
+ ]
+ },
+ "runtime": "nodejs20.x"
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_lambda.CfnFunction",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_lambda.Function",
+ "version": "2.161.0"
+ }
+ },
+ "tasks3stp-test": {
+ "id": "tasks3stp-test",
+ "path": "sqspstp-no-arguments/tasks3stp-test",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_stepfunctions_tasks.LambdaInvoke",
+ "version": "2.161.0"
+ }
+ },
+ "test-sqs-pipes-states-construct": {
+ "id": "test-sqs-pipes-states-construct",
+ "path": "sqspstp-no-arguments/test-sqs-pipes-states-construct",
+ "children": {
+ "queue-dlq": {
+ "id": "queue-dlq",
+ "path": "sqspstp-no-arguments/test-sqs-pipes-states-construct/queue-dlq",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-no-arguments/test-sqs-pipes-states-construct/queue-dlq/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::SQS::Queue",
+ "aws:cdk:cloudformation:props": {
+ "kmsMasterKeyId": "alias/aws/sqs"
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.CfnQueue",
+ "version": "2.161.0"
+ }
+ },
+ "Policy": {
+ "id": "Policy",
+ "path": "sqspstp-no-arguments/test-sqs-pipes-states-construct/queue-dlq/Policy",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-no-arguments/test-sqs-pipes-states-construct/queue-dlq/Policy/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::SQS::QueuePolicy",
+ "aws:cdk:cloudformation:props": {
+ "policyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "sqs:AddPermission",
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes",
+ "sqs:ReceiveMessage",
+ "sqs:RemovePermission",
+ "sqs:SendMessage",
+ "sqs:SetQueueAttributes"
+ ],
+ "Effect": "Allow",
+ "Principal": {
+ "AWS": {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::",
+ {
+ "Ref": "AWS::AccountId"
+ },
+ ":root"
+ ]
+ ]
+ }
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueuedlq420A82FD",
+ "Arn"
+ ]
+ },
+ "Sid": "QueueOwnerOnlyAccess"
+ },
+ {
+ "Action": "SQS:*",
+ "Condition": {
+ "Bool": {
+ "aws:SecureTransport": "false"
+ }
+ },
+ "Effect": "Deny",
+ "Principal": {
+ "AWS": "*"
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueuedlq420A82FD",
+ "Arn"
+ ]
+ },
+ "Sid": "HttpsOnly"
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "queues": [
+ {
+ "Ref": "testsqspipesstatesconstructqueuedlq420A82FD"
+ }
+ ]
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.Queue",
+ "version": "2.161.0"
+ }
+ },
+ "queue": {
+ "id": "queue",
+ "path": "sqspstp-no-arguments/test-sqs-pipes-states-construct/queue",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-no-arguments/test-sqs-pipes-states-construct/queue/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::SQS::Queue",
+ "aws:cdk:cloudformation:props": {
+ "kmsMasterKeyId": "alias/aws/sqs",
+ "redrivePolicy": {
+ "deadLetterTargetArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueuedlq420A82FD",
+ "Arn"
+ ]
+ },
+ "maxReceiveCount": 15
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.CfnQueue",
+ "version": "2.161.0"
+ }
+ },
+ "Policy": {
+ "id": "Policy",
+ "path": "sqspstp-no-arguments/test-sqs-pipes-states-construct/queue/Policy",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-no-arguments/test-sqs-pipes-states-construct/queue/Policy/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::SQS::QueuePolicy",
+ "aws:cdk:cloudformation:props": {
+ "policyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "sqs:AddPermission",
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes",
+ "sqs:ReceiveMessage",
+ "sqs:RemovePermission",
+ "sqs:SendMessage",
+ "sqs:SetQueueAttributes"
+ ],
+ "Effect": "Allow",
+ "Principal": {
+ "AWS": {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::",
+ {
+ "Ref": "AWS::AccountId"
+ },
+ ":root"
+ ]
+ ]
+ }
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ },
+ "Sid": "QueueOwnerOnlyAccess"
+ },
+ {
+ "Action": "SQS:*",
+ "Condition": {
+ "Bool": {
+ "aws:SecureTransport": "false"
+ }
+ },
+ "Effect": "Deny",
+ "Principal": {
+ "AWS": "*"
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ },
+ "Sid": "HttpsOnly"
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "queues": [
+ {
+ "Ref": "testsqspipesstatesconstructqueueA7C76715"
+ }
+ ]
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.Queue",
+ "version": "2.161.0"
+ }
+ },
+ "StateMachineLogGroup": {
+ "id": "StateMachineLogGroup",
+ "path": "sqspstp-no-arguments/test-sqs-pipes-states-construct/StateMachineLogGroup",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-no-arguments/test-sqs-pipes-states-construct/StateMachineLogGroup/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::Logs::LogGroup",
+ "aws:cdk:cloudformation:props": {
+ "logGroupName": {
+ "Fn::Join": [
+ "",
+ [
+ "/aws/vendedlogs/states/constructs/sqspstp-no-argumentstest-sqs-pipes-states-constructStateMachineLog-",
+ {
+ "Fn::Select": [
+ 2,
+ {
+ "Fn::Split": [
+ "/",
+ {
+ "Ref": "AWS::StackId"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ ]
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_logs.LogGroup",
+ "version": "2.161.0"
+ }
+ },
+ "StateMachine": {
+ "id": "StateMachine",
+ "path": "sqspstp-no-arguments/test-sqs-pipes-states-construct/StateMachine",
+ "children": {
+ "Role": {
+ "id": "Role",
+ "path": "sqspstp-no-arguments/test-sqs-pipes-states-construct/StateMachine/Role",
+ "children": {
+ "ImportRole": {
+ "id": "ImportRole",
+ "path": "sqspstp-no-arguments/test-sqs-pipes-states-construct/StateMachine/Role/ImportRole",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.Resource",
+ "version": "2.161.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-no-arguments/test-sqs-pipes-states-construct/StateMachine/Role/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::IAM::Role",
+ "aws:cdk:cloudformation:props": {
+ "assumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "states.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.CfnRole",
+ "version": "2.161.0"
+ }
+ },
+ "DefaultPolicy": {
+ "id": "DefaultPolicy",
+ "path": "sqspstp-no-arguments/test-sqs-pipes-states-construct/StateMachine/Role/DefaultPolicy",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-no-arguments/test-sqs-pipes-states-construct/StateMachine/Role/DefaultPolicy/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::IAM::Policy",
+ "aws:cdk:cloudformation:props": {
+ "policyDocument": {
+ "Statement": [
+ {
+ "Action": "lambda:InvokeFunction",
+ "Effect": "Allow",
+ "Resource": [
+ {
+ "Fn::GetAtt": [
+ "lambdas3stptest9FBDC6CE",
+ "Arn"
+ ]
+ },
+ {
+ "Fn::Join": [
+ "",
+ [
+ {
+ "Fn::GetAtt": [
+ "lambdas3stptest9FBDC6CE",
+ "Arn"
+ ]
+ },
+ ":*"
+ ]
+ ]
+ }
+ ]
+ },
+ {
+ "Action": [
+ "logs:CreateLogDelivery",
+ "logs:DeleteLogDelivery",
+ "logs:DescribeLogGroups",
+ "logs:DescribeResourcePolicies",
+ "logs:GetLogDelivery",
+ "logs:ListLogDeliveries",
+ "logs:PutResourcePolicy",
+ "logs:UpdateLogDelivery"
+ ],
+ "Effect": "Allow",
+ "Resource": "*"
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "policyName": "testsqspipesstatesconstructStateMachineRoleDefaultPolicyD1BA2BF2",
+ "roles": [
+ {
+ "Ref": "testsqspipesstatesconstructStateMachineRoleBF97BFC0"
+ }
+ ]
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.CfnPolicy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.Policy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.Role",
+ "version": "2.161.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-no-arguments/test-sqs-pipes-states-construct/StateMachine/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::StepFunctions::StateMachine",
+ "aws:cdk:cloudformation:props": {
+ "definitionString": {
+ "Fn::Join": [
+ "",
+ [
+ "{\"StartAt\":\"tasks3stp-test\",\"States\":{\"tasks3stp-test\":{\"End\":true,\"Retry\":[{\"ErrorEquals\":[\"Lambda.ClientExecutionTimeoutException\",\"Lambda.ServiceException\",\"Lambda.AWSLambdaException\",\"Lambda.SdkClientException\"],\"IntervalSeconds\":2,\"MaxAttempts\":6,\"BackoffRate\":2}],\"Type\":\"Task\",\"Resource\":\"arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":states:::lambda:invoke\",\"Parameters\":{\"FunctionName\":\"",
+ {
+ "Fn::GetAtt": [
+ "lambdas3stptest9FBDC6CE",
+ "Arn"
+ ]
+ },
+ "\",\"Payload.$\":\"$\"}}}}"
+ ]
+ ]
+ },
+ "loggingConfiguration": {
+ "destinations": [
+ {
+ "cloudWatchLogsLogGroup": {
+ "logGroupArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructStateMachineLogGroupADE94F1D",
+ "Arn"
+ ]
+ }
+ }
+ }
+ ],
+ "level": "ERROR"
+ },
+ "roleArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructStateMachineRoleBF97BFC0",
+ "Arn"
+ ]
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_stepfunctions.CfnStateMachine",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_stepfunctions.StateMachine",
+ "version": "2.161.0"
+ }
+ },
+ "ExecutionFailedAlarm": {
+ "id": "ExecutionFailedAlarm",
+ "path": "sqspstp-no-arguments/test-sqs-pipes-states-construct/ExecutionFailedAlarm",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-no-arguments/test-sqs-pipes-states-construct/ExecutionFailedAlarm/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::CloudWatch::Alarm",
+ "aws:cdk:cloudformation:props": {
+ "alarmDescription": "Alarm for the number of executions that failed exceeded the threshold of 1. ",
+ "comparisonOperator": "GreaterThanOrEqualToThreshold",
+ "dimensions": [
+ {
+ "name": "StateMachineArn",
+ "value": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "evaluationPeriods": 1,
+ "metricName": "ExecutionsFailed",
+ "namespace": "AWS/States",
+ "period": 300,
+ "statistic": "Sum",
+ "threshold": 1
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm",
+ "version": "2.161.0"
+ }
+ },
+ "ExecutionThrottledAlarm": {
+ "id": "ExecutionThrottledAlarm",
+ "path": "sqspstp-no-arguments/test-sqs-pipes-states-construct/ExecutionThrottledAlarm",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-no-arguments/test-sqs-pipes-states-construct/ExecutionThrottledAlarm/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::CloudWatch::Alarm",
+ "aws:cdk:cloudformation:props": {
+ "alarmDescription": "Alarm for the number of executions that throttled exceeded the threshold of 1. ",
+ "comparisonOperator": "GreaterThanOrEqualToThreshold",
+ "dimensions": [
+ {
+ "name": "StateMachineArn",
+ "value": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "evaluationPeriods": 1,
+ "metricName": "ExecutionThrottled",
+ "namespace": "AWS/States",
+ "period": 300,
+ "statistic": "Sum",
+ "threshold": 1
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm",
+ "version": "2.161.0"
+ }
+ },
+ "ExecutionAbortedAlarm": {
+ "id": "ExecutionAbortedAlarm",
+ "path": "sqspstp-no-arguments/test-sqs-pipes-states-construct/ExecutionAbortedAlarm",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-no-arguments/test-sqs-pipes-states-construct/ExecutionAbortedAlarm/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::CloudWatch::Alarm",
+ "aws:cdk:cloudformation:props": {
+ "alarmDescription": "Alarm for the number of executions that aborted exceeded the threshold of 1. ",
+ "comparisonOperator": "GreaterThanOrEqualToThreshold",
+ "dimensions": [
+ {
+ "name": "StateMachineArn",
+ "value": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "evaluationPeriods": 1,
+ "metricName": "ExecutionsAborted",
+ "namespace": "AWS/States",
+ "period": 300,
+ "statistic": "Maximum",
+ "threshold": 1
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm",
+ "version": "2.161.0"
+ }
+ },
+ "PipeRole--test-sqs-pipes-states-construct": {
+ "id": "PipeRole--test-sqs-pipes-states-construct",
+ "path": "sqspstp-no-arguments/test-sqs-pipes-states-construct/PipeRole--test-sqs-pipes-states-construct",
+ "children": {
+ "ImportPipeRole--test-sqs-pipes-states-construct": {
+ "id": "ImportPipeRole--test-sqs-pipes-states-construct",
+ "path": "sqspstp-no-arguments/test-sqs-pipes-states-construct/PipeRole--test-sqs-pipes-states-construct/ImportPipeRole--test-sqs-pipes-states-construct",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.Resource",
+ "version": "2.161.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-no-arguments/test-sqs-pipes-states-construct/PipeRole--test-sqs-pipes-states-construct/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::IAM::Role",
+ "aws:cdk:cloudformation:props": {
+ "assumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "pipes.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "policies": [
+ {
+ "policyName": "sourcePolicy",
+ "policyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes",
+ "sqs:ReceiveMessage"
+ ],
+ "Effect": "Allow",
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ }
+ },
+ {
+ "policyName": "targetPolicy",
+ "policyDocument": {
+ "Statement": [
+ {
+ "Action": "states:StartExecution",
+ "Effect": "Allow",
+ "Resource": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ }
+ }
+ ]
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.CfnRole",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.Role",
+ "version": "2.161.0"
+ }
+ },
+ "LogGroup-test-sqs-pipes-states-construct": {
+ "id": "LogGroup-test-sqs-pipes-states-construct",
+ "path": "sqspstp-no-arguments/test-sqs-pipes-states-construct/LogGroup-test-sqs-pipes-states-construct",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-no-arguments/test-sqs-pipes-states-construct/LogGroup-test-sqs-pipes-states-construct/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::Logs::LogGroup",
+ "aws:cdk:cloudformation:props": {
+ "logGroupName": {
+ "Fn::Join": [
+ "",
+ [
+ "/aws/vendedlogs/pipes/constructs/sqspstp-no-argumentstest-sqs-pipes-states-constructPipesLog-",
+ {
+ "Fn::Select": [
+ 2,
+ {
+ "Fn::Split": [
+ "/",
+ {
+ "Ref": "AWS::StackId"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ ]
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_logs.LogGroup",
+ "version": "2.161.0"
+ }
+ },
+ "pipe-test-sqs-pipes-states-construct": {
+ "id": "pipe-test-sqs-pipes-states-construct",
+ "path": "sqspstp-no-arguments/test-sqs-pipes-states-construct/pipe-test-sqs-pipes-states-construct",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::Pipes::Pipe",
+ "aws:cdk:cloudformation:props": {
+ "logConfiguration": {
+ "cloudwatchLogsLogDestination": {
+ "logGroupArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructLogGrouptestsqspipesstatesconstructF827FE15",
+ "Arn"
+ ]
+ }
+ },
+ "level": "INFO"
+ },
+ "roleArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructPipeRoletestsqspipesstatesconstruct2CC9A13C",
+ "Arn"
+ ]
+ },
+ "source": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ },
+ "sourceParameters": {},
+ "target": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ },
+ "targetParameters": {
+ "stepFunctionStateMachineParameters": {
+ "invocationType": "FIRE_AND_FORGET"
+ }
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_pipes.CfnPipe",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-solutions-constructs/aws-sqs-pipes-stepfunctions.SqsToPipesToStepfunctions",
+ "version": "2.72.0"
+ }
+ },
+ "Integ": {
+ "id": "Integ",
+ "path": "sqspstp-no-arguments/Integ",
+ "children": {
+ "DefaultTest": {
+ "id": "DefaultTest",
+ "path": "sqspstp-no-arguments/Integ/DefaultTest",
+ "children": {
+ "Default": {
+ "id": "Default",
+ "path": "sqspstp-no-arguments/Integ/DefaultTest/Default",
+ "constructInfo": {
+ "fqn": "constructs.Construct",
+ "version": "10.4.2"
+ }
+ },
+ "DeployAssert": {
+ "id": "DeployAssert",
+ "path": "sqspstp-no-arguments/Integ/DefaultTest/DeployAssert",
+ "children": {
+ "BootstrapVersion": {
+ "id": "BootstrapVersion",
+ "path": "sqspstp-no-arguments/Integ/DefaultTest/DeployAssert/BootstrapVersion",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.CfnParameter",
+ "version": "2.161.0"
+ }
+ },
+ "CheckBootstrapVersion": {
+ "id": "CheckBootstrapVersion",
+ "path": "sqspstp-no-arguments/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.CfnRule",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.Stack",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase",
+ "version": "2.161.0-alpha.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/integ-tests-alpha.IntegTest",
+ "version": "2.161.0-alpha.0"
+ }
+ },
+ "BootstrapVersion": {
+ "id": "BootstrapVersion",
+ "path": "sqspstp-no-arguments/BootstrapVersion",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.CfnParameter",
+ "version": "2.161.0"
+ }
+ },
+ "CheckBootstrapVersion": {
+ "id": "CheckBootstrapVersion",
+ "path": "sqspstp-no-arguments/CheckBootstrapVersion",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.CfnRule",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.Stack",
+ "version": "2.161.0"
+ }
+ },
+ "Tree": {
+ "id": "Tree",
+ "path": "Tree",
+ "constructInfo": {
+ "fqn": "constructs.Construct",
+ "version": "10.4.2"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.App",
+ "version": "2.161.0"
+ }
+ }
+}
\ No newline at end of file
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-no-arguments.ts b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-no-arguments.ts
new file mode 100644
index 000000000..21d1b660c
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-no-arguments.ts
@@ -0,0 +1,34 @@
+/**
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
+ * with the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES
+ * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+
+/// !cdk-integ *
+import { App, Stack } from "aws-cdk-lib";
+import { SqsToPipesToStepfunctions, SqsToPipesToStepfunctionsProps } from "../lib";
+import { generateIntegStackName } from '@aws-solutions-constructs/core';
+import { IntegTest } from '@aws-cdk/integ-tests-alpha';
+import * as defaults from '@aws-solutions-constructs/core';
+
+const app = new App();
+const stack = new Stack(app, generateIntegStackName(__filename));
+
+const props: SqsToPipesToStepfunctionsProps = {
+ stateMachineProps: {
+ definitionBody: defaults.CreateTestStateMachineDefinitionBody(stack, 's3stp-test')
+ },
+};
+
+new SqsToPipesToStepfunctions(stack, 'test-sqs-pipes-states-construct', props);
+
+new IntegTest(stack, 'Integ', { testCases: [
+ stack
+] });
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-set-queue-batch-size.js.snapshot/cdk.out b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-set-queue-batch-size.js.snapshot/cdk.out
new file mode 100644
index 000000000..c6e612584
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-set-queue-batch-size.js.snapshot/cdk.out
@@ -0,0 +1 @@
+{"version":"38.0.1"}
\ No newline at end of file
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-set-queue-batch-size.js.snapshot/integ.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-set-queue-batch-size.js.snapshot/integ.json
new file mode 100644
index 000000000..64301ae53
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-set-queue-batch-size.js.snapshot/integ.json
@@ -0,0 +1,12 @@
+{
+ "version": "38.0.1",
+ "testCases": {
+ "sqspstp-set-queue-batch-size/Integ/DefaultTest": {
+ "stacks": [
+ "sqspstp-set-queue-batch-size"
+ ],
+ "assertionStack": "sqspstp-set-queue-batch-size/Integ/DefaultTest/DeployAssert",
+ "assertionStackName": "sqspstpsetqueuebatchsizeIntegDefaultTestDeployAssertA1752E9D"
+ }
+ }
+}
\ No newline at end of file
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-set-queue-batch-size.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-set-queue-batch-size.js.snapshot/manifest.json
new file mode 100644
index 000000000..97818f9c7
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-set-queue-batch-size.js.snapshot/manifest.json
@@ -0,0 +1,205 @@
+{
+ "version": "38.0.1",
+ "artifacts": {
+ "sqspstpsetqueuebatchsizeIntegDefaultTestDeployAssertA1752E9D.assets": {
+ "type": "cdk:asset-manifest",
+ "properties": {
+ "file": "sqspstpsetqueuebatchsizeIntegDefaultTestDeployAssertA1752E9D.assets.json",
+ "requiresBootstrapStackVersion": 6,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
+ }
+ },
+ "sqspstpsetqueuebatchsizeIntegDefaultTestDeployAssertA1752E9D": {
+ "type": "aws:cloudformation:stack",
+ "environment": "aws://unknown-account/unknown-region",
+ "properties": {
+ "templateFile": "sqspstpsetqueuebatchsizeIntegDefaultTestDeployAssertA1752E9D.template.json",
+ "terminationProtection": false,
+ "validateOnSynth": false,
+ "notificationArns": [],
+ "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": [
+ "sqspstpsetqueuebatchsizeIntegDefaultTestDeployAssertA1752E9D.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": [
+ "sqspstpsetqueuebatchsizeIntegDefaultTestDeployAssertA1752E9D.assets"
+ ],
+ "metadata": {
+ "/sqspstp-set-queue-batch-size/Integ/DefaultTest/DeployAssert/BootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "BootstrapVersion"
+ }
+ ],
+ "/sqspstp-set-queue-batch-size/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "CheckBootstrapVersion"
+ }
+ ]
+ },
+ "displayName": "sqspstp-set-queue-batch-size/Integ/DefaultTest/DeployAssert"
+ },
+ "sqspstp-set-queue-batch-size.assets": {
+ "type": "cdk:asset-manifest",
+ "properties": {
+ "file": "sqspstp-set-queue-batch-size.assets.json",
+ "requiresBootstrapStackVersion": 6,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
+ }
+ },
+ "sqspstp-set-queue-batch-size": {
+ "type": "aws:cloudformation:stack",
+ "environment": "aws://unknown-account/unknown-region",
+ "properties": {
+ "templateFile": "sqspstp-set-queue-batch-size.template.json",
+ "terminationProtection": false,
+ "validateOnSynth": false,
+ "notificationArns": [],
+ "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}/b608de4251b772257f786d1776e1bb2dbb6566658681631d71e5741f2e95c986.json",
+ "requiresBootstrapStackVersion": 6,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
+ "additionalDependencies": [
+ "sqspstp-set-queue-batch-size.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": [
+ "sqspstp-set-queue-batch-size.assets"
+ ],
+ "metadata": {
+ "/sqspstp-set-queue-batch-size/lambdas3stp-test/ServiceRole/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "lambdas3stptestServiceRoleF17BB6C7"
+ }
+ ],
+ "/sqspstp-set-queue-batch-size/lambdas3stp-test/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "lambdas3stptest9FBDC6CE"
+ }
+ ],
+ "/sqspstp-set-queue-batch-size/test-sqs-pipes-states-construct/queue-dlq/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructqueuedlq420A82FD"
+ }
+ ],
+ "/sqspstp-set-queue-batch-size/test-sqs-pipes-states-construct/queue-dlq/Policy/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructqueuedlqPolicyB1D70483"
+ }
+ ],
+ "/sqspstp-set-queue-batch-size/test-sqs-pipes-states-construct/queue/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructqueueA7C76715"
+ }
+ ],
+ "/sqspstp-set-queue-batch-size/test-sqs-pipes-states-construct/queue/Policy/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructqueuePolicyFD32B562"
+ }
+ ],
+ "/sqspstp-set-queue-batch-size/test-sqs-pipes-states-construct/StateMachineLogGroup/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructStateMachineLogGroupADE94F1D"
+ }
+ ],
+ "/sqspstp-set-queue-batch-size/test-sqs-pipes-states-construct/StateMachine/Role/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructStateMachineRoleBF97BFC0"
+ }
+ ],
+ "/sqspstp-set-queue-batch-size/test-sqs-pipes-states-construct/StateMachine/Role/DefaultPolicy/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructStateMachineRoleDefaultPolicyD1BA2BF2"
+ }
+ ],
+ "/sqspstp-set-queue-batch-size/test-sqs-pipes-states-construct/StateMachine/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ ],
+ "/sqspstp-set-queue-batch-size/test-sqs-pipes-states-construct/ExecutionFailedAlarm/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructExecutionFailedAlarm1002FF55"
+ }
+ ],
+ "/sqspstp-set-queue-batch-size/test-sqs-pipes-states-construct/ExecutionThrottledAlarm/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructExecutionThrottledAlarm0242B01A"
+ }
+ ],
+ "/sqspstp-set-queue-batch-size/test-sqs-pipes-states-construct/ExecutionAbortedAlarm/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructExecutionAbortedAlarm14349A7B"
+ }
+ ],
+ "/sqspstp-set-queue-batch-size/test-sqs-pipes-states-construct/PipeRole--test-sqs-pipes-states-construct/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructPipeRoletestsqspipesstatesconstruct2CC9A13C"
+ }
+ ],
+ "/sqspstp-set-queue-batch-size/test-sqs-pipes-states-construct/LogGroup-test-sqs-pipes-states-construct/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructLogGrouptestsqspipesstatesconstructF827FE15"
+ }
+ ],
+ "/sqspstp-set-queue-batch-size/test-sqs-pipes-states-construct/pipe-test-sqs-pipes-states-construct": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructpipetestsqspipesstatesconstruct71A64A15"
+ }
+ ],
+ "/sqspstp-set-queue-batch-size/BootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "BootstrapVersion"
+ }
+ ],
+ "/sqspstp-set-queue-batch-size/CheckBootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "CheckBootstrapVersion"
+ }
+ ]
+ },
+ "displayName": "sqspstp-set-queue-batch-size"
+ },
+ "Tree": {
+ "type": "cdk:tree",
+ "properties": {
+ "file": "tree.json"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-set-queue-batch-size.js.snapshot/sqspstp-set-queue-batch-size.assets.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-set-queue-batch-size.js.snapshot/sqspstp-set-queue-batch-size.assets.json
new file mode 100644
index 000000000..8518f2211
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-set-queue-batch-size.js.snapshot/sqspstp-set-queue-batch-size.assets.json
@@ -0,0 +1,19 @@
+{
+ "version": "38.0.1",
+ "files": {
+ "b608de4251b772257f786d1776e1bb2dbb6566658681631d71e5741f2e95c986": {
+ "source": {
+ "path": "sqspstp-set-queue-batch-size.template.json",
+ "packaging": "file"
+ },
+ "destinations": {
+ "current_account-current_region": {
+ "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
+ "objectKey": "b608de4251b772257f786d1776e1bb2dbb6566658681631d71e5741f2e95c986.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/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-set-queue-batch-size.js.snapshot/sqspstp-set-queue-batch-size.template.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-set-queue-batch-size.js.snapshot/sqspstp-set-queue-batch-size.template.json
new file mode 100644
index 000000000..d3a6340f7
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-set-queue-batch-size.js.snapshot/sqspstp-set-queue-batch-size.template.json
@@ -0,0 +1,658 @@
+{
+ "Resources": {
+ "lambdas3stptestServiceRoleF17BB6C7": {
+ "Type": "AWS::IAM::Role",
+ "Properties": {
+ "AssumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "lambda.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "ManagedPolicyArns": [
+ {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
+ ]
+ ]
+ }
+ ]
+ }
+ },
+ "lambdas3stptest9FBDC6CE": {
+ "Type": "AWS::Lambda::Function",
+ "Properties": {
+ "Code": {
+ "ZipFile": "exports.handler = async (event) => console.log(event)"
+ },
+ "Handler": "index.handler",
+ "Role": {
+ "Fn::GetAtt": [
+ "lambdas3stptestServiceRoleF17BB6C7",
+ "Arn"
+ ]
+ },
+ "Runtime": "nodejs20.x"
+ },
+ "DependsOn": [
+ "lambdas3stptestServiceRoleF17BB6C7"
+ ],
+ "Metadata": {
+ "cfn_nag": {
+ "rules_to_suppress": [
+ {
+ "id": "W58",
+ "reason": "This Lambda Function is created for integration testing purposes only and is not part of an actual construct"
+ },
+ {
+ "id": "W89",
+ "reason": "This Lambda Function is created for integration testing purposes only and is not part of an actual construct"
+ },
+ {
+ "id": "W92",
+ "reason": "This Lambda Function is created for integration testing purposes only and is not part of an actual construct"
+ }
+ ]
+ }
+ }
+ },
+ "testsqspipesstatesconstructqueuedlq420A82FD": {
+ "Type": "AWS::SQS::Queue",
+ "Properties": {
+ "KmsMasterKeyId": "alias/aws/sqs"
+ },
+ "UpdateReplacePolicy": "Delete",
+ "DeletionPolicy": "Delete"
+ },
+ "testsqspipesstatesconstructqueuedlqPolicyB1D70483": {
+ "Type": "AWS::SQS::QueuePolicy",
+ "Properties": {
+ "PolicyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "sqs:AddPermission",
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes",
+ "sqs:ReceiveMessage",
+ "sqs:RemovePermission",
+ "sqs:SendMessage",
+ "sqs:SetQueueAttributes"
+ ],
+ "Effect": "Allow",
+ "Principal": {
+ "AWS": {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::",
+ {
+ "Ref": "AWS::AccountId"
+ },
+ ":root"
+ ]
+ ]
+ }
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueuedlq420A82FD",
+ "Arn"
+ ]
+ },
+ "Sid": "QueueOwnerOnlyAccess"
+ },
+ {
+ "Action": "SQS:*",
+ "Condition": {
+ "Bool": {
+ "aws:SecureTransport": "false"
+ }
+ },
+ "Effect": "Deny",
+ "Principal": {
+ "AWS": "*"
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueuedlq420A82FD",
+ "Arn"
+ ]
+ },
+ "Sid": "HttpsOnly"
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "Queues": [
+ {
+ "Ref": "testsqspipesstatesconstructqueuedlq420A82FD"
+ }
+ ]
+ }
+ },
+ "testsqspipesstatesconstructqueueA7C76715": {
+ "Type": "AWS::SQS::Queue",
+ "Properties": {
+ "KmsMasterKeyId": "alias/aws/sqs",
+ "RedrivePolicy": {
+ "deadLetterTargetArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueuedlq420A82FD",
+ "Arn"
+ ]
+ },
+ "maxReceiveCount": 15
+ }
+ },
+ "UpdateReplacePolicy": "Delete",
+ "DeletionPolicy": "Delete"
+ },
+ "testsqspipesstatesconstructqueuePolicyFD32B562": {
+ "Type": "AWS::SQS::QueuePolicy",
+ "Properties": {
+ "PolicyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "sqs:AddPermission",
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes",
+ "sqs:ReceiveMessage",
+ "sqs:RemovePermission",
+ "sqs:SendMessage",
+ "sqs:SetQueueAttributes"
+ ],
+ "Effect": "Allow",
+ "Principal": {
+ "AWS": {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::",
+ {
+ "Ref": "AWS::AccountId"
+ },
+ ":root"
+ ]
+ ]
+ }
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ },
+ "Sid": "QueueOwnerOnlyAccess"
+ },
+ {
+ "Action": "SQS:*",
+ "Condition": {
+ "Bool": {
+ "aws:SecureTransport": "false"
+ }
+ },
+ "Effect": "Deny",
+ "Principal": {
+ "AWS": "*"
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ },
+ "Sid": "HttpsOnly"
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "Queues": [
+ {
+ "Ref": "testsqspipesstatesconstructqueueA7C76715"
+ }
+ ]
+ }
+ },
+ "testsqspipesstatesconstructStateMachineLogGroupADE94F1D": {
+ "Type": "AWS::Logs::LogGroup",
+ "Properties": {
+ "LogGroupName": {
+ "Fn::Join": [
+ "",
+ [
+ "/aws/vendedlogs/states/constructs/sqspstp-set-queue-batch-sizetest-sqs-pipes-states-constructStateMachineLog-",
+ {
+ "Fn::Select": [
+ 2,
+ {
+ "Fn::Split": [
+ "/",
+ {
+ "Ref": "AWS::StackId"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ ]
+ }
+ },
+ "UpdateReplacePolicy": "Retain",
+ "DeletionPolicy": "Retain",
+ "Metadata": {
+ "cfn_nag": {
+ "rules_to_suppress": [
+ {
+ "id": "W86",
+ "reason": "Retention period for CloudWatchLogs LogGroups are set to 'Never Expire' to preserve customer data indefinitely"
+ },
+ {
+ "id": "W84",
+ "reason": "By default CloudWatchLogs LogGroups data is encrypted using the CloudWatch server-side encryption keys (AWS Managed Keys)"
+ }
+ ]
+ }
+ }
+ },
+ "testsqspipesstatesconstructStateMachineRoleBF97BFC0": {
+ "Type": "AWS::IAM::Role",
+ "Properties": {
+ "AssumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "states.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ }
+ }
+ },
+ "testsqspipesstatesconstructStateMachineRoleDefaultPolicyD1BA2BF2": {
+ "Type": "AWS::IAM::Policy",
+ "Properties": {
+ "PolicyDocument": {
+ "Statement": [
+ {
+ "Action": "lambda:InvokeFunction",
+ "Effect": "Allow",
+ "Resource": [
+ {
+ "Fn::GetAtt": [
+ "lambdas3stptest9FBDC6CE",
+ "Arn"
+ ]
+ },
+ {
+ "Fn::Join": [
+ "",
+ [
+ {
+ "Fn::GetAtt": [
+ "lambdas3stptest9FBDC6CE",
+ "Arn"
+ ]
+ },
+ ":*"
+ ]
+ ]
+ }
+ ]
+ },
+ {
+ "Action": [
+ "logs:CreateLogDelivery",
+ "logs:DeleteLogDelivery",
+ "logs:DescribeLogGroups",
+ "logs:DescribeResourcePolicies",
+ "logs:GetLogDelivery",
+ "logs:ListLogDeliveries",
+ "logs:PutResourcePolicy",
+ "logs:UpdateLogDelivery"
+ ],
+ "Effect": "Allow",
+ "Resource": "*"
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "PolicyName": "testsqspipesstatesconstructStateMachineRoleDefaultPolicyD1BA2BF2",
+ "Roles": [
+ {
+ "Ref": "testsqspipesstatesconstructStateMachineRoleBF97BFC0"
+ }
+ ]
+ },
+ "Metadata": {
+ "cfn_nag": {
+ "rules_to_suppress": [
+ {
+ "id": "W12",
+ "reason": "These are CDK defaults. The 'LogDelivery' actions do not support resource-level authorizations. Any logging is done by State Machine code"
+ }
+ ]
+ }
+ }
+ },
+ "testsqspipesstatesconstructStateMachine29272AA9": {
+ "Type": "AWS::StepFunctions::StateMachine",
+ "Properties": {
+ "DefinitionString": {
+ "Fn::Join": [
+ "",
+ [
+ "{\"StartAt\":\"tasks3stp-test\",\"States\":{\"tasks3stp-test\":{\"End\":true,\"Retry\":[{\"ErrorEquals\":[\"Lambda.ClientExecutionTimeoutException\",\"Lambda.ServiceException\",\"Lambda.AWSLambdaException\",\"Lambda.SdkClientException\"],\"IntervalSeconds\":2,\"MaxAttempts\":6,\"BackoffRate\":2}],\"Type\":\"Task\",\"Resource\":\"arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":states:::lambda:invoke\",\"Parameters\":{\"FunctionName\":\"",
+ {
+ "Fn::GetAtt": [
+ "lambdas3stptest9FBDC6CE",
+ "Arn"
+ ]
+ },
+ "\",\"Payload.$\":\"$\"}}}}"
+ ]
+ ]
+ },
+ "LoggingConfiguration": {
+ "Destinations": [
+ {
+ "CloudWatchLogsLogGroup": {
+ "LogGroupArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructStateMachineLogGroupADE94F1D",
+ "Arn"
+ ]
+ }
+ }
+ }
+ ],
+ "Level": "ERROR"
+ },
+ "RoleArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructStateMachineRoleBF97BFC0",
+ "Arn"
+ ]
+ }
+ },
+ "DependsOn": [
+ "testsqspipesstatesconstructStateMachineRoleDefaultPolicyD1BA2BF2",
+ "testsqspipesstatesconstructStateMachineRoleBF97BFC0"
+ ],
+ "UpdateReplacePolicy": "Delete",
+ "DeletionPolicy": "Delete"
+ },
+ "testsqspipesstatesconstructExecutionFailedAlarm1002FF55": {
+ "Type": "AWS::CloudWatch::Alarm",
+ "Properties": {
+ "AlarmDescription": "Alarm for the number of executions that failed exceeded the threshold of 1. ",
+ "ComparisonOperator": "GreaterThanOrEqualToThreshold",
+ "Dimensions": [
+ {
+ "Name": "StateMachineArn",
+ "Value": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "EvaluationPeriods": 1,
+ "MetricName": "ExecutionsFailed",
+ "Namespace": "AWS/States",
+ "Period": 300,
+ "Statistic": "Sum",
+ "Threshold": 1
+ }
+ },
+ "testsqspipesstatesconstructExecutionThrottledAlarm0242B01A": {
+ "Type": "AWS::CloudWatch::Alarm",
+ "Properties": {
+ "AlarmDescription": "Alarm for the number of executions that throttled exceeded the threshold of 1. ",
+ "ComparisonOperator": "GreaterThanOrEqualToThreshold",
+ "Dimensions": [
+ {
+ "Name": "StateMachineArn",
+ "Value": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "EvaluationPeriods": 1,
+ "MetricName": "ExecutionThrottled",
+ "Namespace": "AWS/States",
+ "Period": 300,
+ "Statistic": "Sum",
+ "Threshold": 1
+ }
+ },
+ "testsqspipesstatesconstructExecutionAbortedAlarm14349A7B": {
+ "Type": "AWS::CloudWatch::Alarm",
+ "Properties": {
+ "AlarmDescription": "Alarm for the number of executions that aborted exceeded the threshold of 1. ",
+ "ComparisonOperator": "GreaterThanOrEqualToThreshold",
+ "Dimensions": [
+ {
+ "Name": "StateMachineArn",
+ "Value": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "EvaluationPeriods": 1,
+ "MetricName": "ExecutionsAborted",
+ "Namespace": "AWS/States",
+ "Period": 300,
+ "Statistic": "Maximum",
+ "Threshold": 1
+ }
+ },
+ "testsqspipesstatesconstructPipeRoletestsqspipesstatesconstruct2CC9A13C": {
+ "Type": "AWS::IAM::Role",
+ "Properties": {
+ "AssumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "pipes.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "Policies": [
+ {
+ "PolicyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes",
+ "sqs:ReceiveMessage"
+ ],
+ "Effect": "Allow",
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "PolicyName": "sourcePolicy"
+ },
+ {
+ "PolicyDocument": {
+ "Statement": [
+ {
+ "Action": "states:StartExecution",
+ "Effect": "Allow",
+ "Resource": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "PolicyName": "targetPolicy"
+ }
+ ]
+ },
+ "Metadata": {
+ "guard": {
+ "SuppressedRules": [
+ "IAM_NO_INLINE_POLICY_CHECK"
+ ]
+ }
+ }
+ },
+ "testsqspipesstatesconstructLogGrouptestsqspipesstatesconstructF827FE15": {
+ "Type": "AWS::Logs::LogGroup",
+ "Properties": {
+ "LogGroupName": {
+ "Fn::Join": [
+ "",
+ [
+ "/aws/vendedlogs/pipes/constructs/sqspstp-set-queue-batch-sizetest-sqs-pipes-states-constructPipesLog-",
+ {
+ "Fn::Select": [
+ 2,
+ {
+ "Fn::Split": [
+ "/",
+ {
+ "Ref": "AWS::StackId"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ ]
+ }
+ },
+ "UpdateReplacePolicy": "Retain",
+ "DeletionPolicy": "Retain",
+ "Metadata": {
+ "cfn_nag": {
+ "rules_to_suppress": [
+ {
+ "id": "W86",
+ "reason": "Retention period for CloudWatchLogs LogGroups are set to 'Never Expire' to preserve customer data indefinitely"
+ },
+ {
+ "id": "W84",
+ "reason": "By default CloudWatchLogs LogGroups data is encrypted using the CloudWatch server-side encryption keys (AWS Managed Keys)"
+ }
+ ]
+ }
+ }
+ },
+ "testsqspipesstatesconstructpipetestsqspipesstatesconstruct71A64A15": {
+ "Type": "AWS::Pipes::Pipe",
+ "Properties": {
+ "LogConfiguration": {
+ "CloudwatchLogsLogDestination": {
+ "LogGroupArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructLogGrouptestsqspipesstatesconstructF827FE15",
+ "Arn"
+ ]
+ }
+ },
+ "Level": "INFO"
+ },
+ "RoleArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructPipeRoletestsqspipesstatesconstruct2CC9A13C",
+ "Arn"
+ ]
+ },
+ "Source": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ },
+ "SourceParameters": {
+ "SqsQueueParameters": {
+ "BatchSize": 3
+ }
+ },
+ "Target": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ },
+ "TargetParameters": {
+ "StepFunctionStateMachineParameters": {
+ "InvocationType": "FIRE_AND_FORGET"
+ }
+ }
+ }
+ }
+ },
+ "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/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-set-queue-batch-size.js.snapshot/sqspstpsetqueuebatchsizeIntegDefaultTestDeployAssertA1752E9D.assets.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-set-queue-batch-size.js.snapshot/sqspstpsetqueuebatchsizeIntegDefaultTestDeployAssertA1752E9D.assets.json
new file mode 100644
index 000000000..2323278a0
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-set-queue-batch-size.js.snapshot/sqspstpsetqueuebatchsizeIntegDefaultTestDeployAssertA1752E9D.assets.json
@@ -0,0 +1,19 @@
+{
+ "version": "38.0.1",
+ "files": {
+ "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": {
+ "source": {
+ "path": "sqspstpsetqueuebatchsizeIntegDefaultTestDeployAssertA1752E9D.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/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-set-queue-batch-size.js.snapshot/sqspstpsetqueuebatchsizeIntegDefaultTestDeployAssertA1752E9D.template.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-set-queue-batch-size.js.snapshot/sqspstpsetqueuebatchsizeIntegDefaultTestDeployAssertA1752E9D.template.json
new file mode 100644
index 000000000..ad9d0fb73
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-set-queue-batch-size.js.snapshot/sqspstpsetqueuebatchsizeIntegDefaultTestDeployAssertA1752E9D.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/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-set-queue-batch-size.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-set-queue-batch-size.js.snapshot/tree.json
new file mode 100644
index 000000000..a51ff4640
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-set-queue-batch-size.js.snapshot/tree.json
@@ -0,0 +1,961 @@
+{
+ "version": "tree-0.1",
+ "tree": {
+ "id": "App",
+ "path": "",
+ "children": {
+ "sqspstp-set-queue-batch-size": {
+ "id": "sqspstp-set-queue-batch-size",
+ "path": "sqspstp-set-queue-batch-size",
+ "children": {
+ "lambdas3stp-test": {
+ "id": "lambdas3stp-test",
+ "path": "sqspstp-set-queue-batch-size/lambdas3stp-test",
+ "children": {
+ "ServiceRole": {
+ "id": "ServiceRole",
+ "path": "sqspstp-set-queue-batch-size/lambdas3stp-test/ServiceRole",
+ "children": {
+ "ImportServiceRole": {
+ "id": "ImportServiceRole",
+ "path": "sqspstp-set-queue-batch-size/lambdas3stp-test/ServiceRole/ImportServiceRole",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.Resource",
+ "version": "2.161.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-set-queue-batch-size/lambdas3stp-test/ServiceRole/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::IAM::Role",
+ "aws:cdk:cloudformation:props": {
+ "assumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "lambda.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "managedPolicyArns": [
+ {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
+ ]
+ ]
+ }
+ ]
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.CfnRole",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.Role",
+ "version": "2.161.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-set-queue-batch-size/lambdas3stp-test/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::Lambda::Function",
+ "aws:cdk:cloudformation:props": {
+ "code": {
+ "zipFile": "exports.handler = async (event) => console.log(event)"
+ },
+ "handler": "index.handler",
+ "role": {
+ "Fn::GetAtt": [
+ "lambdas3stptestServiceRoleF17BB6C7",
+ "Arn"
+ ]
+ },
+ "runtime": "nodejs20.x"
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_lambda.CfnFunction",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_lambda.Function",
+ "version": "2.161.0"
+ }
+ },
+ "tasks3stp-test": {
+ "id": "tasks3stp-test",
+ "path": "sqspstp-set-queue-batch-size/tasks3stp-test",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_stepfunctions_tasks.LambdaInvoke",
+ "version": "2.161.0"
+ }
+ },
+ "test-sqs-pipes-states-construct": {
+ "id": "test-sqs-pipes-states-construct",
+ "path": "sqspstp-set-queue-batch-size/test-sqs-pipes-states-construct",
+ "children": {
+ "queue-dlq": {
+ "id": "queue-dlq",
+ "path": "sqspstp-set-queue-batch-size/test-sqs-pipes-states-construct/queue-dlq",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-set-queue-batch-size/test-sqs-pipes-states-construct/queue-dlq/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::SQS::Queue",
+ "aws:cdk:cloudformation:props": {
+ "kmsMasterKeyId": "alias/aws/sqs"
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.CfnQueue",
+ "version": "2.161.0"
+ }
+ },
+ "Policy": {
+ "id": "Policy",
+ "path": "sqspstp-set-queue-batch-size/test-sqs-pipes-states-construct/queue-dlq/Policy",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-set-queue-batch-size/test-sqs-pipes-states-construct/queue-dlq/Policy/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::SQS::QueuePolicy",
+ "aws:cdk:cloudformation:props": {
+ "policyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "sqs:AddPermission",
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes",
+ "sqs:ReceiveMessage",
+ "sqs:RemovePermission",
+ "sqs:SendMessage",
+ "sqs:SetQueueAttributes"
+ ],
+ "Effect": "Allow",
+ "Principal": {
+ "AWS": {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::",
+ {
+ "Ref": "AWS::AccountId"
+ },
+ ":root"
+ ]
+ ]
+ }
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueuedlq420A82FD",
+ "Arn"
+ ]
+ },
+ "Sid": "QueueOwnerOnlyAccess"
+ },
+ {
+ "Action": "SQS:*",
+ "Condition": {
+ "Bool": {
+ "aws:SecureTransport": "false"
+ }
+ },
+ "Effect": "Deny",
+ "Principal": {
+ "AWS": "*"
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueuedlq420A82FD",
+ "Arn"
+ ]
+ },
+ "Sid": "HttpsOnly"
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "queues": [
+ {
+ "Ref": "testsqspipesstatesconstructqueuedlq420A82FD"
+ }
+ ]
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.Queue",
+ "version": "2.161.0"
+ }
+ },
+ "queue": {
+ "id": "queue",
+ "path": "sqspstp-set-queue-batch-size/test-sqs-pipes-states-construct/queue",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-set-queue-batch-size/test-sqs-pipes-states-construct/queue/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::SQS::Queue",
+ "aws:cdk:cloudformation:props": {
+ "kmsMasterKeyId": "alias/aws/sqs",
+ "redrivePolicy": {
+ "deadLetterTargetArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueuedlq420A82FD",
+ "Arn"
+ ]
+ },
+ "maxReceiveCount": 15
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.CfnQueue",
+ "version": "2.161.0"
+ }
+ },
+ "Policy": {
+ "id": "Policy",
+ "path": "sqspstp-set-queue-batch-size/test-sqs-pipes-states-construct/queue/Policy",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-set-queue-batch-size/test-sqs-pipes-states-construct/queue/Policy/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::SQS::QueuePolicy",
+ "aws:cdk:cloudformation:props": {
+ "policyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "sqs:AddPermission",
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes",
+ "sqs:ReceiveMessage",
+ "sqs:RemovePermission",
+ "sqs:SendMessage",
+ "sqs:SetQueueAttributes"
+ ],
+ "Effect": "Allow",
+ "Principal": {
+ "AWS": {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::",
+ {
+ "Ref": "AWS::AccountId"
+ },
+ ":root"
+ ]
+ ]
+ }
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ },
+ "Sid": "QueueOwnerOnlyAccess"
+ },
+ {
+ "Action": "SQS:*",
+ "Condition": {
+ "Bool": {
+ "aws:SecureTransport": "false"
+ }
+ },
+ "Effect": "Deny",
+ "Principal": {
+ "AWS": "*"
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ },
+ "Sid": "HttpsOnly"
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "queues": [
+ {
+ "Ref": "testsqspipesstatesconstructqueueA7C76715"
+ }
+ ]
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.Queue",
+ "version": "2.161.0"
+ }
+ },
+ "StateMachineLogGroup": {
+ "id": "StateMachineLogGroup",
+ "path": "sqspstp-set-queue-batch-size/test-sqs-pipes-states-construct/StateMachineLogGroup",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-set-queue-batch-size/test-sqs-pipes-states-construct/StateMachineLogGroup/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::Logs::LogGroup",
+ "aws:cdk:cloudformation:props": {
+ "logGroupName": {
+ "Fn::Join": [
+ "",
+ [
+ "/aws/vendedlogs/states/constructs/sqspstp-set-queue-batch-sizetest-sqs-pipes-states-constructStateMachineLog-",
+ {
+ "Fn::Select": [
+ 2,
+ {
+ "Fn::Split": [
+ "/",
+ {
+ "Ref": "AWS::StackId"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ ]
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_logs.LogGroup",
+ "version": "2.161.0"
+ }
+ },
+ "StateMachine": {
+ "id": "StateMachine",
+ "path": "sqspstp-set-queue-batch-size/test-sqs-pipes-states-construct/StateMachine",
+ "children": {
+ "Role": {
+ "id": "Role",
+ "path": "sqspstp-set-queue-batch-size/test-sqs-pipes-states-construct/StateMachine/Role",
+ "children": {
+ "ImportRole": {
+ "id": "ImportRole",
+ "path": "sqspstp-set-queue-batch-size/test-sqs-pipes-states-construct/StateMachine/Role/ImportRole",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.Resource",
+ "version": "2.161.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-set-queue-batch-size/test-sqs-pipes-states-construct/StateMachine/Role/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::IAM::Role",
+ "aws:cdk:cloudformation:props": {
+ "assumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "states.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.CfnRole",
+ "version": "2.161.0"
+ }
+ },
+ "DefaultPolicy": {
+ "id": "DefaultPolicy",
+ "path": "sqspstp-set-queue-batch-size/test-sqs-pipes-states-construct/StateMachine/Role/DefaultPolicy",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-set-queue-batch-size/test-sqs-pipes-states-construct/StateMachine/Role/DefaultPolicy/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::IAM::Policy",
+ "aws:cdk:cloudformation:props": {
+ "policyDocument": {
+ "Statement": [
+ {
+ "Action": "lambda:InvokeFunction",
+ "Effect": "Allow",
+ "Resource": [
+ {
+ "Fn::GetAtt": [
+ "lambdas3stptest9FBDC6CE",
+ "Arn"
+ ]
+ },
+ {
+ "Fn::Join": [
+ "",
+ [
+ {
+ "Fn::GetAtt": [
+ "lambdas3stptest9FBDC6CE",
+ "Arn"
+ ]
+ },
+ ":*"
+ ]
+ ]
+ }
+ ]
+ },
+ {
+ "Action": [
+ "logs:CreateLogDelivery",
+ "logs:DeleteLogDelivery",
+ "logs:DescribeLogGroups",
+ "logs:DescribeResourcePolicies",
+ "logs:GetLogDelivery",
+ "logs:ListLogDeliveries",
+ "logs:PutResourcePolicy",
+ "logs:UpdateLogDelivery"
+ ],
+ "Effect": "Allow",
+ "Resource": "*"
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "policyName": "testsqspipesstatesconstructStateMachineRoleDefaultPolicyD1BA2BF2",
+ "roles": [
+ {
+ "Ref": "testsqspipesstatesconstructStateMachineRoleBF97BFC0"
+ }
+ ]
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.CfnPolicy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.Policy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.Role",
+ "version": "2.161.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-set-queue-batch-size/test-sqs-pipes-states-construct/StateMachine/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::StepFunctions::StateMachine",
+ "aws:cdk:cloudformation:props": {
+ "definitionString": {
+ "Fn::Join": [
+ "",
+ [
+ "{\"StartAt\":\"tasks3stp-test\",\"States\":{\"tasks3stp-test\":{\"End\":true,\"Retry\":[{\"ErrorEquals\":[\"Lambda.ClientExecutionTimeoutException\",\"Lambda.ServiceException\",\"Lambda.AWSLambdaException\",\"Lambda.SdkClientException\"],\"IntervalSeconds\":2,\"MaxAttempts\":6,\"BackoffRate\":2}],\"Type\":\"Task\",\"Resource\":\"arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":states:::lambda:invoke\",\"Parameters\":{\"FunctionName\":\"",
+ {
+ "Fn::GetAtt": [
+ "lambdas3stptest9FBDC6CE",
+ "Arn"
+ ]
+ },
+ "\",\"Payload.$\":\"$\"}}}}"
+ ]
+ ]
+ },
+ "loggingConfiguration": {
+ "destinations": [
+ {
+ "cloudWatchLogsLogGroup": {
+ "logGroupArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructStateMachineLogGroupADE94F1D",
+ "Arn"
+ ]
+ }
+ }
+ }
+ ],
+ "level": "ERROR"
+ },
+ "roleArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructStateMachineRoleBF97BFC0",
+ "Arn"
+ ]
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_stepfunctions.CfnStateMachine",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_stepfunctions.StateMachine",
+ "version": "2.161.0"
+ }
+ },
+ "ExecutionFailedAlarm": {
+ "id": "ExecutionFailedAlarm",
+ "path": "sqspstp-set-queue-batch-size/test-sqs-pipes-states-construct/ExecutionFailedAlarm",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-set-queue-batch-size/test-sqs-pipes-states-construct/ExecutionFailedAlarm/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::CloudWatch::Alarm",
+ "aws:cdk:cloudformation:props": {
+ "alarmDescription": "Alarm for the number of executions that failed exceeded the threshold of 1. ",
+ "comparisonOperator": "GreaterThanOrEqualToThreshold",
+ "dimensions": [
+ {
+ "name": "StateMachineArn",
+ "value": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "evaluationPeriods": 1,
+ "metricName": "ExecutionsFailed",
+ "namespace": "AWS/States",
+ "period": 300,
+ "statistic": "Sum",
+ "threshold": 1
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm",
+ "version": "2.161.0"
+ }
+ },
+ "ExecutionThrottledAlarm": {
+ "id": "ExecutionThrottledAlarm",
+ "path": "sqspstp-set-queue-batch-size/test-sqs-pipes-states-construct/ExecutionThrottledAlarm",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-set-queue-batch-size/test-sqs-pipes-states-construct/ExecutionThrottledAlarm/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::CloudWatch::Alarm",
+ "aws:cdk:cloudformation:props": {
+ "alarmDescription": "Alarm for the number of executions that throttled exceeded the threshold of 1. ",
+ "comparisonOperator": "GreaterThanOrEqualToThreshold",
+ "dimensions": [
+ {
+ "name": "StateMachineArn",
+ "value": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "evaluationPeriods": 1,
+ "metricName": "ExecutionThrottled",
+ "namespace": "AWS/States",
+ "period": 300,
+ "statistic": "Sum",
+ "threshold": 1
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm",
+ "version": "2.161.0"
+ }
+ },
+ "ExecutionAbortedAlarm": {
+ "id": "ExecutionAbortedAlarm",
+ "path": "sqspstp-set-queue-batch-size/test-sqs-pipes-states-construct/ExecutionAbortedAlarm",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-set-queue-batch-size/test-sqs-pipes-states-construct/ExecutionAbortedAlarm/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::CloudWatch::Alarm",
+ "aws:cdk:cloudformation:props": {
+ "alarmDescription": "Alarm for the number of executions that aborted exceeded the threshold of 1. ",
+ "comparisonOperator": "GreaterThanOrEqualToThreshold",
+ "dimensions": [
+ {
+ "name": "StateMachineArn",
+ "value": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "evaluationPeriods": 1,
+ "metricName": "ExecutionsAborted",
+ "namespace": "AWS/States",
+ "period": 300,
+ "statistic": "Maximum",
+ "threshold": 1
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm",
+ "version": "2.161.0"
+ }
+ },
+ "PipeRole--test-sqs-pipes-states-construct": {
+ "id": "PipeRole--test-sqs-pipes-states-construct",
+ "path": "sqspstp-set-queue-batch-size/test-sqs-pipes-states-construct/PipeRole--test-sqs-pipes-states-construct",
+ "children": {
+ "ImportPipeRole--test-sqs-pipes-states-construct": {
+ "id": "ImportPipeRole--test-sqs-pipes-states-construct",
+ "path": "sqspstp-set-queue-batch-size/test-sqs-pipes-states-construct/PipeRole--test-sqs-pipes-states-construct/ImportPipeRole--test-sqs-pipes-states-construct",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.Resource",
+ "version": "2.161.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-set-queue-batch-size/test-sqs-pipes-states-construct/PipeRole--test-sqs-pipes-states-construct/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::IAM::Role",
+ "aws:cdk:cloudformation:props": {
+ "assumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "pipes.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "policies": [
+ {
+ "policyName": "sourcePolicy",
+ "policyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes",
+ "sqs:ReceiveMessage"
+ ],
+ "Effect": "Allow",
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ }
+ },
+ {
+ "policyName": "targetPolicy",
+ "policyDocument": {
+ "Statement": [
+ {
+ "Action": "states:StartExecution",
+ "Effect": "Allow",
+ "Resource": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ }
+ }
+ ]
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.CfnRole",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.Role",
+ "version": "2.161.0"
+ }
+ },
+ "LogGroup-test-sqs-pipes-states-construct": {
+ "id": "LogGroup-test-sqs-pipes-states-construct",
+ "path": "sqspstp-set-queue-batch-size/test-sqs-pipes-states-construct/LogGroup-test-sqs-pipes-states-construct",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-set-queue-batch-size/test-sqs-pipes-states-construct/LogGroup-test-sqs-pipes-states-construct/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::Logs::LogGroup",
+ "aws:cdk:cloudformation:props": {
+ "logGroupName": {
+ "Fn::Join": [
+ "",
+ [
+ "/aws/vendedlogs/pipes/constructs/sqspstp-set-queue-batch-sizetest-sqs-pipes-states-constructPipesLog-",
+ {
+ "Fn::Select": [
+ 2,
+ {
+ "Fn::Split": [
+ "/",
+ {
+ "Ref": "AWS::StackId"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ ]
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_logs.LogGroup",
+ "version": "2.161.0"
+ }
+ },
+ "pipe-test-sqs-pipes-states-construct": {
+ "id": "pipe-test-sqs-pipes-states-construct",
+ "path": "sqspstp-set-queue-batch-size/test-sqs-pipes-states-construct/pipe-test-sqs-pipes-states-construct",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::Pipes::Pipe",
+ "aws:cdk:cloudformation:props": {
+ "logConfiguration": {
+ "cloudwatchLogsLogDestination": {
+ "logGroupArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructLogGrouptestsqspipesstatesconstructF827FE15",
+ "Arn"
+ ]
+ }
+ },
+ "level": "INFO"
+ },
+ "roleArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructPipeRoletestsqspipesstatesconstruct2CC9A13C",
+ "Arn"
+ ]
+ },
+ "source": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ },
+ "sourceParameters": {
+ "sqsQueueParameters": {
+ "batchSize": 3
+ }
+ },
+ "target": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ },
+ "targetParameters": {
+ "stepFunctionStateMachineParameters": {
+ "invocationType": "FIRE_AND_FORGET"
+ }
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_pipes.CfnPipe",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-solutions-constructs/aws-sqs-pipes-stepfunctions.SqsToPipesToStepfunctions",
+ "version": "2.72.0"
+ }
+ },
+ "Integ": {
+ "id": "Integ",
+ "path": "sqspstp-set-queue-batch-size/Integ",
+ "children": {
+ "DefaultTest": {
+ "id": "DefaultTest",
+ "path": "sqspstp-set-queue-batch-size/Integ/DefaultTest",
+ "children": {
+ "Default": {
+ "id": "Default",
+ "path": "sqspstp-set-queue-batch-size/Integ/DefaultTest/Default",
+ "constructInfo": {
+ "fqn": "constructs.Construct",
+ "version": "10.4.2"
+ }
+ },
+ "DeployAssert": {
+ "id": "DeployAssert",
+ "path": "sqspstp-set-queue-batch-size/Integ/DefaultTest/DeployAssert",
+ "children": {
+ "BootstrapVersion": {
+ "id": "BootstrapVersion",
+ "path": "sqspstp-set-queue-batch-size/Integ/DefaultTest/DeployAssert/BootstrapVersion",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.CfnParameter",
+ "version": "2.161.0"
+ }
+ },
+ "CheckBootstrapVersion": {
+ "id": "CheckBootstrapVersion",
+ "path": "sqspstp-set-queue-batch-size/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.CfnRule",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.Stack",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase",
+ "version": "2.161.0-alpha.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/integ-tests-alpha.IntegTest",
+ "version": "2.161.0-alpha.0"
+ }
+ },
+ "BootstrapVersion": {
+ "id": "BootstrapVersion",
+ "path": "sqspstp-set-queue-batch-size/BootstrapVersion",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.CfnParameter",
+ "version": "2.161.0"
+ }
+ },
+ "CheckBootstrapVersion": {
+ "id": "CheckBootstrapVersion",
+ "path": "sqspstp-set-queue-batch-size/CheckBootstrapVersion",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.CfnRule",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.Stack",
+ "version": "2.161.0"
+ }
+ },
+ "Tree": {
+ "id": "Tree",
+ "path": "Tree",
+ "constructInfo": {
+ "fqn": "constructs.Construct",
+ "version": "10.4.2"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.App",
+ "version": "2.161.0"
+ }
+ }
+}
\ No newline at end of file
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-set-queue-batch-size.ts b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-set-queue-batch-size.ts
new file mode 100644
index 000000000..b2a95f294
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-set-queue-batch-size.ts
@@ -0,0 +1,41 @@
+/**
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
+ * with the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES
+ * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+
+/// !cdk-integ *
+import { App, Stack } from "aws-cdk-lib";
+import { SqsToPipesToStepfunctions, SqsToPipesToStepfunctionsProps } from "../lib";
+import { generateIntegStackName } from '@aws-solutions-constructs/core';
+import { IntegTest } from '@aws-cdk/integ-tests-alpha';
+import * as defaults from '@aws-solutions-constructs/core';
+
+const app = new App();
+const stack = new Stack(app, generateIntegStackName(__filename));
+
+const props: SqsToPipesToStepfunctionsProps = {
+ stateMachineProps: {
+ definitionBody: defaults.CreateTestStateMachineDefinitionBody(stack, 's3stp-test')
+ },
+ pipeProps: {
+ sourceParameters: {
+ sqsQueueParameters: {
+ batchSize: 3,
+ },
+ }
+ }
+};
+
+new SqsToPipesToStepfunctions(stack, 'test-sqs-pipes-states-construct', props);
+
+new IntegTest(stack, 'Integ', { testCases: [
+ stack
+] });
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-state-machine-enrichment.js.snapshot/cdk.out b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-state-machine-enrichment.js.snapshot/cdk.out
new file mode 100644
index 000000000..c6e612584
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-state-machine-enrichment.js.snapshot/cdk.out
@@ -0,0 +1 @@
+{"version":"38.0.1"}
\ No newline at end of file
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-state-machine-enrichment.js.snapshot/integ.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-state-machine-enrichment.js.snapshot/integ.json
new file mode 100644
index 000000000..3f3c9170a
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-state-machine-enrichment.js.snapshot/integ.json
@@ -0,0 +1,12 @@
+{
+ "version": "38.0.1",
+ "testCases": {
+ "sqspstp-state-machine-enrichment/Integ/DefaultTest": {
+ "stacks": [
+ "sqspstp-state-machine-enrichment"
+ ],
+ "assertionStack": "sqspstp-state-machine-enrichment/Integ/DefaultTest/DeployAssert",
+ "assertionStackName": "sqspstpstatemachineenrichmentIntegDefaultTestDeployAssert47A5DE6D"
+ }
+ }
+}
\ No newline at end of file
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-state-machine-enrichment.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-state-machine-enrichment.js.snapshot/manifest.json
new file mode 100644
index 000000000..34dc7693f
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-state-machine-enrichment.js.snapshot/manifest.json
@@ -0,0 +1,241 @@
+{
+ "version": "38.0.1",
+ "artifacts": {
+ "sqspstpstatemachineenrichmentIntegDefaultTestDeployAssert47A5DE6D.assets": {
+ "type": "cdk:asset-manifest",
+ "properties": {
+ "file": "sqspstpstatemachineenrichmentIntegDefaultTestDeployAssert47A5DE6D.assets.json",
+ "requiresBootstrapStackVersion": 6,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
+ }
+ },
+ "sqspstpstatemachineenrichmentIntegDefaultTestDeployAssert47A5DE6D": {
+ "type": "aws:cloudformation:stack",
+ "environment": "aws://unknown-account/unknown-region",
+ "properties": {
+ "templateFile": "sqspstpstatemachineenrichmentIntegDefaultTestDeployAssert47A5DE6D.template.json",
+ "terminationProtection": false,
+ "validateOnSynth": false,
+ "notificationArns": [],
+ "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": [
+ "sqspstpstatemachineenrichmentIntegDefaultTestDeployAssert47A5DE6D.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": [
+ "sqspstpstatemachineenrichmentIntegDefaultTestDeployAssert47A5DE6D.assets"
+ ],
+ "metadata": {
+ "/sqspstp-state-machine-enrichment/Integ/DefaultTest/DeployAssert/BootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "BootstrapVersion"
+ }
+ ],
+ "/sqspstp-state-machine-enrichment/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "CheckBootstrapVersion"
+ }
+ ]
+ },
+ "displayName": "sqspstp-state-machine-enrichment/Integ/DefaultTest/DeployAssert"
+ },
+ "sqspstp-state-machine-enrichment.assets": {
+ "type": "cdk:asset-manifest",
+ "properties": {
+ "file": "sqspstp-state-machine-enrichment.assets.json",
+ "requiresBootstrapStackVersion": 6,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
+ }
+ },
+ "sqspstp-state-machine-enrichment": {
+ "type": "aws:cloudformation:stack",
+ "environment": "aws://unknown-account/unknown-region",
+ "properties": {
+ "templateFile": "sqspstp-state-machine-enrichment.template.json",
+ "terminationProtection": false,
+ "validateOnSynth": false,
+ "notificationArns": [],
+ "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}/37e120129bdd6a92826312af8144843d8677b653caa62941beadbab36762289e.json",
+ "requiresBootstrapStackVersion": 6,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
+ "additionalDependencies": [
+ "sqspstp-state-machine-enrichment.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": [
+ "sqspstp-state-machine-enrichment.assets"
+ ],
+ "metadata": {
+ "/sqspstp-state-machine-enrichment/lambdatemp/ServiceRole/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "lambdatempServiceRoleA1A0368B"
+ }
+ ],
+ "/sqspstp-state-machine-enrichment/lambdatemp/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "lambdatemp1CD2462E"
+ }
+ ],
+ "/sqspstp-state-machine-enrichment/temp/Role/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "tempRole0DF4072C"
+ }
+ ],
+ "/sqspstp-state-machine-enrichment/temp/Role/DefaultPolicy/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "tempRoleDefaultPolicy6B471CA6"
+ }
+ ],
+ "/sqspstp-state-machine-enrichment/temp/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "temp3A4F7567"
+ }
+ ],
+ "/sqspstp-state-machine-enrichment/lambdas3stp-test/ServiceRole/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "lambdas3stptestServiceRoleF17BB6C7"
+ }
+ ],
+ "/sqspstp-state-machine-enrichment/lambdas3stp-test/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "lambdas3stptest9FBDC6CE"
+ }
+ ],
+ "/sqspstp-state-machine-enrichment/test-sqs-pipes-states-construct/queue-dlq/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructqueuedlq420A82FD"
+ }
+ ],
+ "/sqspstp-state-machine-enrichment/test-sqs-pipes-states-construct/queue-dlq/Policy/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructqueuedlqPolicyB1D70483"
+ }
+ ],
+ "/sqspstp-state-machine-enrichment/test-sqs-pipes-states-construct/queue/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructqueueA7C76715"
+ }
+ ],
+ "/sqspstp-state-machine-enrichment/test-sqs-pipes-states-construct/queue/Policy/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructqueuePolicyFD32B562"
+ }
+ ],
+ "/sqspstp-state-machine-enrichment/test-sqs-pipes-states-construct/StateMachineLogGroup/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructStateMachineLogGroupADE94F1D"
+ }
+ ],
+ "/sqspstp-state-machine-enrichment/test-sqs-pipes-states-construct/StateMachine/Role/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructStateMachineRoleBF97BFC0"
+ }
+ ],
+ "/sqspstp-state-machine-enrichment/test-sqs-pipes-states-construct/StateMachine/Role/DefaultPolicy/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructStateMachineRoleDefaultPolicyD1BA2BF2"
+ }
+ ],
+ "/sqspstp-state-machine-enrichment/test-sqs-pipes-states-construct/StateMachine/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ ],
+ "/sqspstp-state-machine-enrichment/test-sqs-pipes-states-construct/ExecutionFailedAlarm/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructExecutionFailedAlarm1002FF55"
+ }
+ ],
+ "/sqspstp-state-machine-enrichment/test-sqs-pipes-states-construct/ExecutionThrottledAlarm/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructExecutionThrottledAlarm0242B01A"
+ }
+ ],
+ "/sqspstp-state-machine-enrichment/test-sqs-pipes-states-construct/ExecutionAbortedAlarm/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructExecutionAbortedAlarm14349A7B"
+ }
+ ],
+ "/sqspstp-state-machine-enrichment/test-sqs-pipes-states-construct/PipeRole--test-sqs-pipes-states-construct/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructPipeRoletestsqspipesstatesconstruct2CC9A13C"
+ }
+ ],
+ "/sqspstp-state-machine-enrichment/test-sqs-pipes-states-construct/enrichmentpolicytest-sqs-pipes-states-construct/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructenrichmentpolicytestsqspipesstatesconstructC752476A"
+ }
+ ],
+ "/sqspstp-state-machine-enrichment/test-sqs-pipes-states-construct/LogGroup-test-sqs-pipes-states-construct/Resource": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructLogGrouptestsqspipesstatesconstructF827FE15"
+ }
+ ],
+ "/sqspstp-state-machine-enrichment/test-sqs-pipes-states-construct/pipe-test-sqs-pipes-states-construct": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "testsqspipesstatesconstructpipetestsqspipesstatesconstruct71A64A15"
+ }
+ ],
+ "/sqspstp-state-machine-enrichment/BootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "BootstrapVersion"
+ }
+ ],
+ "/sqspstp-state-machine-enrichment/CheckBootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "CheckBootstrapVersion"
+ }
+ ]
+ },
+ "displayName": "sqspstp-state-machine-enrichment"
+ },
+ "Tree": {
+ "type": "cdk:tree",
+ "properties": {
+ "file": "tree.json"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-state-machine-enrichment.js.snapshot/sqspstp-state-machine-enrichment.assets.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-state-machine-enrichment.js.snapshot/sqspstp-state-machine-enrichment.assets.json
new file mode 100644
index 000000000..0a92e2752
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-state-machine-enrichment.js.snapshot/sqspstp-state-machine-enrichment.assets.json
@@ -0,0 +1,19 @@
+{
+ "version": "38.0.1",
+ "files": {
+ "37e120129bdd6a92826312af8144843d8677b653caa62941beadbab36762289e": {
+ "source": {
+ "path": "sqspstp-state-machine-enrichment.template.json",
+ "packaging": "file"
+ },
+ "destinations": {
+ "current_account-current_region": {
+ "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
+ "objectKey": "37e120129bdd6a92826312af8144843d8677b653caa62941beadbab36762289e.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/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-state-machine-enrichment.js.snapshot/sqspstp-state-machine-enrichment.template.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-state-machine-enrichment.js.snapshot/sqspstp-state-machine-enrichment.template.json
new file mode 100644
index 000000000..d06a5aaed
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-state-machine-enrichment.js.snapshot/sqspstp-state-machine-enrichment.template.json
@@ -0,0 +1,868 @@
+{
+ "Resources": {
+ "lambdatempServiceRoleA1A0368B": {
+ "Type": "AWS::IAM::Role",
+ "Properties": {
+ "AssumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "lambda.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "ManagedPolicyArns": [
+ {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
+ ]
+ ]
+ }
+ ]
+ }
+ },
+ "lambdatemp1CD2462E": {
+ "Type": "AWS::Lambda::Function",
+ "Properties": {
+ "Code": {
+ "ZipFile": "exports.handler = async (event) => console.log(event)"
+ },
+ "Handler": "index.handler",
+ "Role": {
+ "Fn::GetAtt": [
+ "lambdatempServiceRoleA1A0368B",
+ "Arn"
+ ]
+ },
+ "Runtime": "nodejs20.x"
+ },
+ "DependsOn": [
+ "lambdatempServiceRoleA1A0368B"
+ ],
+ "Metadata": {
+ "cfn_nag": {
+ "rules_to_suppress": [
+ {
+ "id": "W58",
+ "reason": "This Lambda Function is created for integration testing purposes only and is not part of an actual construct"
+ },
+ {
+ "id": "W89",
+ "reason": "This Lambda Function is created for integration testing purposes only and is not part of an actual construct"
+ },
+ {
+ "id": "W92",
+ "reason": "This Lambda Function is created for integration testing purposes only and is not part of an actual construct"
+ },
+ {
+ "id": "W58",
+ "reason": "This Lambda Function is created for integration testing purposes only and is not part of an actual construct"
+ },
+ {
+ "id": "W89",
+ "reason": "This Lambda Function is created for integration testing purposes only and is not part of an actual construct"
+ },
+ {
+ "id": "W92",
+ "reason": "This Lambda Function is created for integration testing purposes only and is not part of an actual construct"
+ }
+ ]
+ }
+ }
+ },
+ "tempRole0DF4072C": {
+ "Type": "AWS::IAM::Role",
+ "Properties": {
+ "AssumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "states.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ }
+ }
+ },
+ "tempRoleDefaultPolicy6B471CA6": {
+ "Type": "AWS::IAM::Policy",
+ "Properties": {
+ "PolicyDocument": {
+ "Statement": [
+ {
+ "Action": "lambda:InvokeFunction",
+ "Effect": "Allow",
+ "Resource": [
+ {
+ "Fn::GetAtt": [
+ "lambdatemp1CD2462E",
+ "Arn"
+ ]
+ },
+ {
+ "Fn::Join": [
+ "",
+ [
+ {
+ "Fn::GetAtt": [
+ "lambdatemp1CD2462E",
+ "Arn"
+ ]
+ },
+ ":*"
+ ]
+ ]
+ }
+ ]
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "PolicyName": "tempRoleDefaultPolicy6B471CA6",
+ "Roles": [
+ {
+ "Ref": "tempRole0DF4072C"
+ }
+ ]
+ }
+ },
+ "temp3A4F7567": {
+ "Type": "AWS::StepFunctions::StateMachine",
+ "Properties": {
+ "DefinitionString": {
+ "Fn::Join": [
+ "",
+ [
+ "{\"StartAt\":\"tasktemp\",\"States\":{\"tasktemp\":{\"End\":true,\"Retry\":[{\"ErrorEquals\":[\"Lambda.ClientExecutionTimeoutException\",\"Lambda.ServiceException\",\"Lambda.AWSLambdaException\",\"Lambda.SdkClientException\"],\"IntervalSeconds\":2,\"MaxAttempts\":6,\"BackoffRate\":2}],\"Type\":\"Task\",\"Resource\":\"arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":states:::lambda:invoke\",\"Parameters\":{\"FunctionName\":\"",
+ {
+ "Fn::GetAtt": [
+ "lambdatemp1CD2462E",
+ "Arn"
+ ]
+ },
+ "\",\"Payload.$\":\"$\"}}}}"
+ ]
+ ]
+ },
+ "RoleArn": {
+ "Fn::GetAtt": [
+ "tempRole0DF4072C",
+ "Arn"
+ ]
+ },
+ "StateMachineType": "EXPRESS"
+ },
+ "DependsOn": [
+ "tempRoleDefaultPolicy6B471CA6",
+ "tempRole0DF4072C"
+ ],
+ "UpdateReplacePolicy": "Delete",
+ "DeletionPolicy": "Delete"
+ },
+ "lambdas3stptestServiceRoleF17BB6C7": {
+ "Type": "AWS::IAM::Role",
+ "Properties": {
+ "AssumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "lambda.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "ManagedPolicyArns": [
+ {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
+ ]
+ ]
+ }
+ ]
+ }
+ },
+ "lambdas3stptest9FBDC6CE": {
+ "Type": "AWS::Lambda::Function",
+ "Properties": {
+ "Code": {
+ "ZipFile": "exports.handler = async (event) => console.log(event)"
+ },
+ "Handler": "index.handler",
+ "Role": {
+ "Fn::GetAtt": [
+ "lambdas3stptestServiceRoleF17BB6C7",
+ "Arn"
+ ]
+ },
+ "Runtime": "nodejs20.x"
+ },
+ "DependsOn": [
+ "lambdas3stptestServiceRoleF17BB6C7"
+ ],
+ "Metadata": {
+ "cfn_nag": {
+ "rules_to_suppress": [
+ {
+ "id": "W58",
+ "reason": "This Lambda Function is created for integration testing purposes only and is not part of an actual construct"
+ },
+ {
+ "id": "W89",
+ "reason": "This Lambda Function is created for integration testing purposes only and is not part of an actual construct"
+ },
+ {
+ "id": "W92",
+ "reason": "This Lambda Function is created for integration testing purposes only and is not part of an actual construct"
+ },
+ {
+ "id": "W58",
+ "reason": "This Lambda Function is created for integration testing purposes only and is not part of an actual construct"
+ },
+ {
+ "id": "W89",
+ "reason": "This Lambda Function is created for integration testing purposes only and is not part of an actual construct"
+ },
+ {
+ "id": "W92",
+ "reason": "This Lambda Function is created for integration testing purposes only and is not part of an actual construct"
+ }
+ ]
+ }
+ }
+ },
+ "testsqspipesstatesconstructqueuedlq420A82FD": {
+ "Type": "AWS::SQS::Queue",
+ "Properties": {
+ "KmsMasterKeyId": "alias/aws/sqs"
+ },
+ "UpdateReplacePolicy": "Delete",
+ "DeletionPolicy": "Delete"
+ },
+ "testsqspipesstatesconstructqueuedlqPolicyB1D70483": {
+ "Type": "AWS::SQS::QueuePolicy",
+ "Properties": {
+ "PolicyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "sqs:AddPermission",
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes",
+ "sqs:ReceiveMessage",
+ "sqs:RemovePermission",
+ "sqs:SendMessage",
+ "sqs:SetQueueAttributes"
+ ],
+ "Effect": "Allow",
+ "Principal": {
+ "AWS": {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::",
+ {
+ "Ref": "AWS::AccountId"
+ },
+ ":root"
+ ]
+ ]
+ }
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueuedlq420A82FD",
+ "Arn"
+ ]
+ },
+ "Sid": "QueueOwnerOnlyAccess"
+ },
+ {
+ "Action": "SQS:*",
+ "Condition": {
+ "Bool": {
+ "aws:SecureTransport": "false"
+ }
+ },
+ "Effect": "Deny",
+ "Principal": {
+ "AWS": "*"
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueuedlq420A82FD",
+ "Arn"
+ ]
+ },
+ "Sid": "HttpsOnly"
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "Queues": [
+ {
+ "Ref": "testsqspipesstatesconstructqueuedlq420A82FD"
+ }
+ ]
+ }
+ },
+ "testsqspipesstatesconstructqueueA7C76715": {
+ "Type": "AWS::SQS::Queue",
+ "Properties": {
+ "KmsMasterKeyId": "alias/aws/sqs",
+ "RedrivePolicy": {
+ "deadLetterTargetArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueuedlq420A82FD",
+ "Arn"
+ ]
+ },
+ "maxReceiveCount": 15
+ }
+ },
+ "UpdateReplacePolicy": "Delete",
+ "DeletionPolicy": "Delete"
+ },
+ "testsqspipesstatesconstructqueuePolicyFD32B562": {
+ "Type": "AWS::SQS::QueuePolicy",
+ "Properties": {
+ "PolicyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "sqs:AddPermission",
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes",
+ "sqs:ReceiveMessage",
+ "sqs:RemovePermission",
+ "sqs:SendMessage",
+ "sqs:SetQueueAttributes"
+ ],
+ "Effect": "Allow",
+ "Principal": {
+ "AWS": {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::",
+ {
+ "Ref": "AWS::AccountId"
+ },
+ ":root"
+ ]
+ ]
+ }
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ },
+ "Sid": "QueueOwnerOnlyAccess"
+ },
+ {
+ "Action": "SQS:*",
+ "Condition": {
+ "Bool": {
+ "aws:SecureTransport": "false"
+ }
+ },
+ "Effect": "Deny",
+ "Principal": {
+ "AWS": "*"
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ },
+ "Sid": "HttpsOnly"
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "Queues": [
+ {
+ "Ref": "testsqspipesstatesconstructqueueA7C76715"
+ }
+ ]
+ }
+ },
+ "testsqspipesstatesconstructStateMachineLogGroupADE94F1D": {
+ "Type": "AWS::Logs::LogGroup",
+ "Properties": {
+ "LogGroupName": {
+ "Fn::Join": [
+ "",
+ [
+ "/aws/vendedlogs/states/constructs/sqspstp-state-machine-enrichmenttest-sqs-pipes-states-constructStateMachineLog-",
+ {
+ "Fn::Select": [
+ 2,
+ {
+ "Fn::Split": [
+ "/",
+ {
+ "Ref": "AWS::StackId"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ ]
+ }
+ },
+ "UpdateReplacePolicy": "Retain",
+ "DeletionPolicy": "Retain",
+ "Metadata": {
+ "cfn_nag": {
+ "rules_to_suppress": [
+ {
+ "id": "W86",
+ "reason": "Retention period for CloudWatchLogs LogGroups are set to 'Never Expire' to preserve customer data indefinitely"
+ },
+ {
+ "id": "W84",
+ "reason": "By default CloudWatchLogs LogGroups data is encrypted using the CloudWatch server-side encryption keys (AWS Managed Keys)"
+ }
+ ]
+ }
+ }
+ },
+ "testsqspipesstatesconstructStateMachineRoleBF97BFC0": {
+ "Type": "AWS::IAM::Role",
+ "Properties": {
+ "AssumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "states.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ }
+ }
+ },
+ "testsqspipesstatesconstructStateMachineRoleDefaultPolicyD1BA2BF2": {
+ "Type": "AWS::IAM::Policy",
+ "Properties": {
+ "PolicyDocument": {
+ "Statement": [
+ {
+ "Action": "lambda:InvokeFunction",
+ "Effect": "Allow",
+ "Resource": [
+ {
+ "Fn::GetAtt": [
+ "lambdas3stptest9FBDC6CE",
+ "Arn"
+ ]
+ },
+ {
+ "Fn::Join": [
+ "",
+ [
+ {
+ "Fn::GetAtt": [
+ "lambdas3stptest9FBDC6CE",
+ "Arn"
+ ]
+ },
+ ":*"
+ ]
+ ]
+ }
+ ]
+ },
+ {
+ "Action": [
+ "logs:CreateLogDelivery",
+ "logs:DeleteLogDelivery",
+ "logs:DescribeLogGroups",
+ "logs:DescribeResourcePolicies",
+ "logs:GetLogDelivery",
+ "logs:ListLogDeliveries",
+ "logs:PutResourcePolicy",
+ "logs:UpdateLogDelivery"
+ ],
+ "Effect": "Allow",
+ "Resource": "*"
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "PolicyName": "testsqspipesstatesconstructStateMachineRoleDefaultPolicyD1BA2BF2",
+ "Roles": [
+ {
+ "Ref": "testsqspipesstatesconstructStateMachineRoleBF97BFC0"
+ }
+ ]
+ },
+ "Metadata": {
+ "cfn_nag": {
+ "rules_to_suppress": [
+ {
+ "id": "W12",
+ "reason": "These are CDK defaults. The 'LogDelivery' actions do not support resource-level authorizations. Any logging is done by State Machine code"
+ }
+ ]
+ }
+ }
+ },
+ "testsqspipesstatesconstructStateMachine29272AA9": {
+ "Type": "AWS::StepFunctions::StateMachine",
+ "Properties": {
+ "DefinitionString": {
+ "Fn::Join": [
+ "",
+ [
+ "{\"StartAt\":\"tasks3stp-test\",\"States\":{\"tasks3stp-test\":{\"End\":true,\"Retry\":[{\"ErrorEquals\":[\"Lambda.ClientExecutionTimeoutException\",\"Lambda.ServiceException\",\"Lambda.AWSLambdaException\",\"Lambda.SdkClientException\"],\"IntervalSeconds\":2,\"MaxAttempts\":6,\"BackoffRate\":2}],\"Type\":\"Task\",\"Resource\":\"arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":states:::lambda:invoke\",\"Parameters\":{\"FunctionName\":\"",
+ {
+ "Fn::GetAtt": [
+ "lambdas3stptest9FBDC6CE",
+ "Arn"
+ ]
+ },
+ "\",\"Payload.$\":\"$\"}}}}"
+ ]
+ ]
+ },
+ "LoggingConfiguration": {
+ "Destinations": [
+ {
+ "CloudWatchLogsLogGroup": {
+ "LogGroupArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructStateMachineLogGroupADE94F1D",
+ "Arn"
+ ]
+ }
+ }
+ }
+ ],
+ "Level": "ERROR"
+ },
+ "RoleArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructStateMachineRoleBF97BFC0",
+ "Arn"
+ ]
+ }
+ },
+ "DependsOn": [
+ "testsqspipesstatesconstructStateMachineRoleDefaultPolicyD1BA2BF2",
+ "testsqspipesstatesconstructStateMachineRoleBF97BFC0"
+ ],
+ "UpdateReplacePolicy": "Delete",
+ "DeletionPolicy": "Delete"
+ },
+ "testsqspipesstatesconstructExecutionFailedAlarm1002FF55": {
+ "Type": "AWS::CloudWatch::Alarm",
+ "Properties": {
+ "AlarmDescription": "Alarm for the number of executions that failed exceeded the threshold of 1. ",
+ "ComparisonOperator": "GreaterThanOrEqualToThreshold",
+ "Dimensions": [
+ {
+ "Name": "StateMachineArn",
+ "Value": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "EvaluationPeriods": 1,
+ "MetricName": "ExecutionsFailed",
+ "Namespace": "AWS/States",
+ "Period": 300,
+ "Statistic": "Sum",
+ "Threshold": 1
+ }
+ },
+ "testsqspipesstatesconstructExecutionThrottledAlarm0242B01A": {
+ "Type": "AWS::CloudWatch::Alarm",
+ "Properties": {
+ "AlarmDescription": "Alarm for the number of executions that throttled exceeded the threshold of 1. ",
+ "ComparisonOperator": "GreaterThanOrEqualToThreshold",
+ "Dimensions": [
+ {
+ "Name": "StateMachineArn",
+ "Value": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "EvaluationPeriods": 1,
+ "MetricName": "ExecutionThrottled",
+ "Namespace": "AWS/States",
+ "Period": 300,
+ "Statistic": "Sum",
+ "Threshold": 1
+ }
+ },
+ "testsqspipesstatesconstructExecutionAbortedAlarm14349A7B": {
+ "Type": "AWS::CloudWatch::Alarm",
+ "Properties": {
+ "AlarmDescription": "Alarm for the number of executions that aborted exceeded the threshold of 1. ",
+ "ComparisonOperator": "GreaterThanOrEqualToThreshold",
+ "Dimensions": [
+ {
+ "Name": "StateMachineArn",
+ "Value": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "EvaluationPeriods": 1,
+ "MetricName": "ExecutionsAborted",
+ "Namespace": "AWS/States",
+ "Period": 300,
+ "Statistic": "Maximum",
+ "Threshold": 1
+ }
+ },
+ "testsqspipesstatesconstructPipeRoletestsqspipesstatesconstruct2CC9A13C": {
+ "Type": "AWS::IAM::Role",
+ "Properties": {
+ "AssumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "pipes.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "Policies": [
+ {
+ "PolicyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes",
+ "sqs:ReceiveMessage"
+ ],
+ "Effect": "Allow",
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "PolicyName": "sourcePolicy"
+ },
+ {
+ "PolicyDocument": {
+ "Statement": [
+ {
+ "Action": "states:StartExecution",
+ "Effect": "Allow",
+ "Resource": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "PolicyName": "targetPolicy"
+ }
+ ]
+ },
+ "Metadata": {
+ "guard": {
+ "SuppressedRules": [
+ "IAM_NO_INLINE_POLICY_CHECK"
+ ]
+ }
+ }
+ },
+ "testsqspipesstatesconstructenrichmentpolicytestsqspipesstatesconstructC752476A": {
+ "Type": "AWS::IAM::Policy",
+ "Properties": {
+ "PolicyDocument": {
+ "Statement": [
+ {
+ "Action": "states:StartSyncExecution",
+ "Effect": "Allow",
+ "Resource": {
+ "Ref": "temp3A4F7567"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "PolicyName": "testsqspipesstatesconstructenrichmentpolicytestsqspipesstatesconstructC752476A",
+ "Roles": [
+ {
+ "Ref": "testsqspipesstatesconstructPipeRoletestsqspipesstatesconstruct2CC9A13C"
+ }
+ ]
+ }
+ },
+ "testsqspipesstatesconstructLogGrouptestsqspipesstatesconstructF827FE15": {
+ "Type": "AWS::Logs::LogGroup",
+ "Properties": {
+ "LogGroupName": {
+ "Fn::Join": [
+ "",
+ [
+ "/aws/vendedlogs/pipes/constructs/sqspstp-state-machine-enrichmenttest-sqs-pipes-states-constructPipesLog-",
+ {
+ "Fn::Select": [
+ 2,
+ {
+ "Fn::Split": [
+ "/",
+ {
+ "Ref": "AWS::StackId"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ ]
+ }
+ },
+ "UpdateReplacePolicy": "Retain",
+ "DeletionPolicy": "Retain",
+ "Metadata": {
+ "cfn_nag": {
+ "rules_to_suppress": [
+ {
+ "id": "W86",
+ "reason": "Retention period for CloudWatchLogs LogGroups are set to 'Never Expire' to preserve customer data indefinitely"
+ },
+ {
+ "id": "W84",
+ "reason": "By default CloudWatchLogs LogGroups data is encrypted using the CloudWatch server-side encryption keys (AWS Managed Keys)"
+ }
+ ]
+ }
+ }
+ },
+ "testsqspipesstatesconstructpipetestsqspipesstatesconstruct71A64A15": {
+ "Type": "AWS::Pipes::Pipe",
+ "Properties": {
+ "Enrichment": {
+ "Ref": "temp3A4F7567"
+ },
+ "LogConfiguration": {
+ "CloudwatchLogsLogDestination": {
+ "LogGroupArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructLogGrouptestsqspipesstatesconstructF827FE15",
+ "Arn"
+ ]
+ }
+ },
+ "Level": "TRACE"
+ },
+ "RoleArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructPipeRoletestsqspipesstatesconstruct2CC9A13C",
+ "Arn"
+ ]
+ },
+ "Source": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ },
+ "SourceParameters": {},
+ "Target": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ },
+ "TargetParameters": {
+ "StepFunctionStateMachineParameters": {
+ "InvocationType": "FIRE_AND_FORGET"
+ }
+ }
+ }
+ }
+ },
+ "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/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-state-machine-enrichment.js.snapshot/sqspstpstatemachineenrichmentIntegDefaultTestDeployAssert47A5DE6D.assets.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-state-machine-enrichment.js.snapshot/sqspstpstatemachineenrichmentIntegDefaultTestDeployAssert47A5DE6D.assets.json
new file mode 100644
index 000000000..3a89d33e3
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-state-machine-enrichment.js.snapshot/sqspstpstatemachineenrichmentIntegDefaultTestDeployAssert47A5DE6D.assets.json
@@ -0,0 +1,19 @@
+{
+ "version": "38.0.1",
+ "files": {
+ "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": {
+ "source": {
+ "path": "sqspstpstatemachineenrichmentIntegDefaultTestDeployAssert47A5DE6D.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/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-state-machine-enrichment.js.snapshot/sqspstpstatemachineenrichmentIntegDefaultTestDeployAssert47A5DE6D.template.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-state-machine-enrichment.js.snapshot/sqspstpstatemachineenrichmentIntegDefaultTestDeployAssert47A5DE6D.template.json
new file mode 100644
index 000000000..ad9d0fb73
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-state-machine-enrichment.js.snapshot/sqspstpstatemachineenrichmentIntegDefaultTestDeployAssert47A5DE6D.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/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-state-machine-enrichment.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-state-machine-enrichment.js.snapshot/tree.json
new file mode 100644
index 000000000..22513ac63
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-state-machine-enrichment.js.snapshot/tree.json
@@ -0,0 +1,1252 @@
+{
+ "version": "tree-0.1",
+ "tree": {
+ "id": "App",
+ "path": "",
+ "children": {
+ "sqspstp-state-machine-enrichment": {
+ "id": "sqspstp-state-machine-enrichment",
+ "path": "sqspstp-state-machine-enrichment",
+ "children": {
+ "lambdatemp": {
+ "id": "lambdatemp",
+ "path": "sqspstp-state-machine-enrichment/lambdatemp",
+ "children": {
+ "ServiceRole": {
+ "id": "ServiceRole",
+ "path": "sqspstp-state-machine-enrichment/lambdatemp/ServiceRole",
+ "children": {
+ "ImportServiceRole": {
+ "id": "ImportServiceRole",
+ "path": "sqspstp-state-machine-enrichment/lambdatemp/ServiceRole/ImportServiceRole",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.Resource",
+ "version": "2.161.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-state-machine-enrichment/lambdatemp/ServiceRole/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::IAM::Role",
+ "aws:cdk:cloudformation:props": {
+ "assumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "lambda.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "managedPolicyArns": [
+ {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
+ ]
+ ]
+ }
+ ]
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.CfnRole",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.Role",
+ "version": "2.161.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-state-machine-enrichment/lambdatemp/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::Lambda::Function",
+ "aws:cdk:cloudformation:props": {
+ "code": {
+ "zipFile": "exports.handler = async (event) => console.log(event)"
+ },
+ "handler": "index.handler",
+ "role": {
+ "Fn::GetAtt": [
+ "lambdatempServiceRoleA1A0368B",
+ "Arn"
+ ]
+ },
+ "runtime": "nodejs20.x"
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_lambda.CfnFunction",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_lambda.Function",
+ "version": "2.161.0"
+ }
+ },
+ "tasktemp": {
+ "id": "tasktemp",
+ "path": "sqspstp-state-machine-enrichment/tasktemp",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_stepfunctions_tasks.LambdaInvoke",
+ "version": "2.161.0"
+ }
+ },
+ "temp": {
+ "id": "temp",
+ "path": "sqspstp-state-machine-enrichment/temp",
+ "children": {
+ "Role": {
+ "id": "Role",
+ "path": "sqspstp-state-machine-enrichment/temp/Role",
+ "children": {
+ "ImportRole": {
+ "id": "ImportRole",
+ "path": "sqspstp-state-machine-enrichment/temp/Role/ImportRole",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.Resource",
+ "version": "2.161.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-state-machine-enrichment/temp/Role/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::IAM::Role",
+ "aws:cdk:cloudformation:props": {
+ "assumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "states.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.CfnRole",
+ "version": "2.161.0"
+ }
+ },
+ "DefaultPolicy": {
+ "id": "DefaultPolicy",
+ "path": "sqspstp-state-machine-enrichment/temp/Role/DefaultPolicy",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-state-machine-enrichment/temp/Role/DefaultPolicy/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::IAM::Policy",
+ "aws:cdk:cloudformation:props": {
+ "policyDocument": {
+ "Statement": [
+ {
+ "Action": "lambda:InvokeFunction",
+ "Effect": "Allow",
+ "Resource": [
+ {
+ "Fn::GetAtt": [
+ "lambdatemp1CD2462E",
+ "Arn"
+ ]
+ },
+ {
+ "Fn::Join": [
+ "",
+ [
+ {
+ "Fn::GetAtt": [
+ "lambdatemp1CD2462E",
+ "Arn"
+ ]
+ },
+ ":*"
+ ]
+ ]
+ }
+ ]
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "policyName": "tempRoleDefaultPolicy6B471CA6",
+ "roles": [
+ {
+ "Ref": "tempRole0DF4072C"
+ }
+ ]
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.CfnPolicy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.Policy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.Role",
+ "version": "2.161.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-state-machine-enrichment/temp/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::StepFunctions::StateMachine",
+ "aws:cdk:cloudformation:props": {
+ "definitionString": {
+ "Fn::Join": [
+ "",
+ [
+ "{\"StartAt\":\"tasktemp\",\"States\":{\"tasktemp\":{\"End\":true,\"Retry\":[{\"ErrorEquals\":[\"Lambda.ClientExecutionTimeoutException\",\"Lambda.ServiceException\",\"Lambda.AWSLambdaException\",\"Lambda.SdkClientException\"],\"IntervalSeconds\":2,\"MaxAttempts\":6,\"BackoffRate\":2}],\"Type\":\"Task\",\"Resource\":\"arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":states:::lambda:invoke\",\"Parameters\":{\"FunctionName\":\"",
+ {
+ "Fn::GetAtt": [
+ "lambdatemp1CD2462E",
+ "Arn"
+ ]
+ },
+ "\",\"Payload.$\":\"$\"}}}}"
+ ]
+ ]
+ },
+ "roleArn": {
+ "Fn::GetAtt": [
+ "tempRole0DF4072C",
+ "Arn"
+ ]
+ },
+ "stateMachineType": "EXPRESS"
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_stepfunctions.CfnStateMachine",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_stepfunctions.StateMachine",
+ "version": "2.161.0"
+ }
+ },
+ "lambdas3stp-test": {
+ "id": "lambdas3stp-test",
+ "path": "sqspstp-state-machine-enrichment/lambdas3stp-test",
+ "children": {
+ "ServiceRole": {
+ "id": "ServiceRole",
+ "path": "sqspstp-state-machine-enrichment/lambdas3stp-test/ServiceRole",
+ "children": {
+ "ImportServiceRole": {
+ "id": "ImportServiceRole",
+ "path": "sqspstp-state-machine-enrichment/lambdas3stp-test/ServiceRole/ImportServiceRole",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.Resource",
+ "version": "2.161.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-state-machine-enrichment/lambdas3stp-test/ServiceRole/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::IAM::Role",
+ "aws:cdk:cloudformation:props": {
+ "assumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "lambda.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "managedPolicyArns": [
+ {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
+ ]
+ ]
+ }
+ ]
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.CfnRole",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.Role",
+ "version": "2.161.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-state-machine-enrichment/lambdas3stp-test/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::Lambda::Function",
+ "aws:cdk:cloudformation:props": {
+ "code": {
+ "zipFile": "exports.handler = async (event) => console.log(event)"
+ },
+ "handler": "index.handler",
+ "role": {
+ "Fn::GetAtt": [
+ "lambdas3stptestServiceRoleF17BB6C7",
+ "Arn"
+ ]
+ },
+ "runtime": "nodejs20.x"
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_lambda.CfnFunction",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_lambda.Function",
+ "version": "2.161.0"
+ }
+ },
+ "tasks3stp-test": {
+ "id": "tasks3stp-test",
+ "path": "sqspstp-state-machine-enrichment/tasks3stp-test",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_stepfunctions_tasks.LambdaInvoke",
+ "version": "2.161.0"
+ }
+ },
+ "test-sqs-pipes-states-construct": {
+ "id": "test-sqs-pipes-states-construct",
+ "path": "sqspstp-state-machine-enrichment/test-sqs-pipes-states-construct",
+ "children": {
+ "queue-dlq": {
+ "id": "queue-dlq",
+ "path": "sqspstp-state-machine-enrichment/test-sqs-pipes-states-construct/queue-dlq",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-state-machine-enrichment/test-sqs-pipes-states-construct/queue-dlq/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::SQS::Queue",
+ "aws:cdk:cloudformation:props": {
+ "kmsMasterKeyId": "alias/aws/sqs"
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.CfnQueue",
+ "version": "2.161.0"
+ }
+ },
+ "Policy": {
+ "id": "Policy",
+ "path": "sqspstp-state-machine-enrichment/test-sqs-pipes-states-construct/queue-dlq/Policy",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-state-machine-enrichment/test-sqs-pipes-states-construct/queue-dlq/Policy/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::SQS::QueuePolicy",
+ "aws:cdk:cloudformation:props": {
+ "policyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "sqs:AddPermission",
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes",
+ "sqs:ReceiveMessage",
+ "sqs:RemovePermission",
+ "sqs:SendMessage",
+ "sqs:SetQueueAttributes"
+ ],
+ "Effect": "Allow",
+ "Principal": {
+ "AWS": {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::",
+ {
+ "Ref": "AWS::AccountId"
+ },
+ ":root"
+ ]
+ ]
+ }
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueuedlq420A82FD",
+ "Arn"
+ ]
+ },
+ "Sid": "QueueOwnerOnlyAccess"
+ },
+ {
+ "Action": "SQS:*",
+ "Condition": {
+ "Bool": {
+ "aws:SecureTransport": "false"
+ }
+ },
+ "Effect": "Deny",
+ "Principal": {
+ "AWS": "*"
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueuedlq420A82FD",
+ "Arn"
+ ]
+ },
+ "Sid": "HttpsOnly"
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "queues": [
+ {
+ "Ref": "testsqspipesstatesconstructqueuedlq420A82FD"
+ }
+ ]
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.Queue",
+ "version": "2.161.0"
+ }
+ },
+ "queue": {
+ "id": "queue",
+ "path": "sqspstp-state-machine-enrichment/test-sqs-pipes-states-construct/queue",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-state-machine-enrichment/test-sqs-pipes-states-construct/queue/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::SQS::Queue",
+ "aws:cdk:cloudformation:props": {
+ "kmsMasterKeyId": "alias/aws/sqs",
+ "redrivePolicy": {
+ "deadLetterTargetArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueuedlq420A82FD",
+ "Arn"
+ ]
+ },
+ "maxReceiveCount": 15
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.CfnQueue",
+ "version": "2.161.0"
+ }
+ },
+ "Policy": {
+ "id": "Policy",
+ "path": "sqspstp-state-machine-enrichment/test-sqs-pipes-states-construct/queue/Policy",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-state-machine-enrichment/test-sqs-pipes-states-construct/queue/Policy/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::SQS::QueuePolicy",
+ "aws:cdk:cloudformation:props": {
+ "policyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "sqs:AddPermission",
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes",
+ "sqs:ReceiveMessage",
+ "sqs:RemovePermission",
+ "sqs:SendMessage",
+ "sqs:SetQueueAttributes"
+ ],
+ "Effect": "Allow",
+ "Principal": {
+ "AWS": {
+ "Fn::Join": [
+ "",
+ [
+ "arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":iam::",
+ {
+ "Ref": "AWS::AccountId"
+ },
+ ":root"
+ ]
+ ]
+ }
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ },
+ "Sid": "QueueOwnerOnlyAccess"
+ },
+ {
+ "Action": "SQS:*",
+ "Condition": {
+ "Bool": {
+ "aws:SecureTransport": "false"
+ }
+ },
+ "Effect": "Deny",
+ "Principal": {
+ "AWS": "*"
+ },
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ },
+ "Sid": "HttpsOnly"
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "queues": [
+ {
+ "Ref": "testsqspipesstatesconstructqueueA7C76715"
+ }
+ ]
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_sqs.Queue",
+ "version": "2.161.0"
+ }
+ },
+ "StateMachineLogGroup": {
+ "id": "StateMachineLogGroup",
+ "path": "sqspstp-state-machine-enrichment/test-sqs-pipes-states-construct/StateMachineLogGroup",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-state-machine-enrichment/test-sqs-pipes-states-construct/StateMachineLogGroup/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::Logs::LogGroup",
+ "aws:cdk:cloudformation:props": {
+ "logGroupName": {
+ "Fn::Join": [
+ "",
+ [
+ "/aws/vendedlogs/states/constructs/sqspstp-state-machine-enrichmenttest-sqs-pipes-states-constructStateMachineLog-",
+ {
+ "Fn::Select": [
+ 2,
+ {
+ "Fn::Split": [
+ "/",
+ {
+ "Ref": "AWS::StackId"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ ]
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_logs.LogGroup",
+ "version": "2.161.0"
+ }
+ },
+ "StateMachine": {
+ "id": "StateMachine",
+ "path": "sqspstp-state-machine-enrichment/test-sqs-pipes-states-construct/StateMachine",
+ "children": {
+ "Role": {
+ "id": "Role",
+ "path": "sqspstp-state-machine-enrichment/test-sqs-pipes-states-construct/StateMachine/Role",
+ "children": {
+ "ImportRole": {
+ "id": "ImportRole",
+ "path": "sqspstp-state-machine-enrichment/test-sqs-pipes-states-construct/StateMachine/Role/ImportRole",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.Resource",
+ "version": "2.161.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-state-machine-enrichment/test-sqs-pipes-states-construct/StateMachine/Role/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::IAM::Role",
+ "aws:cdk:cloudformation:props": {
+ "assumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "states.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.CfnRole",
+ "version": "2.161.0"
+ }
+ },
+ "DefaultPolicy": {
+ "id": "DefaultPolicy",
+ "path": "sqspstp-state-machine-enrichment/test-sqs-pipes-states-construct/StateMachine/Role/DefaultPolicy",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-state-machine-enrichment/test-sqs-pipes-states-construct/StateMachine/Role/DefaultPolicy/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::IAM::Policy",
+ "aws:cdk:cloudformation:props": {
+ "policyDocument": {
+ "Statement": [
+ {
+ "Action": "lambda:InvokeFunction",
+ "Effect": "Allow",
+ "Resource": [
+ {
+ "Fn::GetAtt": [
+ "lambdas3stptest9FBDC6CE",
+ "Arn"
+ ]
+ },
+ {
+ "Fn::Join": [
+ "",
+ [
+ {
+ "Fn::GetAtt": [
+ "lambdas3stptest9FBDC6CE",
+ "Arn"
+ ]
+ },
+ ":*"
+ ]
+ ]
+ }
+ ]
+ },
+ {
+ "Action": [
+ "logs:CreateLogDelivery",
+ "logs:DeleteLogDelivery",
+ "logs:DescribeLogGroups",
+ "logs:DescribeResourcePolicies",
+ "logs:GetLogDelivery",
+ "logs:ListLogDeliveries",
+ "logs:PutResourcePolicy",
+ "logs:UpdateLogDelivery"
+ ],
+ "Effect": "Allow",
+ "Resource": "*"
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "policyName": "testsqspipesstatesconstructStateMachineRoleDefaultPolicyD1BA2BF2",
+ "roles": [
+ {
+ "Ref": "testsqspipesstatesconstructStateMachineRoleBF97BFC0"
+ }
+ ]
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.CfnPolicy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.Policy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.Role",
+ "version": "2.161.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-state-machine-enrichment/test-sqs-pipes-states-construct/StateMachine/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::StepFunctions::StateMachine",
+ "aws:cdk:cloudformation:props": {
+ "definitionString": {
+ "Fn::Join": [
+ "",
+ [
+ "{\"StartAt\":\"tasks3stp-test\",\"States\":{\"tasks3stp-test\":{\"End\":true,\"Retry\":[{\"ErrorEquals\":[\"Lambda.ClientExecutionTimeoutException\",\"Lambda.ServiceException\",\"Lambda.AWSLambdaException\",\"Lambda.SdkClientException\"],\"IntervalSeconds\":2,\"MaxAttempts\":6,\"BackoffRate\":2}],\"Type\":\"Task\",\"Resource\":\"arn:",
+ {
+ "Ref": "AWS::Partition"
+ },
+ ":states:::lambda:invoke\",\"Parameters\":{\"FunctionName\":\"",
+ {
+ "Fn::GetAtt": [
+ "lambdas3stptest9FBDC6CE",
+ "Arn"
+ ]
+ },
+ "\",\"Payload.$\":\"$\"}}}}"
+ ]
+ ]
+ },
+ "loggingConfiguration": {
+ "destinations": [
+ {
+ "cloudWatchLogsLogGroup": {
+ "logGroupArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructStateMachineLogGroupADE94F1D",
+ "Arn"
+ ]
+ }
+ }
+ }
+ ],
+ "level": "ERROR"
+ },
+ "roleArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructStateMachineRoleBF97BFC0",
+ "Arn"
+ ]
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_stepfunctions.CfnStateMachine",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_stepfunctions.StateMachine",
+ "version": "2.161.0"
+ }
+ },
+ "ExecutionFailedAlarm": {
+ "id": "ExecutionFailedAlarm",
+ "path": "sqspstp-state-machine-enrichment/test-sqs-pipes-states-construct/ExecutionFailedAlarm",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-state-machine-enrichment/test-sqs-pipes-states-construct/ExecutionFailedAlarm/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::CloudWatch::Alarm",
+ "aws:cdk:cloudformation:props": {
+ "alarmDescription": "Alarm for the number of executions that failed exceeded the threshold of 1. ",
+ "comparisonOperator": "GreaterThanOrEqualToThreshold",
+ "dimensions": [
+ {
+ "name": "StateMachineArn",
+ "value": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "evaluationPeriods": 1,
+ "metricName": "ExecutionsFailed",
+ "namespace": "AWS/States",
+ "period": 300,
+ "statistic": "Sum",
+ "threshold": 1
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm",
+ "version": "2.161.0"
+ }
+ },
+ "ExecutionThrottledAlarm": {
+ "id": "ExecutionThrottledAlarm",
+ "path": "sqspstp-state-machine-enrichment/test-sqs-pipes-states-construct/ExecutionThrottledAlarm",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-state-machine-enrichment/test-sqs-pipes-states-construct/ExecutionThrottledAlarm/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::CloudWatch::Alarm",
+ "aws:cdk:cloudformation:props": {
+ "alarmDescription": "Alarm for the number of executions that throttled exceeded the threshold of 1. ",
+ "comparisonOperator": "GreaterThanOrEqualToThreshold",
+ "dimensions": [
+ {
+ "name": "StateMachineArn",
+ "value": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "evaluationPeriods": 1,
+ "metricName": "ExecutionThrottled",
+ "namespace": "AWS/States",
+ "period": 300,
+ "statistic": "Sum",
+ "threshold": 1
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm",
+ "version": "2.161.0"
+ }
+ },
+ "ExecutionAbortedAlarm": {
+ "id": "ExecutionAbortedAlarm",
+ "path": "sqspstp-state-machine-enrichment/test-sqs-pipes-states-construct/ExecutionAbortedAlarm",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-state-machine-enrichment/test-sqs-pipes-states-construct/ExecutionAbortedAlarm/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::CloudWatch::Alarm",
+ "aws:cdk:cloudformation:props": {
+ "alarmDescription": "Alarm for the number of executions that aborted exceeded the threshold of 1. ",
+ "comparisonOperator": "GreaterThanOrEqualToThreshold",
+ "dimensions": [
+ {
+ "name": "StateMachineArn",
+ "value": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "evaluationPeriods": 1,
+ "metricName": "ExecutionsAborted",
+ "namespace": "AWS/States",
+ "period": 300,
+ "statistic": "Maximum",
+ "threshold": 1
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm",
+ "version": "2.161.0"
+ }
+ },
+ "PipeRole--test-sqs-pipes-states-construct": {
+ "id": "PipeRole--test-sqs-pipes-states-construct",
+ "path": "sqspstp-state-machine-enrichment/test-sqs-pipes-states-construct/PipeRole--test-sqs-pipes-states-construct",
+ "children": {
+ "ImportPipeRole--test-sqs-pipes-states-construct": {
+ "id": "ImportPipeRole--test-sqs-pipes-states-construct",
+ "path": "sqspstp-state-machine-enrichment/test-sqs-pipes-states-construct/PipeRole--test-sqs-pipes-states-construct/ImportPipeRole--test-sqs-pipes-states-construct",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.Resource",
+ "version": "2.161.0"
+ }
+ },
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-state-machine-enrichment/test-sqs-pipes-states-construct/PipeRole--test-sqs-pipes-states-construct/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::IAM::Role",
+ "aws:cdk:cloudformation:props": {
+ "assumeRolePolicyDocument": {
+ "Statement": [
+ {
+ "Action": "sts:AssumeRole",
+ "Effect": "Allow",
+ "Principal": {
+ "Service": "pipes.amazonaws.com"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "policies": [
+ {
+ "policyName": "sourcePolicy",
+ "policyDocument": {
+ "Statement": [
+ {
+ "Action": [
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes",
+ "sqs:ReceiveMessage"
+ ],
+ "Effect": "Allow",
+ "Resource": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ }
+ },
+ {
+ "policyName": "targetPolicy",
+ "policyDocument": {
+ "Statement": [
+ {
+ "Action": "states:StartExecution",
+ "Effect": "Allow",
+ "Resource": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ }
+ }
+ ]
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.CfnRole",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.Role",
+ "version": "2.161.0"
+ }
+ },
+ "enrichmentpolicytest-sqs-pipes-states-construct": {
+ "id": "enrichmentpolicytest-sqs-pipes-states-construct",
+ "path": "sqspstp-state-machine-enrichment/test-sqs-pipes-states-construct/enrichmentpolicytest-sqs-pipes-states-construct",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-state-machine-enrichment/test-sqs-pipes-states-construct/enrichmentpolicytest-sqs-pipes-states-construct/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::IAM::Policy",
+ "aws:cdk:cloudformation:props": {
+ "policyDocument": {
+ "Statement": [
+ {
+ "Action": "states:StartSyncExecution",
+ "Effect": "Allow",
+ "Resource": {
+ "Ref": "temp3A4F7567"
+ }
+ }
+ ],
+ "Version": "2012-10-17"
+ },
+ "policyName": "testsqspipesstatesconstructenrichmentpolicytestsqspipesstatesconstructC752476A",
+ "roles": [
+ {
+ "Ref": "testsqspipesstatesconstructPipeRoletestsqspipesstatesconstruct2CC9A13C"
+ }
+ ]
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.CfnPolicy",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_iam.Policy",
+ "version": "2.161.0"
+ }
+ },
+ "LogGroup-test-sqs-pipes-states-construct": {
+ "id": "LogGroup-test-sqs-pipes-states-construct",
+ "path": "sqspstp-state-machine-enrichment/test-sqs-pipes-states-construct/LogGroup-test-sqs-pipes-states-construct",
+ "children": {
+ "Resource": {
+ "id": "Resource",
+ "path": "sqspstp-state-machine-enrichment/test-sqs-pipes-states-construct/LogGroup-test-sqs-pipes-states-construct/Resource",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::Logs::LogGroup",
+ "aws:cdk:cloudformation:props": {
+ "logGroupName": {
+ "Fn::Join": [
+ "",
+ [
+ "/aws/vendedlogs/pipes/constructs/sqspstp-state-machine-enrichmenttest-sqs-pipes-states-constructPipesLog-",
+ {
+ "Fn::Select": [
+ 2,
+ {
+ "Fn::Split": [
+ "/",
+ {
+ "Ref": "AWS::StackId"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ ]
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_logs.LogGroup",
+ "version": "2.161.0"
+ }
+ },
+ "pipe-test-sqs-pipes-states-construct": {
+ "id": "pipe-test-sqs-pipes-states-construct",
+ "path": "sqspstp-state-machine-enrichment/test-sqs-pipes-states-construct/pipe-test-sqs-pipes-states-construct",
+ "attributes": {
+ "aws:cdk:cloudformation:type": "AWS::Pipes::Pipe",
+ "aws:cdk:cloudformation:props": {
+ "enrichment": {
+ "Ref": "temp3A4F7567"
+ },
+ "logConfiguration": {
+ "cloudwatchLogsLogDestination": {
+ "logGroupArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructLogGrouptestsqspipesstatesconstructF827FE15",
+ "Arn"
+ ]
+ }
+ },
+ "level": "TRACE"
+ },
+ "roleArn": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructPipeRoletestsqspipesstatesconstruct2CC9A13C",
+ "Arn"
+ ]
+ },
+ "source": {
+ "Fn::GetAtt": [
+ "testsqspipesstatesconstructqueueA7C76715",
+ "Arn"
+ ]
+ },
+ "sourceParameters": {},
+ "target": {
+ "Ref": "testsqspipesstatesconstructStateMachine29272AA9"
+ },
+ "targetParameters": {
+ "stepFunctionStateMachineParameters": {
+ "invocationType": "FIRE_AND_FORGET"
+ }
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.aws_pipes.CfnPipe",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-solutions-constructs/aws-sqs-pipes-stepfunctions.SqsToPipesToStepfunctions",
+ "version": "2.72.0"
+ }
+ },
+ "Integ": {
+ "id": "Integ",
+ "path": "sqspstp-state-machine-enrichment/Integ",
+ "children": {
+ "DefaultTest": {
+ "id": "DefaultTest",
+ "path": "sqspstp-state-machine-enrichment/Integ/DefaultTest",
+ "children": {
+ "Default": {
+ "id": "Default",
+ "path": "sqspstp-state-machine-enrichment/Integ/DefaultTest/Default",
+ "constructInfo": {
+ "fqn": "constructs.Construct",
+ "version": "10.4.2"
+ }
+ },
+ "DeployAssert": {
+ "id": "DeployAssert",
+ "path": "sqspstp-state-machine-enrichment/Integ/DefaultTest/DeployAssert",
+ "children": {
+ "BootstrapVersion": {
+ "id": "BootstrapVersion",
+ "path": "sqspstp-state-machine-enrichment/Integ/DefaultTest/DeployAssert/BootstrapVersion",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.CfnParameter",
+ "version": "2.161.0"
+ }
+ },
+ "CheckBootstrapVersion": {
+ "id": "CheckBootstrapVersion",
+ "path": "sqspstp-state-machine-enrichment/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.CfnRule",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.Stack",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase",
+ "version": "2.161.0-alpha.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/integ-tests-alpha.IntegTest",
+ "version": "2.161.0-alpha.0"
+ }
+ },
+ "BootstrapVersion": {
+ "id": "BootstrapVersion",
+ "path": "sqspstp-state-machine-enrichment/BootstrapVersion",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.CfnParameter",
+ "version": "2.161.0"
+ }
+ },
+ "CheckBootstrapVersion": {
+ "id": "CheckBootstrapVersion",
+ "path": "sqspstp-state-machine-enrichment/CheckBootstrapVersion",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.CfnRule",
+ "version": "2.161.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.Stack",
+ "version": "2.161.0"
+ }
+ },
+ "Tree": {
+ "id": "Tree",
+ "path": "Tree",
+ "constructInfo": {
+ "fqn": "constructs.Construct",
+ "version": "10.4.2"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.App",
+ "version": "2.161.0"
+ }
+ }
+}
\ No newline at end of file
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-state-machine-enrichment.ts b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-state-machine-enrichment.ts
new file mode 100644
index 000000000..0b86a3df0
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/integ.sqspstp-state-machine-enrichment.ts
@@ -0,0 +1,40 @@
+/**
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
+ * with the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES
+ * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+
+/// !cdk-integ *
+import { App, Stack } from "aws-cdk-lib";
+import { SqsToPipesToStepfunctions, SqsToPipesToStepfunctionsProps } from "../lib";
+import { generateIntegStackName } from '@aws-solutions-constructs/core';
+import { IntegTest } from '@aws-cdk/integ-tests-alpha';
+import * as defaults from '@aws-solutions-constructs/core';
+import * as sfn from 'aws-cdk-lib/aws-stepfunctions';
+
+const app = new App();
+const stack = new Stack(app, generateIntegStackName(__filename));
+const enrichmentStateMachine = new sfn.StateMachine(stack, 'temp', {
+ stateMachineType: sfn.StateMachineType.EXPRESS,
+ definitionBody: defaults.CreateTestStateMachineDefinitionBody(stack, 'temp')
+});
+const props: SqsToPipesToStepfunctionsProps = {
+ stateMachineProps: {
+ definitionBody: defaults.CreateTestStateMachineDefinitionBody(stack, 's3stp-test')
+ },
+ enrichmentStateMachine,
+ logLevel: defaults.PipesLogLevel.TRACE
+};
+
+new SqsToPipesToStepfunctions(stack, 'test-sqs-pipes-states-construct', props);
+
+new IntegTest(stack, 'Integ', { testCases: [
+ stack
+] });
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/lambda/index.js b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/lambda/index.js
new file mode 100644
index 000000000..34d92af16
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/lambda/index.js
@@ -0,0 +1,9 @@
+exports.handler = async (event) => {
+ console.log(event);
+ const response = event.map((x) =>{
+ const body = JSON.parse(x.body);
+ body.newAttrib = "content";
+ return body;
+ });
+ return response;
+}
\ No newline at end of file
diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/sqs-pipes-stepfunctions.test.ts b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/sqs-pipes-stepfunctions.test.ts
new file mode 100644
index 000000000..9cbde4ec2
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/aws-sqs-pipes-stepfunctions/test/sqs-pipes-stepfunctions.test.ts
@@ -0,0 +1,425 @@
+/**
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
+ * with the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES
+ * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+
+import { Stack } from "aws-cdk-lib";
+import { SqsToPipesToStepfunctions, SqsToPipesToStepfunctionsProps } from "../lib";
+import { Match, Template } from 'aws-cdk-lib/assertions';
+import * as sqs from 'aws-cdk-lib/aws-sqs';
+import * as defaults from '@aws-solutions-constructs/core';
+import * as lambda from 'aws-cdk-lib/aws-lambda';
+import { RetentionDays } from "aws-cdk-lib/aws-logs";
+
+test('Test default behaviors', () => {
+ // Initial Setup
+ const stack = new Stack();
+ const props: SqsToPipesToStepfunctionsProps = {
+ stateMachineProps: {
+ definitionBody: defaults.CreateTestStateMachineDefinitionBody(stack, 'pipes-test')
+ }
+ };
+ const construct = new SqsToPipesToStepfunctions(stack, 'test-sqs-pipes-states', props);
+ const template = Template.fromStack(stack);
+
+ expect(construct.pipe).toBeDefined();
+ expect(construct.pipeRole).toBeDefined();
+
+ template.hasResourceProperties('AWS::IAM::Role', {
+ AssumeRolePolicyDocument: {
+ Statement: [
+ {
+ Action: "sts:AssumeRole",
+ Effect: "Allow",
+ Principal: {
+ Service: "pipes.amazonaws.com"
+ }
+ }
+ ],
+ Version: "2012-10-17"
+ },
+ Policies: [
+ {
+ PolicyDocument: {
+ Statement: [
+ {
+ Action: [
+ "sqs:ReceiveMessage",
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes"
+ ],
+ Effect: "Allow",
+ Resource: {
+ "Fn::GetAtt": [
+ Match.stringLikeRegexp(`testsqspipesstatesqueue.*`),
+ "Arn"
+ ]
+ }
+ }
+ ],
+ Version: "2012-10-17"
+ },
+ PolicyName: "sourcePolicy"
+ },
+ {
+ PolicyDocument: {
+ Statement: [
+ {
+ Action: "states:StartExecution",
+ Effect: "Allow",
+ Resource: {
+ Ref: Match.stringLikeRegexp(`testsqspipesstatesStateMachine.*`)
+ }
+ }
+ ],
+ Version: "2012-10-17"
+ },
+ PolicyName: "targetPolicy"
+ }
+ ]
+ });
+ template.hasResourceProperties('AWS::Pipes::Pipe', {
+ Source: {
+ "Fn::GetAtt": [
+ Match.stringLikeRegexp(`testsqspipesstatesqueue.*`),
+ "Arn"
+ ]
+ },
+ Target: {
+ Ref: Match.stringLikeRegexp(`testsqspipesstatesStateMachine.*`),
+ },
+ });
+
+ template.hasResourceProperties('AWS::Pipes::Pipe', {
+ LogConfiguration: {
+ CloudwatchLogsLogDestination: {
+ LogGroupArn: {
+ "Fn::GetAtt": [
+ Match.stringLikeRegexp(`testsqspipesstatesLogGrouptestsqspipesstates.*`),
+ "Arn"
+ ]
+ }
+ },
+ Level: "INFO"
+ }
+ });
+ template.hasResourceProperties('AWS::Logs::LogGroup', {
+ LogGroupName: {
+ "Fn::Join": [
+ "",
+ [
+ Match.stringLikeRegexp('\/aws\/vendedlogs\/pipes\/constructs'),
+ {
+ "Fn::Select": [
+ 2,
+ Match.anyValue()
+ ]
+ }
+ ]
+ ]
+ },
+ });
+
+});
+
+test('Test queue and state machine aspects of construct', () => {
+ // Initial Setup
+ const stack = new Stack();
+ const props: SqsToPipesToStepfunctionsProps = {
+ stateMachineProps: {
+ definitionBody: defaults.CreateTestStateMachineDefinitionBody(stack, 'lamstp-test')
+ }
+ };
+ const construct = new SqsToPipesToStepfunctions(stack, 'test-sqs-pipes-states', props);
+ const template = Template.fromStack(stack);
+
+ expect(construct.sqsQueue).toBeDefined();
+ expect(construct.deadLetterQueue).toBeDefined();
+ template.resourceCountIs("AWS::SQS::Queue", 2);
+ template.hasResourceProperties('AWS::SQS::Queue', {
+ KmsMasterKeyId: "alias/aws/sqs"
+ });
+
+ const stateMachine = construct.stateMachine;
+ expect(stateMachine).toBeDefined();
+ const cwAlarm = construct.cloudwatchAlarms;
+ expect(cwAlarm).toBeDefined();
+ expect(construct.stateMachineLogGroup).toBeDefined();
+});
+
+test('Test existing queue', () => {
+ const stack = new Stack();
+ const existingQueue = new sqs.Queue(stack, 'existing-queue', {});
+
+ const props: SqsToPipesToStepfunctionsProps = {
+ stateMachineProps: {
+ definitionBody: defaults.CreateTestStateMachineDefinitionBody(stack, 'lamstp-test')
+ },
+ existingQueueObj: existingQueue,
+ };
+ const construct = new SqsToPipesToStepfunctions(stack, 'test-sqs-pipes-states', props);
+ expect(construct.sqsQueue.queueArn).toEqual(existingQueue.queueArn);
+});
+
+test('Test filter', () => {
+ // Stack
+ const stack = new Stack();
+ const testFilterPattern = `{
+ "body": {
+ "state": ["open"]
+ }
+ }`;
+ const props: SqsToPipesToStepfunctionsProps = {
+ stateMachineProps: {
+ definitionBody: defaults.CreateTestStateMachineDefinitionBody(stack, 'lamstp-test')
+ },
+ pipeProps: {
+ sourceParameters: {
+ filterCriteria: {
+ filters: [{ pattern: testFilterPattern }],
+ },
+ }
+ }
+ };
+ new SqsToPipesToStepfunctions(stack, 'test-sqs-pipes-states', props);
+ const template = Template.fromStack(stack);
+ template.hasResourceProperties('AWS::Pipes::Pipe', {
+ SourceParameters: {
+ FilterCriteria: {
+ Filters: [
+ {
+ Pattern: testFilterPattern
+ }
+ ]
+ }
+ }
+ });
+
+});
+
+test('Test target parameters?', () => {
+ const testMessageGroupId = "test-id";
+ // Stack
+ const stack = new Stack();
+ const props: SqsToPipesToStepfunctionsProps = {
+ stateMachineProps: {
+ definitionBody: defaults.CreateTestStateMachineDefinitionBody(stack, 'lamstp-test')
+ },
+ pipeProps: {
+ // We realize that this would not launch because the target is not
+ // a queue, but it tests the functionality
+ targetParameters: {
+ sqsQueueParameters: {
+ messageGroupId: testMessageGroupId,
+ }
+ }
+ }
+ };
+ new SqsToPipesToStepfunctions(stack, 'test-sqs-pipes-states', props);
+ const template = Template.fromStack(stack);
+
+ template.hasResourceProperties('AWS::Pipes::Pipe', {
+ TargetParameters: {
+ SqsQueueParameters: {
+ MessageGroupId: testMessageGroupId,
+ }
+ }
+ });
+});
+
+test('test state machine enrichment', () => {
+ const stack = new Stack();
+ const enrichmentStateMachine = defaults.CreateTestStateMachine(stack, 'enrichment-state-machine');
+ const props: SqsToPipesToStepfunctionsProps = {
+ enrichmentStateMachine,
+ stateMachineProps: {
+ definitionBody: defaults.CreateTestStateMachineDefinitionBody(stack, 'pipes-test')
+ }
+ };
+ const construct = new SqsToPipesToStepfunctions(stack, 'test', props);
+
+ expect(construct.pipe).toBeDefined();
+ expect(construct.pipeRole).toBeDefined();
+
+ const template = Template.fromStack(stack);
+
+ // Look for additional enrichment permision
+ template.hasResourceProperties('AWS::IAM::Policy', {
+ PolicyDocument: {
+ Statement: [
+ {
+ Action: "states:StartSyncExecution",
+ Effect: "Allow",
+ Resource: {
+ Ref: Match.stringLikeRegexp('enrichmentstatemachine.*'),
+ }
+ }
+ ],
+ Version: "2012-10-17"
+ },
+ PolicyName: Match.stringLikeRegexp(`testenrichmentpolicytest.*`),
+ Roles: [
+ {
+ Ref: Match.stringLikeRegexp(`testPipeRoletest.*`)
+ }
+ ]
+ });
+ template.hasResourceProperties('AWS::Pipes::Pipe', {
+ Enrichment: {
+ Ref: Match.stringLikeRegexp("enrichmentstatemachine.*")
+ },
+ });
+});
+
+test('Test lambda function enrichment', () => {
+ const stack = new Stack();
+ const enrichmentFunction = new lambda.Function(stack, 'enrichment-function', {
+ runtime: lambda.Runtime.NODEJS_20_X,
+ handler: 'index.handler',
+ code: lambda.Code.fromInline(`exports.handler = async (event) => {return;}`)
+ });
+
+ const props: SqsToPipesToStepfunctionsProps = {
+ stateMachineProps: {
+ definitionBody: defaults.CreateTestStateMachineDefinitionBody(stack, 'pipes-test')
+ },
+ enrichmentFunction
+ };
+ const construct = new SqsToPipesToStepfunctions(stack, 'enrichment-function-test', props);
+ const template = Template.fromStack(stack);
+
+ expect(construct.pipe).toBeDefined();
+ expect(construct.pipeRole).toBeDefined();
+
+ template.hasResourceProperties('AWS::IAM::Policy', {
+ PolicyDocument: {
+ Statement: [
+ {
+ Action: "lambda:InvokeFunction",
+ Effect: "Allow",
+ Resource: {
+ "Fn::GetAtt": [
+ Match.stringLikeRegexp('enrichmentfunction.*'),
+ "Arn"
+ ]
+ }
+ }
+ ],
+ Version: "2012-10-17"
+ },
+ PolicyName: Match.stringLikeRegexp(`enrichmentfunctiontestenrichmentpolicyenrichmentfunctiontest.*`),
+ Roles: [
+ {
+ Ref: Match.stringLikeRegexp(`enrichmentfunctiontestPipeRoleenrichmentfunctiontest.*`)
+ }
+ ]
+ });
+ template.hasResourceProperties('AWS::Pipes::Pipe', {
+ Enrichment: {
+ "Fn::GetAtt": [
+ Match.stringLikeRegexp("enrichmentfunction.*"),
+ "Arn"
+ ]
+ },
+ });
+});
+
+test('Test custom log level', () => {
+ const stack = new Stack();
+ const props: SqsToPipesToStepfunctionsProps = {
+ stateMachineProps: {
+ definitionBody: defaults.CreateTestStateMachineDefinitionBody(stack, 'pipes-test')
+ },
+ logLevel: defaults.PipesLogLevel.TRACE
+ };
+ const construct = new SqsToPipesToStepfunctions(stack, 'test-sqs-pipes-states', props);
+ const template = Template.fromStack(stack);
+
+ expect(construct.pipe).toBeDefined();
+ expect(construct.pipeRole).toBeDefined();
+
+ template.hasResourceProperties('AWS::Pipes::Pipe', {
+ LogConfiguration: {
+ Level: "TRACE",
+ }
+ });
+});
+
+test('Test log level OFF', () => {
+ const stack = new Stack();
+ const props: SqsToPipesToStepfunctionsProps = {
+ stateMachineProps: {
+ definitionBody: defaults.CreateTestStateMachineDefinitionBody(stack, 'pipes-test')
+ },
+ logLevel: defaults.PipesLogLevel.OFF
+ };
+ const construct = new SqsToPipesToStepfunctions(stack, 'test-sqs-pipes-states', props);
+ const template = Template.fromStack(stack);
+
+ expect(construct.pipe).toBeDefined();
+ expect(construct.pipeRole).toBeDefined();
+
+ // Should be no LogConfiguration
+ template.resourcePropertiesCountIs('AWS::Pipes::Pipe', { LogConfiguration: {}}, 0);
+
+ // One log group for the state machine, none for the pipe
+ template.resourceCountIs('AWS::Logs::LogGroup', 1);
+});
+
+test('Test custom pipe log props', () => {
+ const testRetention = RetentionDays.FOUR_MONTHS;
+ const stack = new Stack();
+ const props: SqsToPipesToStepfunctionsProps = {
+ stateMachineProps: {
+ definitionBody: defaults.CreateTestStateMachineDefinitionBody(stack, 'pipes-test')
+ },
+ pipeLogProps: {
+ retention: testRetention
+ }
+ };
+ const construct = new SqsToPipesToStepfunctions(stack, 'test-sqs-pipes-states', props);
+ const template = Template.fromStack(stack);
+
+ expect(construct.pipe).toBeDefined();
+ expect(construct.pipeRole).toBeDefined();
+ template.hasResourceProperties('AWS::Logs::LogGroup', {
+ RetentionInDays: 120,
+ });
+});
+
+test('Test setting source parameters like batchSize', () => {
+ const testBatchSize = 123;
+ const stack = new Stack();
+ const props: SqsToPipesToStepfunctionsProps = {
+ stateMachineProps: {
+ definitionBody: defaults.CreateTestStateMachineDefinitionBody(stack, 'pipes-test')
+ },
+ pipeProps: {
+ sourceParameters: {
+ sqsQueueParameters: {
+ batchSize: testBatchSize,
+ },
+ }
+ }
+ };
+ const construct = new SqsToPipesToStepfunctions(stack, 'test-sqs-pipes-states', props);
+ const template = Template.fromStack(stack);
+
+ expect(construct.pipe).toBeDefined();
+ expect(construct.pipeRole).toBeDefined();
+ template.hasResourceProperties('AWS::Pipes::Pipe', {
+ SourceParameters: {
+ SqsQueueParameters: {
+ BatchSize: testBatchSize,
+ }
+ }
+ });
+});
diff --git a/source/patterns/@aws-solutions-constructs/core/index.ts b/source/patterns/@aws-solutions-constructs/core/index.ts
index 91c64d30e..de29701ad 100644
--- a/source/patterns/@aws-solutions-constructs/core/index.ts
+++ b/source/patterns/@aws-solutions-constructs/core/index.ts
@@ -75,3 +75,5 @@ export * from './lib/opensearch-helper';
export * from './lib/kendra-helper';
export * from './lib/websocket-api-defaults';
export * from './lib/websocket-api-helper';
+export * from './lib/pipes-defaults';
+export * from './lib/pipes-helper';
diff --git a/source/patterns/@aws-solutions-constructs/core/lib/apigateway-defaults.ts b/source/patterns/@aws-solutions-constructs/core/lib/apigateway-defaults.ts
index 0cd63b322..392aea98e 100644
--- a/source/patterns/@aws-solutions-constructs/core/lib/apigateway-defaults.ts
+++ b/source/patterns/@aws-solutions-constructs/core/lib/apigateway-defaults.ts
@@ -21,7 +21,7 @@ import { IntegrationResponse } from 'aws-cdk-lib/aws-apigateway';
import * as lambda from 'aws-cdk-lib/aws-lambda';
import { LogGroup } from 'aws-cdk-lib/aws-logs';
import { Construct } from 'constructs';
-import { generatePhysicalName } from './utils';
+import { generatePhysicalRestApiName } from './utils';
/**
* Private function to configure an api.RestApiProps
@@ -124,7 +124,7 @@ export function DefaultSpecRestApiProps(scope: Construct, logGroup: LogGroup): a
dataTraceEnabled: false,
tracingEnabled: true
},
- restApiName: generatePhysicalName("", [ scope.node.id ], 255),
+ restApiName: generatePhysicalRestApiName("", [ scope.node.id ]),
};
}
diff --git a/source/patterns/@aws-solutions-constructs/core/lib/cloudfront-distribution-helper.ts b/source/patterns/@aws-solutions-constructs/core/lib/cloudfront-distribution-helper.ts
index 4a0f9e178..53a7b0336 100644
--- a/source/patterns/@aws-solutions-constructs/core/lib/cloudfront-distribution-helper.ts
+++ b/source/patterns/@aws-solutions-constructs/core/lib/cloudfront-distribution-helper.ts
@@ -26,7 +26,7 @@ import {
DefaultCloudFrontWebDistributionForApiGatewayProps,
DefaultCloudFrontDistributionForMediaStoreProps
} from './cloudfront-distribution-defaults';
-import { addCfnSuppressRules, consolidateProps, generatePhysicalName } from './utils';
+import { addCfnSuppressRules, consolidateProps, generatePhysicalOacName } from './utils';
import { createCloudFrontLoggingBucket } from './s3-bucket-helper';
import { DefaultS3Props } from './s3-bucket-defaults';
import { S3OacOrigin } from './s3-oac-origin';
@@ -145,7 +145,7 @@ export function createCloudFrontDistributionForS3(
if (!props.sourceBucket.isWebsite) {
originAccessControl = new cloudfront.CfnOriginAccessControl(scope, 'CloudFrontOac', {
originAccessControlConfig: {
- name: generatePhysicalName('aws-cloudfront-s3-', [id], 64),
+ name: generatePhysicalOacName('aws-cloudfront-s3-', [id]),
originAccessControlOriginType: 's3',
signingBehavior: 'always',
signingProtocol: 'sigv4',
diff --git a/source/patterns/@aws-solutions-constructs/core/lib/kendra-defaults.ts b/source/patterns/@aws-solutions-constructs/core/lib/kendra-defaults.ts
index 9901947bc..62088c5c4 100644
--- a/source/patterns/@aws-solutions-constructs/core/lib/kendra-defaults.ts
+++ b/source/patterns/@aws-solutions-constructs/core/lib/kendra-defaults.ts
@@ -12,14 +12,14 @@
*/
import * as kendra from 'aws-cdk-lib/aws-kendra';
-import { generatePhysicalName } from "./utils";
+import { generatePhysicalKendraIndexName } from "./utils";
/**
* @internal This is an internal core function and should not be called directly by Solutions Constructs clients.
*/
export function DefaultKendraIndexProps(id: string, roleArn?: string): kendra.CfnIndexProps {
return {
- name: generatePhysicalName("", ["KendraIndex", id], 1000),
+ name: generatePhysicalKendraIndexName("", ["KendraIndex", id]),
roleArn,
edition: 'DEVELOPER_EDITION',
} as kendra.CfnIndexProps;
diff --git a/source/patterns/@aws-solutions-constructs/core/lib/kendra-helper.ts b/source/patterns/@aws-solutions-constructs/core/lib/kendra-helper.ts
index 3606975ef..4edd5f590 100644
--- a/source/patterns/@aws-solutions-constructs/core/lib/kendra-helper.ts
+++ b/source/patterns/@aws-solutions-constructs/core/lib/kendra-helper.ts
@@ -18,7 +18,7 @@
import * as kendra from 'aws-cdk-lib/aws-kendra';
import * as iam from 'aws-cdk-lib/aws-iam';
-import { addCfnGuardSuppressRules, addCfnSuppressRules, consolidateProps, generatePhysicalName, overrideProps } from "./utils";
+import { addCfnGuardSuppressRules, addCfnSuppressRules, consolidateProps, generatePhysicalKendraIndexName, overrideProps } from "./utils";
import { Aws } from 'aws-cdk-lib';
// Note: To ensure CDKv2 compatibility, keep the import statement for Construct separate
@@ -126,7 +126,7 @@ function CreateS3DataSource(scope: Construct,
// Put bucket name in default props
let defaultProps: kendra.CfnDataSourceProps = {
indexId: targetIndex.ref,
- name: generatePhysicalName('', ['s3-datasource', id], 1000),
+ name: generatePhysicalKendraIndexName('', ['s3-datasource', id]),
type: 'S3'
};
diff --git a/source/patterns/@aws-solutions-constructs/core/lib/pipes-defaults.ts b/source/patterns/@aws-solutions-constructs/core/lib/pipes-defaults.ts
new file mode 100644
index 000000000..bb920e31d
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/core/lib/pipes-defaults.ts
@@ -0,0 +1,31 @@
+/**
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
+ * with the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES
+ * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+
+// import * as pipes from 'aws-cdk-lib/aws-pipes';
+
+export function defaultPipesProps(): any {
+ return {};
+}
+
+export function defaultSqsSourceProps(): any {
+ return {
+ };
+}
+
+export function defaultStateMachineTargetProps(): any {
+ return {
+ stepFunctionStateMachineParameters: {
+ invocationType: 'FIRE_AND_FORGET'
+ }
+ };
+}
diff --git a/source/patterns/@aws-solutions-constructs/core/lib/pipes-helper.ts b/source/patterns/@aws-solutions-constructs/core/lib/pipes-helper.ts
new file mode 100644
index 000000000..ec95b5cf8
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/core/lib/pipes-helper.ts
@@ -0,0 +1,257 @@
+/**
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
+ * with the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES
+ * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+
+import * as pipes from 'aws-cdk-lib/aws-pipes';
+import * as sqs from 'aws-cdk-lib/aws-sqs';
+import * as iam from 'aws-cdk-lib/aws-iam';
+import * as logs from 'aws-cdk-lib/aws-logs';
+import * as lambda from 'aws-cdk-lib/aws-lambda';
+import * as sfn from 'aws-cdk-lib/aws-stepfunctions';
+import * as defaults from "..";
+import * as cdk from 'aws-cdk-lib';
+import { Construct } from 'constructs';
+
+export enum PipesLogLevel {
+ OFF = "OFF",
+ TRACE = "TRACE",
+ INFO = "INFO",
+ ERROR = "ERROR",
+}
+
+export interface CreateSourceResponse {
+ readonly sourceParameters: pipes.CfnPipe.PipeSourceParametersProperty,
+ readonly sourceArn: string,
+ readonly sourcePolicy: iam.PolicyDocument
+}
+
+export interface BuildPipesProps {
+ readonly source: CreateSourceResponse,
+ readonly target: CreateTargetResponse,
+ readonly enrichmentFunction?: lambda.Function,
+ readonly enrichmentStateMachine?: sfn.StateMachine,
+ readonly clientProps?: any | pipes.CfnPipeProps
+ readonly logLevel?: PipesLogLevel,
+ readonly pipeLogProps?: logs.LogGroupProps
+}
+
+export interface BuildPipesResponse {
+ readonly pipe: pipes.CfnPipe,
+ readonly pipeRole: iam.Role
+}
+
+export function BuildPipe(scope: Construct, id: string, props: BuildPipesProps): BuildPipesResponse {
+ CheckBuildPipeProps(props);
+
+ const pipeRole = new iam.Role(scope, `PipeRole--${id}`, {
+ assumedBy: new iam.ServicePrincipal('pipes.amazonaws.com'),
+ inlinePolicies: {
+ sourcePolicy: props.source.sourcePolicy,
+ targetPolicy: props.target.targetPolicy,
+ },
+ });
+
+ // At this point we have the minimum values for CfnPipeProps - let's
+ // create it and fold in any additional values as we go along
+ let constructProps: pipes.CfnPipeProps = {
+ roleArn: pipeRole.roleArn,
+ source: props.source.sourceArn,
+ target: props.target.targetArn,
+ sourceParameters: props.source.sourceParameters,
+ targetParameters: props.target.targetParameters,
+ };
+
+ // Do we have any enrichment functionality?
+ if (props.enrichmentFunction) {
+ const enrichmentSettings = createLambdaEnrichment(scope, id, props.enrichmentFunction);
+ pipeRole.attachInlinePolicy(enrichmentSettings.pipeRolePolicy);
+ constructProps = defaults.consolidateProps(constructProps, { enrichment: enrichmentSettings.enrichmentArn });
+ } else if (props.enrichmentStateMachine) {
+ const enrichmentSettings = createStateMachineEnrichment(scope, id, props.enrichmentStateMachine);
+ pipeRole.attachInlinePolicy(enrichmentSettings.pipeRolePolicy);
+ constructProps = defaults.consolidateProps(constructProps, { enrichment: enrichmentSettings.enrichmentArn });
+ }
+
+ // Are we responsible to create the logging mechanism?
+ if (!props.clientProps?.logConfiguration) {
+
+ const logLevel = defaults.CheckStringWithDefault(props.logLevel, PipesLogLevel.INFO);
+ if (logLevel !== PipesLogLevel.OFF) {
+
+ const defaultLogGroupProps = {
+ logGroupName: createPipesLogGroupName(scope, id),
+ };
+ const consolidatedLogGroupProps = defaults.consolidateProps(defaultLogGroupProps, props.pipeLogProps);
+ const newLogGroup = defaults.buildLogGroup(scope, `LogGroup-${id}`, consolidatedLogGroupProps);
+ const logConfiguration = {
+ cloudwatchLogsLogDestination: {
+ logGroupArn: newLogGroup.logGroupArn
+ },
+ level: logLevel
+ };
+
+ constructProps = defaults.consolidateProps(constructProps, {
+ logConfiguration,
+ });
+ }
+ }
+
+ const consolidateProps = defaults.consolidateProps(defaults.defaultPipesProps(), props.clientProps, constructProps);
+
+ const newPipe = new pipes.CfnPipe(scope, `pipe-${id}`, consolidateProps);
+
+ return {
+ pipe: newPipe,
+ pipeRole
+ };
+}
+
+interface CreateEnrichmentResponse {
+ readonly enrichmentArn: string,
+ readonly pipeRolePolicy: iam.Policy
+}
+
+function createLambdaEnrichment(scope: Construct, id: string, lambdaFunction: lambda.Function): CreateEnrichmentResponse {
+ return {
+ enrichmentArn: lambdaFunction.functionArn,
+ pipeRolePolicy: new iam.Policy(scope, `enrichmentpolicy${id}`, {
+ statements: [
+ new iam.PolicyStatement({
+ resources: [lambdaFunction.functionArn],
+ actions: ['lambda:InvokeFunction'],
+ effect: iam.Effect.ALLOW,
+ })
+ ]
+ })
+ };
+}
+
+function createStateMachineEnrichment(scope: Construct, id: string, stateMachine: sfn.StateMachine): CreateEnrichmentResponse {
+ return {
+ enrichmentArn: stateMachine.stateMachineArn,
+ pipeRolePolicy: new iam.Policy(scope, `enrichmentpolicy${id}`, {
+ statements: [
+ new iam.PolicyStatement({
+ resources: [stateMachine.stateMachineArn],
+ actions: ['states:StartSyncExecution'],
+ effect: iam.Effect.ALLOW,
+ })
+ ]
+ })
+ };
+}
+
+function createPipesLogGroupName(scope: Construct, id: string): string {
+ const logGroupPrefix = '/aws/vendedlogs/pipes/constructs/';
+ const nameParts: string[] = [
+ cdk.Stack.of(scope).stackName,
+ id,
+ 'PipesLog'
+ ];
+ return defaults.generatePhysicalLogGroupName(logGroupPrefix, nameParts);
+}
+
+// ==========================
+// Source and Target code - as new sources and targets are required, implement them
+// here and test the new functions.
+
+export function CreateSqsSource(queue: sqs.IQueue, clientProps?: pipes.CfnPipe.PipeSourceParametersProperty | cdk.IResolvable): CreateSourceResponse {
+ const sourceParameters: pipes.CfnPipe.PipeSourceParametersProperty = defaults.consolidateProps(defaults.defaultSqsSourceProps(), clientProps);
+ return {
+ sourceParameters,
+ sourceArn: queue.queueArn,
+ sourcePolicy: new iam.PolicyDocument({
+ statements: [
+ new iam.PolicyStatement({
+ resources: [queue.queueArn!],
+ actions: [
+ "sqs:ReceiveMessage",
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes",
+ ],
+ effect: iam.Effect.ALLOW,
+ })
+ ]
+ })
+ };
+}
+
+export interface CreateTargetResponse {
+ readonly targetParameters: pipes.CfnPipe.PipeTargetParametersProperty,
+ readonly targetArn: string,
+ readonly targetPolicy: iam.PolicyDocument
+}
+
+export function CreateStateMachineTarget(stateMachine: sfn.IStateMachine,
+ clientProps?: pipes.CfnPipe.PipeTargetParametersProperty | cdk.IResolvable): CreateTargetResponse {
+
+ const targetParameters: pipes.CfnPipe.PipeTargetParametersProperty =
+ defaults.consolidateProps(defaults.defaultStateMachineTargetProps(), clientProps);
+ return {
+ targetParameters,
+ targetArn: stateMachine.stateMachineArn,
+ targetPolicy: new iam.PolicyDocument({
+ statements: [
+ new iam.PolicyStatement({
+ resources: [stateMachine.stateMachineArn],
+ actions: ['states:StartExecution'],
+ effect: iam.Effect.ALLOW,
+ }),
+ ],
+ })
+ };
+}
+
+// This is called by BuildPipe to validate arguments sent to BuildPipe
+function CheckBuildPipeProps(props: BuildPipesProps) {
+ if (props.enrichmentFunction && props.enrichmentStateMachine) {
+ throw new Error("ERROR - Only one of enrichmentFunction or enrichmentStateMachine can be provided");
+ }
+
+ if (props.clientProps && (props.clientProps.source || props.clientProps.target || props.clientProps.roleArn || props.clientProps.enrichment)) {
+ throw new Error("ERROR - BuildPipeProps cannot specify source, target, roleArn, or enrichment");
+ }
+
+ if (props.logLevel && props.clientProps?.logConfiguration) {
+ throw new Error('ERROR - BuildPipeProps cannot specify logLevel and logConfiguration');
+ }
+ if (props.pipeLogProps && props.clientProps?.logConfiguration) {
+ throw new Error('ERROR - BuildPipeProps cannot specify pipeLogProps and logConfiguration');
+ }
+ if (props.pipeLogProps && (props.logLevel === PipesLogLevel.OFF)) {
+ throw new Error('ERROR - BuildPipeProps cannot specify pipeLogProps and log level OFF');
+ }
+}
+
+export interface PipesProps {
+ readonly pipesProps?: pipes.CfnPipeProps
+}
+
+// This is called by constructs to validate inputs to the construct
+export function CheckPipesProps(propsObject: PipesProps | any) {
+ let errorMessages = '';
+ let errorFound = false;
+
+ if (propsObject.pipesProps?.source) {
+ errorMessages += 'Do not set source in pipesProps. It is set by the construct.\n';
+ errorFound = true;
+ }
+
+ if (propsObject.pipesProps?.target) {
+ errorMessages += 'Do not set target in pipesProps. It is set by the construct.\n';
+ errorFound = true;
+ }
+
+ if (errorFound) {
+ throw new Error(errorMessages);
+ }
+}
diff --git a/source/patterns/@aws-solutions-constructs/core/lib/step-function-helper.ts b/source/patterns/@aws-solutions-constructs/core/lib/step-function-helper.ts
index fdbd51100..9d2854e4b 100644
--- a/source/patterns/@aws-solutions-constructs/core/lib/step-function-helper.ts
+++ b/source/patterns/@aws-solutions-constructs/core/lib/step-function-helper.ts
@@ -21,7 +21,7 @@ import * as logs from 'aws-cdk-lib/aws-logs';
import * as cdk from 'aws-cdk-lib';
import * as smDefaults from './step-function-defaults';
import * as sfn from 'aws-cdk-lib/aws-stepfunctions';
-import { overrideProps, addCfnSuppressRules, generatePhysicalName } from './utils';
+import { overrideProps, addCfnSuppressRules, generatePhysicalLogGroupName } from './utils';
import * as iam from 'aws-cdk-lib/aws-iam';
import * as cloudwatch from 'aws-cdk-lib/aws-cloudwatch';
import { buildLogGroup } from './cloudwatch-log-group-helper';
@@ -75,17 +75,15 @@ export function buildStateMachine(scope: Construct, id: string | undefined, prop
consolidatedLogGroupProps = {};
}
- const maxLogGroupNameLength = 255;
if (!consolidatedLogGroupProps?.logGroupName) {
const logGroupPrefix = '/aws/vendedlogs/states/constructs/';
- const maxGeneratedNameLength = maxLogGroupNameLength - logGroupPrefix.length;
const nameParts: string[] = [
cdk.Stack.of(scope).stackName, // Name of the stack
id ?? scope.node.id, // Use the ID from client if provided, otherwise use the construct ID
'StateMachineLog' // Literal string for log group name portion
];
- const logGroupName = generatePhysicalName(logGroupPrefix, nameParts, maxGeneratedNameLength);
+ const logGroupName = generatePhysicalLogGroupName(logGroupPrefix, nameParts);
consolidatedLogGroupProps = overrideProps(consolidatedLogGroupProps, { logGroupName });
}
diff --git a/source/patterns/@aws-solutions-constructs/core/lib/utils.ts b/source/patterns/@aws-solutions-constructs/core/lib/utils.ts
index 78212cdad..3311f4982 100644
--- a/source/patterns/@aws-solutions-constructs/core/lib/utils.ts
+++ b/source/patterns/@aws-solutions-constructs/core/lib/utils.ts
@@ -138,6 +138,34 @@ export function generateResourceName(
return finalName.toLowerCase();
}
+export function generatePhysicalLogGroupName(
+ prefix: string,
+ parts: string[]
+): string {
+ return generatePhysicalName(prefix, parts, 255 - prefix.length);
+}
+
+export function generatePhysicalRestApiName(
+ prefix: string,
+ parts: string[]
+): string {
+ return generatePhysicalName(prefix, parts, 255);
+}
+
+export function generatePhysicalOacName(
+ prefix: string,
+ parts: string[]
+): string {
+ return generatePhysicalName(prefix, parts, 64);
+}
+
+export function generatePhysicalKendraIndexName(
+ prefix: string,
+ parts: string[]
+): string {
+ return generatePhysicalName(prefix, parts, 1000);
+}
+
/**
* @internal This is an internal core function and should not be called directly by Solutions Constructs clients.
*
@@ -317,4 +345,12 @@ export function CheckBooleanWithDefault(value: boolean | undefined, defaultValue
} else {
return value;
}
+}
+
+export function CheckStringWithDefault(value: string | undefined, defaultValue: string): string {
+ if (value === undefined) {
+ return defaultValue;
+ } else {
+ return value;
+ }
}
\ No newline at end of file
diff --git a/source/patterns/@aws-solutions-constructs/core/test/pipes-helper.test.ts b/source/patterns/@aws-solutions-constructs/core/test/pipes-helper.test.ts
new file mode 100644
index 000000000..82122c621
--- /dev/null
+++ b/source/patterns/@aws-solutions-constructs/core/test/pipes-helper.test.ts
@@ -0,0 +1,811 @@
+/**
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
+ * with the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES
+ * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+
+import { buildQueue } from "../lib/sqs-helper";
+import { buildStateMachine } from "../lib/step-function-helper";
+import { Stack } from "aws-cdk-lib";
+import * as defaults from '../';
+import * as pipes from 'aws-cdk-lib/aws-pipes';
+import * as lambda from 'aws-cdk-lib/aws-lambda';
+import * as sfn from 'aws-cdk-lib/aws-stepfunctions';
+import * as s3 from 'aws-cdk-lib/aws-s3';
+import { Match, Template } from "aws-cdk-lib/assertions";
+import { RetentionDays } from "aws-cdk-lib/aws-logs";
+
+// =================================
+// Test sources and targets generation
+// =================================
+
+test('Create a default SQS Source', () => {
+ // Stack
+ const stack = new Stack();
+
+ const buildQueueResponse = buildQueue(stack, 'test-queue', {});
+ const sqsSource = defaults.CreateSqsSource(buildQueueResponse.queue);
+
+ expect(sqsSource.sourceArn).toEqual(buildQueueResponse.queue.queueArn);
+ expect(Object.keys(sqsSource.sourceParameters).length).toEqual(0);
+ // best we can do here, confirm values when we instantiate the actual pipe
+ expect(sqsSource.sourcePolicy.statementCount).toEqual(1);
+ Template.fromStack(stack);
+});
+
+test('Create an SQS Source with overrides', () => {
+ // Stack
+ const stack = new Stack();
+
+ const buildQueueResponse = buildQueue(stack, 'test-queue', {});
+ const sqsSource = defaults.CreateSqsSource(buildQueueResponse.queue, {
+ sqsQueueParameters: {
+ batchSize: 123,
+ },
+ });
+
+ expect(sqsSource.sourceArn).toEqual(buildQueueResponse.queue.queueArn);
+ // Because sqsQueueParameters type include 'IResolvable |', we need to extract the property this way
+ const batchSizeProp =
+ (sqsSource.sourceParameters.sqsQueueParameters as pipes.CfnPipe.PipeSourceSqsQueueParametersProperty)!.batchSize;
+ expect(batchSizeProp).toEqual(123);
+ // best we can do here, confirm values when we instantiate the actual pipe
+ expect(sqsSource.sourcePolicy.statementCount).toEqual(1);
+});
+
+test('Create a default Step Functions Target', () => {
+
+ // Stack
+ const stack = new Stack();
+
+ const buildStateMachineResponse = buildStateMachine(stack, 'test-state-machine', {
+ stateMachineProps: {
+ definitionBody: defaults.CreateTestStateMachineDefinitionBody(stack, 'stub-state-machine')
+ }
+ });
+ const stateMachineTarget = defaults.CreateStateMachineTarget(buildStateMachineResponse.stateMachine);
+
+ expect(stateMachineTarget.targetArn).toEqual(buildStateMachineResponse.stateMachine.stateMachineArn);
+ expect(stateMachineTarget.targetParameters.stepFunctionStateMachineParameters).toBeDefined();
+ const invocationType: string | undefined =
+ (stateMachineTarget.targetParameters.stepFunctionStateMachineParameters as pipes.CfnPipe.PipeTargetStateMachineParametersProperty).invocationType;
+ expect(invocationType).toEqual('FIRE_AND_FORGET');
+ expect(Object.keys(stateMachineTarget.targetParameters).length).toEqual(1);
+ // best we can do here, confirm values when we instantiate the actual pipe
+ expect(stateMachineTarget.targetPolicy.statementCount).toEqual(1);
+ Template.fromStack(stack);
+
+});
+
+test('Create a Step Functions Target with overrides', () => {
+
+ // Stack
+ const stack = new Stack();
+
+ const buildStateMachineResponse = buildStateMachine(stack, 'test-state-machine', {
+ stateMachineProps: {
+ definitionBody: defaults.CreateTestStateMachineDefinitionBody(stack, 'stub-state-machine')
+ }
+ });
+ const stateMachineTarget = defaults.CreateStateMachineTarget(buildStateMachineResponse.stateMachine, {
+ stepFunctionStateMachineParameters: {
+ invocationType: 'REQUEST_RESPONSE'
+ }
+ });
+
+ expect(stateMachineTarget.targetArn).toEqual(buildStateMachineResponse.stateMachine.stateMachineArn);
+ expect(stateMachineTarget.targetParameters.stepFunctionStateMachineParameters).toBeDefined();
+ const invocationType: string | undefined =
+ (stateMachineTarget.targetParameters.stepFunctionStateMachineParameters as pipes.CfnPipe.PipeTargetStateMachineParametersProperty).invocationType;
+ expect(invocationType).toEqual('REQUEST_RESPONSE');
+ expect(Object.keys(stateMachineTarget.targetParameters).length).toEqual(1);
+ // best we can do here, confirm values when we instantiate the actual pipe
+ expect(stateMachineTarget.targetPolicy.statementCount).toEqual(1);
+});
+
+// =================================
+// Test pipe creation
+// =================================
+
+test('Create a default pipe', () => {
+ const prerequisiteId = 'alldefault';
+ const pipeId = 'defaultpipe';
+
+ // Stack
+ const stack = new Stack();
+ const prerequisites = CreatePrerequisites(stack, prerequisiteId);
+
+ const pipeResponse = defaults.BuildPipe(stack, pipeId, {
+ source: prerequisites.source,
+ target: prerequisites.target,
+ clientProps: {}
+ });
+
+ CheckPipeResponseProperties(pipeResponse, prerequisites);
+
+ const template = Template.fromStack(stack);
+ template.resourceCountIs('AWS::Pipes::Pipe', 1);
+ CheckPipeResource(template, pipeId, prerequisiteId);
+ CheckPipeRole(template, prerequisiteId);
+ CheckLogGroup(template);
+});
+
+test('Create a pipe with overrides', () => {
+ const prerequisiteId = 'overridestest';
+ const pipeId = 'overridespipe';
+ // Stack
+ const stack = new Stack();
+ const prerequisites = CreatePrerequisites(stack, prerequisiteId);
+
+ const testDescription = 'test-description';
+ const pipeResponse = defaults.BuildPipe(stack, pipeId, {
+ source: prerequisites.source,
+ target: prerequisites.target,
+ clientProps: {
+ description: testDescription
+ }
+ });
+ CheckPipeResponseProperties(pipeResponse, prerequisites);
+
+ const template = Template.fromStack(stack);
+ CheckPipeResource(template, pipeId, prerequisiteId);
+ CheckPipeRole(template, prerequisiteId);
+ CheckLogGroup(template);
+
+ // The description is unique to this test, so check it here
+ template.hasResourceProperties('AWS::Pipes::Pipe', {
+ Description: testDescription
+ });
+
+});
+
+test('Create a pipe with a filter', () => {
+ const prerequisiteId = 'filtertest';
+ const pipeId = 'filterpipe';
+
+ // Stack
+ const stack = new Stack();
+ const prerequisites = CreatePrerequisites(stack, prerequisiteId);
+
+ const testFilterPattern = `{
+ "body": {
+ "state": ["open"]
+ }
+ }`;
+
+ const pipeResponse = defaults.BuildPipe(stack, pipeId, {
+ source: prerequisites.source,
+ target: prerequisites.target,
+ clientProps: {
+ sourceParameters: {
+ filterCriteria: {
+ filters: [{ pattern: testFilterPattern }],
+ },
+ }
+ },
+ });
+ CheckPipeResponseProperties(pipeResponse, prerequisites);
+
+ const template = Template.fromStack(stack);
+ CheckPipeResource(template, pipeId, prerequisiteId);
+ CheckPipeRole(template, prerequisiteId);
+ CheckLogGroup(template);
+
+ // SourceParameters is unique to this test, so check it here
+ template.hasResourceProperties('AWS::Pipes::Pipe', {
+ SourceParameters: {
+ FilterCriteria: {
+ Filters: [
+ {
+ Pattern: testFilterPattern
+ }
+ ]
+ }
+ }
+ });
+});
+
+test('Create a pipe with Lambda function enrichment', () => {
+ const prerequisiteId = 'lambdaenrichtest';
+ const pipeId = 'lambdaenrichpipe';
+
+ // Stack
+ const stack = new Stack();
+ const prerequisites = CreatePrerequisites(stack, prerequisiteId);
+
+ const enrichmentFunction = new lambda.Function(stack, 'enrichment-function', {
+ code: lambda.Code.fromAsset(`${__dirname}/lambda-test`),
+ handler: "index.handler",
+ runtime: lambda.Runtime.NODEJS_20_X,
+ });
+
+ const pipeResponse = defaults.BuildPipe(stack, pipeId, {
+ source: prerequisites.source,
+ target: prerequisites.target,
+ enrichmentFunction
+ });
+ CheckPipeResponseProperties(pipeResponse, prerequisites);
+
+ const template = Template.fromStack(stack);
+ template.resourceCountIs('AWS::Pipes::Pipe', 1);
+ CheckPipeResource(template, pipeId, prerequisiteId);
+ CheckLogGroup(template);
+
+ // Enrichment is unique to this test so check it here
+ template.hasResourceProperties('AWS::Pipes::Pipe', {
+ Enrichment: {
+ "Fn::GetAtt": [
+ Match.stringLikeRegexp('enrichmentfunction.*'),
+ "Arn"
+ ]
+ },
+ });
+ // This checks for everything but enrichment
+ CheckPipeRole(template, prerequisiteId);
+ // This checks for enrichment permissions
+ template.hasResourceProperties('AWS::IAM::Policy', {
+ PolicyDocument: {
+ Statement: [
+ {
+ Action: "lambda:InvokeFunction",
+ Effect: "Allow",
+ Resource: {
+ "Fn::GetAtt": [
+ Match.stringLikeRegexp('enrichmentfunction.*'),
+ "Arn"
+ ]
+ }
+ }
+ ],
+ Version: "2012-10-17"
+ },
+ PolicyName: Match.stringLikeRegexp(`enrichmentpolicy${pipeId}.*`),
+ Roles: [
+ {
+ Ref: Match.stringLikeRegexp(`PipeRole${pipeId}.*`)
+ }
+ ]
+ });
+});
+
+test('Create a pipe with state machine enrichment', () => {
+ const prerequisiteId = 'smenrichtest';
+ const pipeId = 'smenrichpipe';
+
+ // Stack
+ const stack = new Stack();
+ const prerequisites = CreatePrerequisites(stack, prerequisiteId);
+
+ const enrichmentStateMachine = defaults.CreateTestStateMachine(stack, 'state-machine-enrichment');
+
+ const pipeResponse = defaults.BuildPipe(stack, pipeId, {
+ source: prerequisites.source,
+ target: prerequisites.target,
+ enrichmentStateMachine
+ });
+ CheckPipeResponseProperties(pipeResponse, prerequisites);
+
+ const template = Template.fromStack(stack);
+ template.resourceCountIs('AWS::Pipes::Pipe', 1);
+ CheckPipeResource(template, pipeId, prerequisiteId);
+ CheckPipeRole(template, prerequisiteId);
+ CheckLogGroup(template);
+
+ // Look for additional enrichment permision
+ template.hasResourceProperties('AWS::IAM::Policy', {
+ PolicyDocument: {
+ Statement: [
+ {
+ // This won't run if we actually launched it as the enrichmentStateMachine is not EXPRESS
+ Action: "states:StartSyncExecution",
+ Effect: "Allow",
+ Resource: {
+ Ref: Match.stringLikeRegexp('statemachineenrichment.*'),
+ }
+ }
+ ],
+ Version: "2012-10-17"
+ },
+ PolicyName: Match.stringLikeRegexp(`enrichmentpolicy${pipeId}.*`),
+ Roles: [
+ {
+ Ref: Match.stringLikeRegexp(`PipeRole${pipeId}.*`)
+ }
+ ]
+ });
+ template.hasResourceProperties('AWS::Pipes::Pipe', {
+ Enrichment: {
+ Ref: Match.stringLikeRegexp("statemachineenrichment.*")
+ },
+ });
+});
+
+test('Provide replacement LogConfiguration', () => {
+ const prerequisiteId = 'logconfigtest';
+ const pipeId = 'logconfigpipe';
+
+ // Stack
+ const stack = new Stack();
+ const prerequisites = CreatePrerequisites(stack, prerequisiteId);
+
+ const customLogConfiguration: pipes.CfnPipe.PipeLogConfigurationProperty = {
+ s3LogDestination: {
+ bucketName: new s3.Bucket(stack, 'test').bucketName,
+ },
+ level: defaults.PipesLogLevel.ERROR
+ };
+ const pipeResponse = defaults.BuildPipe(stack, pipeId, {
+ source: prerequisites.source,
+ target: prerequisites.target,
+ clientProps: {
+ logConfiguration: customLogConfiguration
+ }
+ });
+ CheckPipeResponseProperties(pipeResponse, prerequisites);
+
+ const template = Template.fromStack(stack);
+ CheckPipeSourceAndTarget(template, prerequisiteId);
+
+ template.hasResourceProperties('AWS::Pipes::Pipe', {
+ LogConfiguration: {
+ Level: "ERROR",
+ S3LogDestination: {
+ BucketName: {
+ Ref: Match.stringLikeRegexp("test.*")
+ }
+ }
+ }
+ });
+
+ template.resourceCountIs('AWS::Pipes::Pipe', 1);
+ CheckPipeRole(template, prerequisiteId);
+});
+
+test('Override the default log level', () => {
+ const prerequisiteId = 'loglevelttest';
+ const pipeId = 'loglevelpipe';
+
+ // Stack
+ const stack = new Stack();
+ const prerequisites = CreatePrerequisites(stack, prerequisiteId);
+
+ const pipeResponse = defaults.BuildPipe(stack, pipeId, {
+ source: prerequisites.source,
+ target: prerequisites.target,
+ logLevel: defaults.PipesLogLevel.ERROR
+ });
+ CheckPipeResponseProperties(pipeResponse, prerequisites);
+
+ const template = Template.fromStack(stack);
+ template.resourceCountIs('AWS::Pipes::Pipe', 1);
+ CheckPipeResource(template, pipeId, prerequisiteId);
+ CheckPipeRole(template, prerequisiteId);
+ CheckLogGroup(template);
+
+ // Level is unique to this test
+ template.hasResourceProperties('AWS::Pipes::Pipe', {
+ LogConfiguration: {
+ Level: defaults.PipesLogLevel.ERROR,
+ }
+ });
+});
+
+test('Test no logging', () => {
+ const prerequisiteId = 'nologs';
+ const pipeId = 'testpipe';
+
+ // Stack
+ const stack = new Stack();
+ const prerequisites = CreatePrerequisites(stack, prerequisiteId);
+
+ const pipeResponse = defaults.BuildPipe(stack, pipeId, {
+ source: prerequisites.source,
+ target: prerequisites.target,
+ logLevel: defaults.PipesLogLevel.OFF
+ });
+ CheckPipeResponseProperties(pipeResponse, prerequisites);
+
+ const template = Template.fromStack(stack);
+ template.resourceCountIs('AWS::Pipes::Pipe', 1);
+ CheckPipeSourceAndTarget(template, prerequisiteId);
+ CheckPipeRole(template, prerequisiteId);
+
+ // One log group for the state machine, none for the pipe
+ template.resourceCountIs('AWS::Logs::LogGroup', 1);
+});
+
+test('Override a subset of SQS source paramters', () => {
+ const prerequisiteId = 'srcparamtest';
+ const pipeId = 'srcparampipe';
+ const testBatchSize = 7;
+
+ // Stack
+ const stack = new Stack();
+ const prerequisites = CreatePrerequisites(stack, prerequisiteId);
+
+ const pipeResponse = defaults.BuildPipe(stack, pipeId, {
+ source: prerequisites.source,
+ target: prerequisites.target,
+ clientProps: {
+ sourceParameters: {
+ sqsQueueParameters: {
+ batchSize: testBatchSize,
+ }
+ }
+ }
+ });
+
+ CheckPipeResponseProperties(pipeResponse, prerequisites);
+
+ const template = Template.fromStack(stack);
+ template.resourceCountIs('AWS::Pipes::Pipe', 1);
+ CheckPipeResource(template, pipeId, prerequisiteId);
+ CheckPipeRole(template, prerequisiteId);
+ CheckLogGroup(template);
+
+ template.resourceCountIs('AWS::Pipes::Pipe', 1);
+ template.hasResourceProperties('AWS::Pipes::Pipe', {
+ SourceParameters: {
+ SqsQueueParameters: {
+ BatchSize: testBatchSize
+ }
+ },
+ });
+});
+
+test('Provide pipeLogProps', () => {
+ const prerequisiteId = 'pipelogpropstest';
+ const pipeId = 'pipelogpropspipe';
+ // While this is an enum we need to use, in the template
+ // it is converted to days, in this case 120
+ const testRetention = RetentionDays.FOUR_MONTHS;
+
+ // Stack
+ const stack = new Stack();
+ const prerequisites = CreatePrerequisites(stack, prerequisiteId);
+
+ const pipeResponse = defaults.BuildPipe(stack, pipeId, {
+ source: prerequisites.source,
+ target: prerequisites.target,
+ pipeLogProps: {
+ retention: testRetention
+ }
+ });
+
+ CheckPipeResponseProperties(pipeResponse, prerequisites);
+
+ const template = Template.fromStack(stack);
+ template.resourceCountIs('AWS::Pipes::Pipe', 1);
+ CheckPipeResource(template, pipeId, prerequisiteId);
+ CheckPipeRole(template, prerequisiteId);
+ CheckLogGroup(template);
+ CheckPipeLogConfiguration(template, pipeId);
+
+ // Look for additional property we passed in pipeLogProps
+ template.hasResourceProperties('AWS::Logs::LogGroup', {
+ RetentionInDays: 120,
+ });
+});
+
+test('Check for error when providing source in CfnProps', () => {
+ // Stack
+ const stack = new Stack();
+ const prerequisites = CreatePrerequisites(stack, 'log-level-test');
+
+ const app = () => {
+ defaults.BuildPipe(stack, 'test-pipe', {
+ source: prerequisites.source,
+ target: prerequisites.target,
+ clientProps: {
+ source: prerequisites.source.sourceArn
+ }
+ });
+ };
+ // Assertion
+ expect(app).toThrowError('ERROR - BuildPipeProps cannot specify source, target, roleArn, or enrichment');
+});
+
+test('Check for error when providing target in CfnProps', () => {
+ // Stack
+ const stack = new Stack();
+ const prerequisites = CreatePrerequisites(stack, 'log-level-test');
+
+ const app = () => {
+ defaults.BuildPipe(stack, 'test-pipe', {
+ source: prerequisites.source,
+ target: prerequisites.target,
+ clientProps: {
+ target: prerequisites.target.targetArn,
+ }
+ });
+ };
+ // Assertion
+ expect(app).toThrowError('ERROR - BuildPipeProps cannot specify source, target, roleArn, or enrichment');
+});
+
+test('Check for error when providing a roleArn', () => {
+ // Stack
+ const stack = new Stack();
+ const prerequisites = CreatePrerequisites(stack, 'log-level-test');
+
+ const app = () => {
+ defaults.BuildPipe(stack, 'test-pipe', {
+ source: prerequisites.source,
+ target: prerequisites.target,
+ clientProps: {
+ roleArn: "some-arn",
+ }
+ });
+ };
+ // Assertion
+ expect(app).toThrowError('ERROR - BuildPipeProps cannot specify source, target, roleArn, or enrichment');
+});
+
+test('Check for error when providing enrichment', () => {
+ // Stack
+ const stack = new Stack();
+ const prerequisites = CreatePrerequisites(stack, 'log-level-test');
+
+ const app = () => {
+ defaults.BuildPipe(stack, 'test-pipe', {
+ source: prerequisites.source,
+ target: prerequisites.target,
+ clientProps: {
+ enrichment: "functionArn",
+ }
+ });
+ };
+ // Assertion
+ expect(app).toThrowError('ERROR - BuildPipeProps cannot specify source, target, roleArn, or enrichment');
+});
+
+test('Check for error when log level and log configuration are both provided', () => {
+ // Stack
+ const stack = new Stack();
+ const prerequisites = CreatePrerequisites(stack, 'log-level-test');
+
+ const app = () => {
+ defaults.BuildPipe(stack, 'test-pipe', {
+ source: prerequisites.source,
+ target: prerequisites.target,
+ logLevel: defaults.PipesLogLevel.ERROR,
+ clientProps: {
+ logConfiguration: { some: "object" },
+ }
+ });
+ };
+ // Assertion
+ expect(app).toThrowError('ERROR - BuildPipeProps cannot specify logLevel and logConfiguration');
+});
+
+test('Check for error when pipeLogProps and log configuration are both provided', () => {
+ // Stack
+ const stack = new Stack();
+ const prerequisites = CreatePrerequisites(stack, 'log-level-test');
+
+ const app = () => {
+ defaults.BuildPipe(stack, 'test-pipe', {
+ source: prerequisites.source,
+ target: prerequisites.target,
+ pipeLogProps: { logGroupName: "anyvalue" },
+ clientProps: {
+ logConfiguration: { some: "object" },
+ }
+ });
+ };
+ // Assertion
+ expect(app).toThrowError('ERROR - BuildPipeProps cannot specify pipeLogProps and logConfiguration');
+});
+
+test('Check for error when enrichmentFunction and enrichmentStateMachine are both provided', () => {
+ // Stack
+ const stack = new Stack();
+ const prerequisites = CreatePrerequisites(stack, 'log-level-test');
+
+ const app = () => {
+ defaults.BuildPipe(stack, 'test-pipe', {
+ source: prerequisites.source,
+ target: prerequisites.target,
+ enrichmentFunction: { place: "holder" } as unknown as lambda.Function,
+ enrichmentStateMachine: { place: "holder" } as unknown as sfn.StateMachine
+ });
+ };
+ // Assertion
+ expect(app).toThrowError('ERROR - Only one of enrichmentFunction or enrichmentStateMachine can be provided');
+});
+
+test('Check for error when pipeLogProps and log level is set to OFF', () => {
+ // Stack
+ const stack = new Stack();
+ const prerequisites = CreatePrerequisites(stack, 'log-level-test');
+
+ const app = () => {
+ defaults.BuildPipe(stack, 'test-pipe', {
+ source: prerequisites.source,
+ target: prerequisites.target,
+ logLevel: defaults.PipesLogLevel.OFF,
+ pipeLogProps: { logGroupName: "anyvalue" },
+ });
+ };
+ // Assertion
+ expect(app).toThrowError('ERROR - BuildPipeProps cannot specify pipeLogProps and log level OFF');
+});
+
+test('Test all of CheckPipesProps', () => {
+ const app = () => {
+ defaults.CheckPipesProps({
+ pipesProps: { source: "value" },
+ });
+ };
+ // Assertion
+ expect(app).toThrowError('Do not set source in pipesProps. It is set by the construct.\n');
+
+ const appTwo = () => {
+ defaults.CheckPipesProps({
+ pipesProps: { target: "value" },
+ });
+ };
+ // Assertion
+ expect(appTwo).toThrowError('Do not set target in pipesProps. It is set by the construct.\n');
+
+});
+
+// ==============================
+// Shared setup function
+// ==============================
+
+interface Prerequisites {
+ source: defaults.CreateSourceResponse,
+ target: defaults.CreateTargetResponse,
+}
+
+function CreatePrerequisites(scope: Stack, id: string): Prerequisites {
+ const buildQueueResponse = buildQueue(scope, `${id}-source-queue`, {});
+ const sqsSource = defaults.CreateSqsSource(buildQueueResponse.queue);
+
+ const buildStateMachineResponse = buildStateMachine(scope, `${id}-target-state-machine`, {
+ stateMachineProps: {
+ definitionBody: defaults.CreateTestStateMachineDefinitionBody(scope, `${id}-steps`)
+ }
+ });
+ const stateMachineTarget = defaults.CreateStateMachineTarget(buildStateMachineResponse.stateMachine, {
+ stepFunctionStateMachineParameters: {
+ invocationType: 'REQUEST_RESPONSE'
+ }
+ });
+ return {
+ source: sqsSource,
+ target: stateMachineTarget
+ };
+}
+
+// ==============================
+// Shared functions that check default settings
+// ==============================
+
+function CheckPipeResponseProperties(pipeResponse: defaults.BuildPipesResponse, prerequisites: Prerequisites) {
+ expect(pipeResponse.pipe).toBeDefined();
+ expect(pipeResponse.pipe.source).toEqual(prerequisites.source.sourceArn);
+ expect(pipeResponse.pipe.target).toEqual(prerequisites.target.targetArn);
+ expect(pipeResponse.pipeRole).toBeDefined();
+ expect(pipeResponse.pipeRole.node).toBeDefined();
+}
+
+function CheckPipeResource(template: Template,
+ pipeId: string,
+ prerequisiteId: string
+) {
+ CheckPipeSourceAndTarget(template, prerequisiteId);
+ CheckPipeLogConfiguration(template, pipeId);
+}
+
+function CheckPipeSourceAndTarget(template: Template, prerequisiteId: string) {
+ template.hasResourceProperties('AWS::Pipes::Pipe', {
+ Source: {
+ "Fn::GetAtt": [
+ Match.stringLikeRegexp(`${prerequisiteId}sourcequeue.*`),
+ "Arn"
+ ]
+ },
+ Target: {
+ Ref: Match.stringLikeRegexp(`StateMachine${prerequisiteId}targetstatemachine.*`),
+ },
+ });
+}
+
+function CheckPipeLogConfiguration(template: Template, pipeId: string) {
+ template.hasResourceProperties('AWS::Pipes::Pipe', {
+ LogConfiguration: {
+ CloudwatchLogsLogDestination: {
+ LogGroupArn: {
+ "Fn::GetAtt": [
+ Match.stringLikeRegexp(`LogGroup${pipeId}.*`),
+ "Arn"
+ ]
+ }
+ }
+ }
+ });
+}
+
+function CheckPipeRole(template: Template, prerequisiteId: string) {
+ template.hasResourceProperties('AWS::IAM::Role', {
+ AssumeRolePolicyDocument: {
+ Statement: [
+ {
+ Action: "sts:AssumeRole",
+ Effect: "Allow",
+ Principal: {
+ Service: "pipes.amazonaws.com"
+ }
+ }
+ ],
+ Version: "2012-10-17"
+ },
+ Policies: [
+ {
+ PolicyDocument: {
+ Statement: [
+ {
+ Action: [
+ "sqs:ReceiveMessage",
+ "sqs:DeleteMessage",
+ "sqs:GetQueueAttributes"
+ ],
+ Effect: "Allow",
+ Resource: {
+ "Fn::GetAtt": [
+ Match.stringLikeRegexp(`${prerequisiteId}sourcequeue.*`),
+ "Arn"
+ ]
+ }
+ }
+ ],
+ Version: "2012-10-17"
+ },
+ PolicyName: "sourcePolicy"
+ },
+ {
+ PolicyDocument: {
+ Statement: [
+ {
+ Action: "states:StartExecution",
+ Effect: "Allow",
+ Resource: {
+ Ref: Match.stringLikeRegexp(`StateMachine${prerequisiteId}targetstatemachine.*`)
+ }
+ }
+ ],
+ Version: "2012-10-17"
+ },
+ PolicyName: "targetPolicy"
+ }
+ ]
+ });
+}
+
+function CheckLogGroup(template: Template) {
+ template.hasResourceProperties('AWS::Logs::LogGroup', {
+ LogGroupName: {
+ "Fn::Join": [
+ "",
+ [
+ Match.stringLikeRegexp('\/aws\/vendedlogs\/pipes\/constructs'),
+ {
+ "Fn::Select": [
+ 2,
+ Match.anyValue()
+ ]
+ }
+ ]
+ ]
+ },
+ });
+}
\ No newline at end of file
diff --git a/source/patterns/@aws-solutions-constructs/core/test/test-helper.ts b/source/patterns/@aws-solutions-constructs/core/test/test-helper.ts
index cc4f0f6e8..1ffbb1900 100644
--- a/source/patterns/@aws-solutions-constructs/core/test/test-helper.ts
+++ b/source/patterns/@aws-solutions-constructs/core/test/test-helper.ts
@@ -115,7 +115,12 @@ export function getFakeCertificate(scope: Construct, id: string): acm.ICertifica
);
}
-// Creates a bucket used for testing - minimal properties, destroyed after test
+export function CreateTestStateMachine(scope: Construct, id: string): sfn.StateMachine {
+ return new sfn.StateMachine(scope, id, {
+ definitionBody: defaults.CreateTestStateMachineDefinitionBody(scope, id)
+ });
+}
+
export function CreateTestStateMachineDefinitionBody(scope: Construct, id: string): sfn.DefinitionBody {
const smStep = new lambda.Function(scope, `lambda${id}`, {
diff --git a/source/patterns/@aws-solutions-constructs/core/test/utils.test.ts b/source/patterns/@aws-solutions-constructs/core/test/utils.test.ts
index 9d3df1502..2931e1512 100644
--- a/source/patterns/@aws-solutions-constructs/core/test/utils.test.ts
+++ b/source/patterns/@aws-solutions-constructs/core/test/utils.test.ts
@@ -329,6 +329,19 @@ test('CheckBooleanWithDefault', () => {
expect(response).toBe(false);
});
+test('CheckStringWithDefault', () => {
+ let response;
+ const value = 'testValue';
+ const defaultValue = 'default';
+
+ response = defaults.CheckStringWithDefault(undefined, defaultValue);
+ expect(response).toBe(defaultValue);
+
+ response = defaults.CheckStringWithDefault(value, defaultValue);
+ expect(response).toBe(value);
+
+});
+
test('test addCfnGuardSuppressRules', () => {
const stack = new Stack();