@aws-solutions-constructs/aws-eventbridge-sqs 2.75.0 → 2.77.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/.jsii +189 -34
  2. package/README.md +5 -0
  3. package/lib/index.d.ts +27 -0
  4. package/lib/index.js +26 -10
  5. package/package.json +7 -6
  6. package/test/eventbridge-sqs-queue.test.js +142 -3
  7. package/test/integ.evtsqs-custom-target.d.ts +13 -0
  8. package/test/integ.evtsqs-custom-target.js +36 -0
  9. package/test/integ.evtsqs-custom-target.js.snapshot/cdk.out +1 -0
  10. package/test/integ.evtsqs-custom-target.js.snapshot/evtsqs-custom-target.assets.json +19 -0
  11. package/test/integ.evtsqs-custom-target.js.snapshot/evtsqs-custom-target.template.json +312 -0
  12. package/test/integ.evtsqs-custom-target.js.snapshot/evtsqscustomtargetIntegDefaultTestDeployAssertD220243E.assets.json +19 -0
  13. package/test/integ.evtsqs-custom-target.js.snapshot/evtsqscustomtargetIntegDefaultTestDeployAssertD220243E.template.json +36 -0
  14. package/test/integ.evtsqs-custom-target.js.snapshot/integ.json +12 -0
  15. package/test/integ.evtsqs-custom-target.js.snapshot/manifest.json +149 -0
  16. package/test/integ.evtsqs-custom-target.js.snapshot/tree.json +487 -0
  17. package/test/integ.evtsqs-exist-bus.js.snapshot/cdk.out +1 -1
  18. package/test/integ.evtsqs-exist-bus.js.snapshot/evtsqs-exist-bus.assets.json +3 -3
  19. package/test/integ.evtsqs-exist-bus.js.snapshot/evtsqs-exist-bus.template.json +15 -6
  20. package/test/integ.evtsqs-exist-bus.js.snapshot/evtsqsexistbusIntegDefaultTestDeployAssertD6166996.assets.json +1 -1
  21. package/test/integ.evtsqs-exist-bus.js.snapshot/integ.json +1 -1
  22. package/test/integ.evtsqs-exist-bus.js.snapshot/manifest.json +2 -2
  23. package/test/integ.evtsqs-exist-bus.js.snapshot/tree.json +38 -29
  24. package/test/integ.evtsqs-exist-queue.js.snapshot/cdk.out +1 -1
  25. package/test/integ.evtsqs-exist-queue.js.snapshot/evtsqs-exist-queue.assets.json +3 -3
  26. package/test/integ.evtsqs-exist-queue.js.snapshot/evtsqs-exist-queue.template.json +15 -6
  27. package/test/integ.evtsqs-exist-queue.js.snapshot/evtsqsexistqueueIntegDefaultTestDeployAssert4E2D04AB.assets.json +1 -1
  28. package/test/integ.evtsqs-exist-queue.js.snapshot/integ.json +1 -1
  29. package/test/integ.evtsqs-exist-queue.js.snapshot/manifest.json +2 -2
  30. package/test/integ.evtsqs-exist-queue.js.snapshot/tree.json +36 -27
  31. package/test/integ.evtsqs-new-bus.js.snapshot/cdk.out +1 -1
  32. package/test/integ.evtsqs-new-bus.js.snapshot/evtsqs-new-bus.assets.json +3 -3
  33. package/test/integ.evtsqs-new-bus.js.snapshot/evtsqs-new-bus.template.json +15 -6
  34. package/test/integ.evtsqs-new-bus.js.snapshot/evtsqsnewbusIntegDefaultTestDeployAssertA45AD5F2.assets.json +1 -1
  35. package/test/integ.evtsqs-new-bus.js.snapshot/integ.json +1 -1
  36. package/test/integ.evtsqs-new-bus.js.snapshot/manifest.json +2 -20
  37. package/test/integ.evtsqs-new-bus.js.snapshot/tree.json +42 -33
  38. package/test/integ.evtsqs-no-arg.js.snapshot/cdk.out +1 -1
  39. package/test/integ.evtsqs-no-arg.js.snapshot/evtsqs-no-arg.assets.json +3 -3
  40. package/test/integ.evtsqs-no-arg.js.snapshot/evtsqs-no-arg.template.json +15 -6
  41. package/test/integ.evtsqs-no-arg.js.snapshot/evtsqsnoargIntegDefaultTestDeployAssertB5DFB718.assets.json +1 -1
  42. package/test/integ.evtsqs-no-arg.js.snapshot/integ.json +1 -1
  43. package/test/integ.evtsqs-no-arg.js.snapshot/manifest.json +2 -20
  44. package/test/integ.evtsqs-no-arg.js.snapshot/tree.json +40 -31
  45. package/test/integ.evtsqs-rule-dlq.d.ts +13 -0
  46. package/test/integ.evtsqs-rule-dlq.js +36 -0
  47. package/test/integ.evtsqs-rule-dlq.js.snapshot/cdk.out +1 -0
  48. package/test/integ.evtsqs-rule-dlq.js.snapshot/evtsqs-rule-dlq.assets.json +19 -0
  49. package/test/integ.evtsqs-rule-dlq.js.snapshot/evtsqs-rule-dlq.template.json +485 -0
  50. package/test/integ.evtsqs-rule-dlq.js.snapshot/evtsqsruledlqIntegDefaultTestDeployAssertE0D1E1C2.assets.json +19 -0
  51. package/test/integ.evtsqs-rule-dlq.js.snapshot/evtsqsruledlqIntegDefaultTestDeployAssertE0D1E1C2.template.json +36 -0
  52. package/test/integ.evtsqs-rule-dlq.js.snapshot/integ.json +12 -0
  53. package/test/integ.evtsqs-rule-dlq.js.snapshot/manifest.json +179 -0
  54. package/test/integ.evtsqs-rule-dlq.js.snapshot/tree.json +728 -0
package/.jsii CHANGED
@@ -8,8 +8,8 @@
8
8
  "url": "https://aws.amazon.com"
9
9
  },
10
10
  "dependencies": {
11
- "@aws-solutions-constructs/core": "2.75.0",
12
- "aws-cdk-lib": "^2.163.1",
11
+ "@aws-solutions-constructs/core": "2.77.0",
12
+ "aws-cdk-lib": "^2.177.0",
13
13
  "constructs": "^10.0.0"
14
14
  },
15
15
  "dependencyClosure": {
@@ -1045,6 +1045,19 @@
1045
1045
  }
1046
1046
  }
1047
1047
  },
1048
+ "aws-cdk-lib.aws_connectcampaignsv2": {
1049
+ "targets": {
1050
+ "dotnet": {
1051
+ "package": "Amazon.CDK.AWS.ConnectCampaignsV2"
1052
+ },
1053
+ "java": {
1054
+ "package": "software.amazon.awscdk.services.connectcampaignsv2"
1055
+ },
1056
+ "python": {
1057
+ "module": "aws_cdk.aws_connectcampaignsv2"
1058
+ }
1059
+ }
1060
+ },
1048
1061
  "aws-cdk-lib.aws_controltower": {
1049
1062
  "targets": {
1050
1063
  "dotnet": {
@@ -1864,29 +1877,29 @@
1864
1877
  }
1865
1878
  }
1866
1879
  },
1867
- "aws-cdk-lib.aws_iot": {
1880
+ "aws-cdk-lib.aws_invoicing": {
1868
1881
  "targets": {
1869
1882
  "dotnet": {
1870
- "namespace": "Amazon.CDK.AWS.IoT"
1883
+ "package": "Amazon.CDK.AWS.Invoicing"
1871
1884
  },
1872
1885
  "java": {
1873
- "package": "software.amazon.awscdk.services.iot"
1886
+ "package": "software.amazon.awscdk.services.invoicing"
1874
1887
  },
1875
1888
  "python": {
1876
- "module": "aws_cdk.aws_iot"
1889
+ "module": "aws_cdk.aws_invoicing"
1877
1890
  }
1878
1891
  }
1879
1892
  },
1880
- "aws-cdk-lib.aws_iot1click": {
1893
+ "aws-cdk-lib.aws_iot": {
1881
1894
  "targets": {
1882
1895
  "dotnet": {
1883
- "namespace": "Amazon.CDK.AWS.IoT1Click"
1896
+ "namespace": "Amazon.CDK.AWS.IoT"
1884
1897
  },
1885
1898
  "java": {
1886
- "package": "software.amazon.awscdk.services.iot1click"
1899
+ "package": "software.amazon.awscdk.services.iot"
1887
1900
  },
1888
1901
  "python": {
1889
- "module": "aws_cdk.aws_iot1click"
1902
+ "module": "aws_cdk.aws_iot"
1890
1903
  }
1891
1904
  }
1892
1905
  },
@@ -2579,6 +2592,32 @@
2579
2592
  }
2580
2593
  }
2581
2594
  },
2595
+ "aws-cdk-lib.aws_notifications": {
2596
+ "targets": {
2597
+ "dotnet": {
2598
+ "package": "Amazon.CDK.AWS.Notifications"
2599
+ },
2600
+ "java": {
2601
+ "package": "software.amazon.awscdk.services.notifications"
2602
+ },
2603
+ "python": {
2604
+ "module": "aws_cdk.aws_notifications"
2605
+ }
2606
+ }
2607
+ },
2608
+ "aws-cdk-lib.aws_notificationscontacts": {
2609
+ "targets": {
2610
+ "dotnet": {
2611
+ "package": "Amazon.CDK.AWS.NotificationsContacts"
2612
+ },
2613
+ "java": {
2614
+ "package": "software.amazon.awscdk.services.notificationscontacts"
2615
+ },
2616
+ "python": {
2617
+ "module": "aws_cdk.aws_notificationscontacts"
2618
+ }
2619
+ }
2620
+ },
2582
2621
  "aws-cdk-lib.aws_oam": {
2583
2622
  "targets": {
2584
2623
  "dotnet": {
@@ -2735,6 +2774,19 @@
2735
2774
  }
2736
2775
  }
2737
2776
  },
2777
+ "aws-cdk-lib.aws_pcs": {
2778
+ "targets": {
2779
+ "dotnet": {
2780
+ "package": "Amazon.CDK.AWS.PCS"
2781
+ },
2782
+ "java": {
2783
+ "package": "software.amazon.awscdk.services.pcs"
2784
+ },
2785
+ "python": {
2786
+ "module": "aws_cdk.aws_pcs"
2787
+ }
2788
+ }
2789
+ },
2738
2790
  "aws-cdk-lib.aws_personalize": {
2739
2791
  "targets": {
2740
2792
  "dotnet": {
@@ -2852,6 +2904,19 @@
2852
2904
  }
2853
2905
  }
2854
2906
  },
2907
+ "aws-cdk-lib.aws_rbin": {
2908
+ "targets": {
2909
+ "dotnet": {
2910
+ "package": "Amazon.CDK.AWS.Rbin"
2911
+ },
2912
+ "java": {
2913
+ "package": "software.amazon.awscdk.services.rbin"
2914
+ },
2915
+ "python": {
2916
+ "module": "aws_cdk.aws_rbin"
2917
+ }
2918
+ }
2919
+ },
2855
2920
  "aws-cdk-lib.aws_rds": {
2856
2921
  "targets": {
2857
2922
  "dotnet": {
@@ -3177,6 +3242,19 @@
3177
3242
  }
3178
3243
  }
3179
3244
  },
3245
+ "aws-cdk-lib.aws_s3tables": {
3246
+ "targets": {
3247
+ "dotnet": {
3248
+ "package": "Amazon.CDK.AWS.S3Tables"
3249
+ },
3250
+ "java": {
3251
+ "package": "software.amazon.awscdk.services.s3tables"
3252
+ },
3253
+ "python": {
3254
+ "module": "aws_cdk.aws_s3tables"
3255
+ }
3256
+ }
3257
+ },
3180
3258
  "aws-cdk-lib.aws_sagemaker": {
3181
3259
  "targets": {
3182
3260
  "dotnet": {
@@ -3883,7 +3961,7 @@
3883
3961
  },
3884
3962
  "description": "CDK Constructs for deploying AWS Eventbridge that invokes AWS SQS",
3885
3963
  "homepage": "https://github.com/awslabs/aws-solutions-constructs.git",
3886
- "jsiiVersion": "5.4.46 (build 1a0b9d7)",
3964
+ "jsiiVersion": "5.7.4 (build fc2a28e)",
3887
3965
  "keywords": [
3888
3966
  "aws",
3889
3967
  "cdk",
@@ -3902,7 +3980,7 @@
3902
3980
  },
3903
3981
  "name": "@aws-solutions-constructs/aws-eventbridge-sqs",
3904
3982
  "readme": {
3905
- "markdown": "# aws-eventbridge-sqs module\n<!--BEGIN STABILITY BANNER-->\n\n---\n\n![Stability: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge)\n\n---\n<!--END STABILITY BANNER-->\n\n| **Reference Documentation**:| <span style=\"font-weight: normal\">https://docs.aws.amazon.com/solutions/latest/constructs/</span>|\n|:-------------|:-------------|\n<div style=\"height:8px\"></div>\n\n| **Language** | **Package** |\n|:-------------|-----------------|\n|![Python Logo](https://docs.aws.amazon.com/cdk/api/latest/img/python32.png) Python|`aws_solutions_constructs.aws_eventbridge_sqs`|\n|![Typescript Logo](https://docs.aws.amazon.com/cdk/api/latest/img/typescript32.png) Typescript|`@aws-solutions-constructs/aws-eventbridge-sqs`|\n|![Java Logo](https://docs.aws.amazon.com/cdk/api/latest/img/java32.png) Java|`software.amazon.awsconstructs.services.eventbridgesqs`|\n\n## Overview\nThis AWS Solutions Construct implements an Amazon EventBridge rule and an AWS SQS Queue.\n\nHere is a minimal deployable pattern definition:\n\nTypescript\n``` typescript\nimport { Construct } from 'constructs';\nimport { Stack, StackProps, Duration } from 'aws-cdk-lib';\nimport * as events from 'aws-cdk-lib/aws-events';\nimport * as iam from 'aws-cdk-lib/aws-iam';\nimport { EventbridgeToSqsProps, EventbridgeToSqs } from \"@aws-solutions-constructs/aws-eventbridge-sqs\";\n\nconst constructProps: EventbridgeToSqsProps = {\n eventRuleProps: {\n schedule: events.Schedule.rate(Duration.minutes(5))\n }\n};\n\nconst constructStack = new EventbridgeToSqs(this, 'test-construct', constructProps);\n\n// Grant yourself permissions to use the Customer Managed KMS Key\nconst policyStatement = new iam.PolicyStatement({\n actions: [\"kms:Encrypt\", \"kms:Decrypt\"],\n effect: iam.Effect.ALLOW,\n principals: [new iam.AccountRootPrincipal()],\n resources: [\"*\"]\n});\n\nconstructStack.encryptionKey?.addToResourcePolicy(policyStatement);\n```\n\nPython\n``` Python\nfrom aws_solutions_constructs.aws_eventbridge_sqs import EventbridgeToSqsProps, EventbridgeToSqs\nfrom aws_cdk import (\n aws_events as events,\n aws_iam as iam,\n Duration,\n Stack\n)\nfrom constructs import Construct\n\nconstruct_stack = EventbridgeToSqs(self, 'test-construct',\n event_rule_props=events.RuleProps(\n schedule=events.Schedule.rate(\n Duration.minutes(5))\n ))\n\n# Grant yourself permissions to use the Customer Managed KMS Key\npolicy_statement = iam.PolicyStatement(\n actions=[\"kms:Encrypt\", \"kms:Decrypt\"],\n effect=iam.Effect.ALLOW,\n principals=[iam.AccountRootPrincipal()],\n resources=[\"*\"]\n)\n\nconstruct_stack.encryption_key.add_to_resource_policy(policy_statement)\n```\n\nJava\n``` java\nimport software.constructs.Construct;\nimport java.util.List;\n\nimport software.amazon.awscdk.Stack;\nimport software.amazon.awscdk.StackProps;\nimport software.amazon.awscdk.Duration;\nimport software.amazon.awscdk.services.events.*;\nimport software.amazon.awscdk.services.iam.*;\nimport software.amazon.awsconstructs.services.eventbridgesqs.*;\n\nfinal EventbridgeToSqs constructStack = new EventbridgeToSqs(this, \"test-construct\",\n new EventbridgeToSqsProps.Builder()\n .eventRuleProps(new RuleProps.Builder()\n .schedule(Schedule.rate(Duration.minutes(5)))\n .build())\n .build());\n\n// Grant yourself permissions to use the Customer Managed KMS Key\nfinal PolicyStatement policyStatement = PolicyStatement.Builder.create()\n .actions(List.of(\"kms:Encrypt\", \"kms:Decrypt\"))\n .effect(Effect.ALLOW)\n .principals(List.of(new AccountRootPrincipal()))\n .resources(List.of(\"*\"))\n .build();\n\nconstructStack.getEncryptionKey().addToResourcePolicy(policyStatement);\n```\n\n## Pattern Construct Props\n\n| **Name** | **Type** | **Description** |\n|:-------------|:----------------|-----------------|\n|existingEventBusInterface?|[`events.IEventBus`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events.IEventBus.html)| Optional user-provided custom EventBus for construct to use. Providing both this and `eventBusProps` results an error.|\n|eventBusProps?|[`events.EventBusProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events.EventBusProps.html)|Optional user-provided properties to override the default properties when creating a custom EventBus. Setting this value to `{}` will create a custom EventBus using all default properties. If neither this nor `existingEventBusInterface` is provided the construct will use the `default` EventBus. Providing both this and `existingEventBusInterface` results an error.|\n|eventRuleProps|[`events.RuleProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events.RuleProps.html)|User provided eventRuleProps to override the defaults. |\n|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.|\n|queueProps?|[`sqs.QueueProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.QueueProps.html)|User provided props to override the default props for the SQS Queue. |\n|enableQueuePurging?|`boolean`|Whether to grant additional permissions to the Lambda function enabling it to purge the SQS queue. Defaults to `false`.|\n|deployDeadLetterQueue?|`boolean`|Whether to create a secondary queue to be used as a dead letter queue. Defaults to `true`.|\n|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 queue. Only used if the `deployDeadLetterQueue` property is set to true.|\n|maxReceiveCount?|`number`|The number of times a message can be unsuccessfully dequeued before being moved to the dead letter queue. Defaults to `15`.|\n|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.|\n|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.|\n|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.|\n\n## Pattern Properties\n\n| **Name** | **Type** | **Description** |\n|:-------------|:----------------|-----------------|\n|eventBus?|[`events.IEventBus`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events.IEventBus.html)|Returns the instance of events.IEventBus used by the construct|\n|eventsRule|[`events.Rule`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events.Rule.html)|Returns an instance of events.Rule created by the construct|\n|sqsQueue|[`sqs.Queue`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.Queue.html)|Returns an instance of sqs.Queue created by the construct|\n|encryptionKey?|[`kms.Key`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_kms.Key.html)|Returns an instance of kms Key used for the SQS queue.|\n|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 SQS queue created by the pattern.|\n\n## Default settings\n\nOut of the box implementation of the Construct without any override will set the following defaults:\n\n### Amazon EventBridge Rule\n* Grant least privilege permissions to EventBridge rule to publish to the SQS Queue.\n\n### Amazon SQS Queue\n* Deploy SQS dead-letter queue for the source SQS Queue.\n* Enable server-side encryption for source SQS Queue using Customer managed KMS Key.\n* Enforce encryption of data in transit.\n\n## Architecture\n![Architecture Diagram](architecture.png)\n\n***\n&copy; Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n"
3983
+ "markdown": "# aws-eventbridge-sqs module\n<!--BEGIN STABILITY BANNER-->\n\n---\n\n![Stability: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge)\n\n---\n<!--END STABILITY BANNER-->\n\n| **Reference Documentation**:| <span style=\"font-weight: normal\">https://docs.aws.amazon.com/solutions/latest/constructs/</span>|\n|:-------------|:-------------|\n<div style=\"height:8px\"></div>\n\n| **Language** | **Package** |\n|:-------------|-----------------|\n|![Python Logo](https://docs.aws.amazon.com/cdk/api/latest/img/python32.png) Python|`aws_solutions_constructs.aws_eventbridge_sqs`|\n|![Typescript Logo](https://docs.aws.amazon.com/cdk/api/latest/img/typescript32.png) Typescript|`@aws-solutions-constructs/aws-eventbridge-sqs`|\n|![Java Logo](https://docs.aws.amazon.com/cdk/api/latest/img/java32.png) Java|`software.amazon.awsconstructs.services.eventbridgesqs`|\n\n## Overview\nThis AWS Solutions Construct implements an Amazon EventBridge rule and an AWS SQS Queue.\n\nHere is a minimal deployable pattern definition:\n\nTypescript\n``` typescript\nimport { Construct } from 'constructs';\nimport { Stack, StackProps, Duration } from 'aws-cdk-lib';\nimport * as events from 'aws-cdk-lib/aws-events';\nimport * as iam from 'aws-cdk-lib/aws-iam';\nimport { EventbridgeToSqsProps, EventbridgeToSqs } from \"@aws-solutions-constructs/aws-eventbridge-sqs\";\n\nconst constructProps: EventbridgeToSqsProps = {\n eventRuleProps: {\n schedule: events.Schedule.rate(Duration.minutes(5))\n }\n};\n\nconst constructStack = new EventbridgeToSqs(this, 'test-construct', constructProps);\n\n// Grant yourself permissions to use the Customer Managed KMS Key\nconst policyStatement = new iam.PolicyStatement({\n actions: [\"kms:Encrypt\", \"kms:Decrypt\"],\n effect: iam.Effect.ALLOW,\n principals: [new iam.AccountRootPrincipal()],\n resources: [\"*\"]\n});\n\nconstructStack.encryptionKey?.addToResourcePolicy(policyStatement);\n```\n\nPython\n``` Python\nfrom aws_solutions_constructs.aws_eventbridge_sqs import EventbridgeToSqsProps, EventbridgeToSqs\nfrom aws_cdk import (\n aws_events as events,\n aws_iam as iam,\n Duration,\n Stack\n)\nfrom constructs import Construct\n\nconstruct_stack = EventbridgeToSqs(self, 'test-construct',\n event_rule_props=events.RuleProps(\n schedule=events.Schedule.rate(\n Duration.minutes(5))\n ))\n\n# Grant yourself permissions to use the Customer Managed KMS Key\npolicy_statement = iam.PolicyStatement(\n actions=[\"kms:Encrypt\", \"kms:Decrypt\"],\n effect=iam.Effect.ALLOW,\n principals=[iam.AccountRootPrincipal()],\n resources=[\"*\"]\n)\n\nconstruct_stack.encryption_key.add_to_resource_policy(policy_statement)\n```\n\nJava\n``` java\nimport software.constructs.Construct;\nimport java.util.List;\n\nimport software.amazon.awscdk.Stack;\nimport software.amazon.awscdk.StackProps;\nimport software.amazon.awscdk.Duration;\nimport software.amazon.awscdk.services.events.*;\nimport software.amazon.awscdk.services.iam.*;\nimport software.amazon.awsconstructs.services.eventbridgesqs.*;\n\nfinal EventbridgeToSqs constructStack = new EventbridgeToSqs(this, \"test-construct\",\n new EventbridgeToSqsProps.Builder()\n .eventRuleProps(new RuleProps.Builder()\n .schedule(Schedule.rate(Duration.minutes(5)))\n .build())\n .build());\n\n// Grant yourself permissions to use the Customer Managed KMS Key\nfinal PolicyStatement policyStatement = PolicyStatement.Builder.create()\n .actions(List.of(\"kms:Encrypt\", \"kms:Decrypt\"))\n .effect(Effect.ALLOW)\n .principals(List.of(new AccountRootPrincipal()))\n .resources(List.of(\"*\"))\n .build();\n\nconstructStack.getEncryptionKey().addToResourcePolicy(policyStatement);\n```\n\n## Pattern Construct Props\n\n| **Name** | **Type** | **Description** |\n|:-------------|:----------------|-----------------|\n|existingEventBusInterface?|[`events.IEventBus`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events.IEventBus.html)| Optional user-provided custom EventBus for construct to use. Providing both this and `eventBusProps` results an error.|\n|eventBusProps?|[`events.EventBusProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events.EventBusProps.html)|Optional user-provided properties to override the default properties when creating a custom EventBus. Setting this value to `{}` will create a custom EventBus using all default properties. If neither this nor `existingEventBusInterface` is provided the construct will use the `default` EventBus. Providing both this and `existingEventBusInterface` results an error.|\n|eventRuleProps|[`events.RuleProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events.RuleProps.html)|User provided eventRuleProps to override the defaults. |\n|targetProps?|[`eventtargets.SqsQueueProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events_targets.SqsQueueProps.html)|Optional user provided properties to define the SQS target on the Event Rule. If you specify a deadLetterQueue for the rule here, you are responsible for adding a resource policy to the queue allowing events.amazonaws.com permission to SendMessage, GetQueueUrl and GetQueueAttributes. You cannot send a DLQ in this property and set deployEventRuleDlq to true. Default is undefined and all system defaults are used.|\n|eventRuleDlqKeyProps|[kms.KeyProps](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_kms.KeyProps.html)|Optional properties to define the key created to protect the ruleDlq. Only valid if deployRuleDlq is set to true. Defaults to CloudFormation defaults.|\n| deployEventRuleDlq?|boolean|Whether to deploy a DLQ for the Event Rule. If set to `true`, this DLQ will receive any messages that can't be delivered to the target SQS queue. Defaults to `false`.|\n|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.|\n|queueProps?|[`sqs.QueueProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.QueueProps.html)|User provided props to override the default props for the SQS Queue. |\n|enableQueuePurging?|`boolean`|Whether to grant additional permissions to the Lambda function enabling it to purge the SQS queue. Defaults to `false`.|\n|deployDeadLetterQueue?|`boolean`|Whether to create a secondary queue to be used as a dead letter queue. Defaults to `true`.|\n|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 queue. Only used if the `deployDeadLetterQueue` property is set to true.|\n|maxReceiveCount?|`number`|The number of times a message can be unsuccessfully dequeued before being moved to the dead letter queue. Defaults to `15`.|\n|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.|\n|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.|\n|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.|\n\n## Pattern Properties\n\n| **Name** | **Type** | **Description** |\n|:-------------|:----------------|-----------------|\n|eventBus?|[`events.IEventBus`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events.IEventBus.html)|Returns the instance of events.IEventBus used by the construct|\n|eventsRule|[`events.Rule`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events.Rule.html)|Returns an instance of events.Rule created by the construct|\n|eventRuleDlq?|`sqs.Queue`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.Queue.html)|If the client sets deployEventRuleDlq to 'true', then this value will contain the DLQ set up for the rule.|\n|eventRuleDlqKey|[kms.IKey](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_kms.IKey.html)|The key created to encrypt the eventRuleDlq.|\n|sqsQueue|[`sqs.Queue`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.Queue.html)|Returns an instance of sqs.Queue created by the construct|\n|encryptionKey?|[`kms.Key`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_kms.Key.html)|Returns an instance of kms Key used for the SQS queue.|\n|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 SQS queue created by the pattern.|\n\n## Default settings\n\nOut of the box implementation of the Construct without any override will set the following defaults:\n\n### Amazon EventBridge Rule\n* Grant least privilege permissions to EventBridge rule to publish to the SQS Queue.\n\n### Amazon SQS Queue\n* Deploy SQS dead-letter queue for the source SQS Queue.\n* Enable server-side encryption for source SQS Queue using Customer managed KMS Key.\n* Enforce encryption of data in transit.\n\n## Architecture\n![Architecture Diagram](architecture.png)\n\n***\n&copy; Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n"
3906
3984
  },
3907
3985
  "repository": {
3908
3986
  "directory": "source/patterns/@aws-solutions-constructs/aws-eventbridge-sqs",
@@ -3947,7 +4025,7 @@
3947
4025
  },
3948
4026
  "locationInModule": {
3949
4027
  "filename": "lib/index.ts",
3950
- "line": 117
4028
+ "line": 144
3951
4029
  },
3952
4030
  "parameters": [
3953
4031
  {
@@ -3982,7 +4060,7 @@
3982
4060
  "kind": "class",
3983
4061
  "locationInModule": {
3984
4062
  "filename": "lib/index.ts",
3985
- "line": 102
4063
+ "line": 127
3986
4064
  },
3987
4065
  "name": "EventbridgeToSqs",
3988
4066
  "properties": [
@@ -3990,7 +4068,7 @@
3990
4068
  "immutable": true,
3991
4069
  "locationInModule": {
3992
4070
  "filename": "lib/index.ts",
3993
- "line": 106
4071
+ "line": 131
3994
4072
  },
3995
4073
  "name": "eventsRule",
3996
4074
  "type": {
@@ -4001,7 +4079,7 @@
4001
4079
  "immutable": true,
4002
4080
  "locationInModule": {
4003
4081
  "filename": "lib/index.ts",
4004
- "line": 103
4082
+ "line": 128
4005
4083
  },
4006
4084
  "name": "sqsQueue",
4007
4085
  "type": {
@@ -4012,7 +4090,7 @@
4012
4090
  "immutable": true,
4013
4091
  "locationInModule": {
4014
4092
  "filename": "lib/index.ts",
4015
- "line": 104
4093
+ "line": 129
4016
4094
  },
4017
4095
  "name": "deadLetterQueue",
4018
4096
  "optional": true,
@@ -4024,7 +4102,7 @@
4024
4102
  "immutable": true,
4025
4103
  "locationInModule": {
4026
4104
  "filename": "lib/index.ts",
4027
- "line": 107
4105
+ "line": 132
4028
4106
  },
4029
4107
  "name": "encryptionKey",
4030
4108
  "optional": true,
@@ -4036,13 +4114,37 @@
4036
4114
  "immutable": true,
4037
4115
  "locationInModule": {
4038
4116
  "filename": "lib/index.ts",
4039
- "line": 105
4117
+ "line": 130
4040
4118
  },
4041
4119
  "name": "eventBus",
4042
4120
  "optional": true,
4043
4121
  "type": {
4044
4122
  "fqn": "aws-cdk-lib.aws_events.IEventBus"
4045
4123
  }
4124
+ },
4125
+ {
4126
+ "immutable": true,
4127
+ "locationInModule": {
4128
+ "filename": "lib/index.ts",
4129
+ "line": 133
4130
+ },
4131
+ "name": "eventRuleDlq",
4132
+ "optional": true,
4133
+ "type": {
4134
+ "fqn": "aws-cdk-lib.aws_sqs.Queue"
4135
+ }
4136
+ },
4137
+ {
4138
+ "immutable": true,
4139
+ "locationInModule": {
4140
+ "filename": "lib/index.ts",
4141
+ "line": 134
4142
+ },
4143
+ "name": "eventRuleDlqKey",
4144
+ "optional": true,
4145
+ "type": {
4146
+ "fqn": "aws-cdk-lib.aws_kms.IKey"
4147
+ }
4046
4148
  }
4047
4149
  ],
4048
4150
  "symbolId": "lib/index:EventbridgeToSqs"
@@ -4059,7 +4161,7 @@
4059
4161
  "kind": "interface",
4060
4162
  "locationInModule": {
4061
4163
  "filename": "lib/index.ts",
4062
- "line": 26
4164
+ "line": 27
4063
4165
  },
4064
4166
  "name": "EventbridgeToSqsProps",
4065
4167
  "properties": [
@@ -4072,7 +4174,7 @@
4072
4174
  "immutable": true,
4073
4175
  "locationInModule": {
4074
4176
  "filename": "lib/index.ts",
4075
- "line": 44
4177
+ "line": 45
4076
4178
  },
4077
4179
  "name": "eventRuleProps",
4078
4180
  "type": {
@@ -4088,7 +4190,7 @@
4088
4190
  "immutable": true,
4089
4191
  "locationInModule": {
4090
4192
  "filename": "lib/index.ts",
4091
- "line": 68
4193
+ "line": 93
4092
4194
  },
4093
4195
  "name": "deadLetterQueueProps",
4094
4196
  "optional": true,
@@ -4105,7 +4207,7 @@
4105
4207
  "immutable": true,
4106
4208
  "locationInModule": {
4107
4209
  "filename": "lib/index.ts",
4108
- "line": 74
4210
+ "line": 99
4109
4211
  },
4110
4212
  "name": "deployDeadLetterQueue",
4111
4213
  "optional": true,
@@ -4113,6 +4215,24 @@
4113
4215
  "primitive": "boolean"
4114
4216
  }
4115
4217
  },
4218
+ {
4219
+ "abstract": true,
4220
+ "docs": {
4221
+ "default": "- false",
4222
+ "remarks": "If set to `true`, this DLQ will\nreceive any messages that can't be delivered to the target SQS queue.",
4223
+ "summary": "Whether to deploy a DLQ for the Event Rule."
4224
+ },
4225
+ "immutable": true,
4226
+ "locationInModule": {
4227
+ "filename": "lib/index.ts",
4228
+ "line": 52
4229
+ },
4230
+ "name": "deployEventRuleDlq",
4231
+ "optional": true,
4232
+ "type": {
4233
+ "primitive": "boolean"
4234
+ }
4235
+ },
4116
4236
  {
4117
4237
  "abstract": true,
4118
4238
  "docs": {
@@ -4123,7 +4243,7 @@
4123
4243
  "immutable": true,
4124
4244
  "locationInModule": {
4125
4245
  "filename": "lib/index.ts",
4126
- "line": 87
4246
+ "line": 112
4127
4247
  },
4128
4248
  "name": "enableEncryptionWithCustomerManagedKey",
4129
4249
  "optional": true,
@@ -4140,7 +4260,7 @@
4140
4260
  "immutable": true,
4141
4261
  "locationInModule": {
4142
4262
  "filename": "lib/index.ts",
4143
- "line": 62
4263
+ "line": 77
4144
4264
  },
4145
4265
  "name": "enableQueuePurging",
4146
4266
  "optional": true,
@@ -4157,7 +4277,7 @@
4157
4277
  "immutable": true,
4158
4278
  "locationInModule": {
4159
4279
  "filename": "lib/index.ts",
4160
- "line": 93
4280
+ "line": 118
4161
4281
  },
4162
4282
  "name": "encryptionKey",
4163
4283
  "optional": true,
@@ -4174,7 +4294,7 @@
4174
4294
  "immutable": true,
4175
4295
  "locationInModule": {
4176
4296
  "filename": "lib/index.ts",
4177
- "line": 99
4297
+ "line": 124
4178
4298
  },
4179
4299
  "name": "encryptionKeyProps",
4180
4300
  "optional": true,
@@ -4191,7 +4311,7 @@
4191
4311
  "immutable": true,
4192
4312
  "locationInModule": {
4193
4313
  "filename": "lib/index.ts",
4194
- "line": 38
4314
+ "line": 39
4195
4315
  },
4196
4316
  "name": "eventBusProps",
4197
4317
  "optional": true,
@@ -4199,6 +4319,23 @@
4199
4319
  "fqn": "aws-cdk-lib.aws_events.EventBusProps"
4200
4320
  }
4201
4321
  },
4322
+ {
4323
+ "abstract": true,
4324
+ "docs": {
4325
+ "default": "- default props are used",
4326
+ "summary": "Properties to define the key created to protect the ruleDlq Only valid if deployEventRuleDlq is set to true."
4327
+ },
4328
+ "immutable": true,
4329
+ "locationInModule": {
4330
+ "filename": "lib/index.ts",
4331
+ "line": 59
4332
+ },
4333
+ "name": "eventRuleDlqKeyProps",
4334
+ "optional": true,
4335
+ "type": {
4336
+ "fqn": "aws-cdk-lib.aws_kms.KeyProps"
4337
+ }
4338
+ },
4202
4339
  {
4203
4340
  "abstract": true,
4204
4341
  "docs": {
@@ -4208,7 +4345,7 @@
4208
4345
  "immutable": true,
4209
4346
  "locationInModule": {
4210
4347
  "filename": "lib/index.ts",
4211
- "line": 32
4348
+ "line": 33
4212
4349
  },
4213
4350
  "name": "existingEventBusInterface",
4214
4351
  "optional": true,
@@ -4225,7 +4362,7 @@
4225
4362
  "immutable": true,
4226
4363
  "locationInModule": {
4227
4364
  "filename": "lib/index.ts",
4228
- "line": 50
4365
+ "line": 65
4229
4366
  },
4230
4367
  "name": "existingQueueObj",
4231
4368
  "optional": true,
@@ -4242,7 +4379,7 @@
4242
4379
  "immutable": true,
4243
4380
  "locationInModule": {
4244
4381
  "filename": "lib/index.ts",
4245
- "line": 80
4382
+ "line": 105
4246
4383
  },
4247
4384
  "name": "maxReceiveCount",
4248
4385
  "optional": true,
@@ -4259,18 +4396,36 @@
4259
4396
  "immutable": true,
4260
4397
  "locationInModule": {
4261
4398
  "filename": "lib/index.ts",
4262
- "line": 56
4399
+ "line": 71
4263
4400
  },
4264
4401
  "name": "queueProps",
4265
4402
  "optional": true,
4266
4403
  "type": {
4267
4404
  "fqn": "aws-cdk-lib.aws_sqs.QueueProps"
4268
4405
  }
4406
+ },
4407
+ {
4408
+ "abstract": true,
4409
+ "docs": {
4410
+ "default": "- undefined (all default values are used)",
4411
+ "remarks": "If you specify a deadLetterQueue for the rule here, you are responsible for adding a resource policy\nto the queue allowing events.amazonaws.com permission to SendMessage, GetQueueUrl and GetQueueAttributes. You\ncannot send a DLQ in this property and set deployRuleDlq to true",
4412
+ "summary": "Optional user provided properties to define the SQS target on the Event Rule."
4413
+ },
4414
+ "immutable": true,
4415
+ "locationInModule": {
4416
+ "filename": "lib/index.ts",
4417
+ "line": 87
4418
+ },
4419
+ "name": "targetProps",
4420
+ "optional": true,
4421
+ "type": {
4422
+ "fqn": "aws-cdk-lib.aws_events_targets.SqsQueueProps"
4423
+ }
4269
4424
  }
4270
4425
  ],
4271
4426
  "symbolId": "lib/index:EventbridgeToSqsProps"
4272
4427
  }
4273
4428
  },
4274
- "version": "2.75.0",
4275
- "fingerprint": "60kdC5p9QQCYWaeTegCbG6/hDFZhtiwbuOB6ZBYxUIU="
4429
+ "version": "2.77.0",
4430
+ "fingerprint": "eGJaEgwQZyo4ImTIz9Rv19ipdz3chbyMSwlLg7i6UWY="
4276
4431
  }
package/README.md CHANGED
@@ -115,6 +115,9 @@ constructStack.getEncryptionKey().addToResourcePolicy(policyStatement);
115
115
  |existingEventBusInterface?|[`events.IEventBus`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events.IEventBus.html)| Optional user-provided custom EventBus for construct to use. Providing both this and `eventBusProps` results an error.|
116
116
  |eventBusProps?|[`events.EventBusProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events.EventBusProps.html)|Optional user-provided properties to override the default properties when creating a custom EventBus. Setting this value to `{}` will create a custom EventBus using all default properties. If neither this nor `existingEventBusInterface` is provided the construct will use the `default` EventBus. Providing both this and `existingEventBusInterface` results an error.|
117
117
  |eventRuleProps|[`events.RuleProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events.RuleProps.html)|User provided eventRuleProps to override the defaults. |
118
+ |targetProps?|[`eventtargets.SqsQueueProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events_targets.SqsQueueProps.html)|Optional user provided properties to define the SQS target on the Event Rule. If you specify a deadLetterQueue for the rule here, you are responsible for adding a resource policy to the queue allowing events.amazonaws.com permission to SendMessage, GetQueueUrl and GetQueueAttributes. You cannot send a DLQ in this property and set deployEventRuleDlq to true. Default is undefined and all system defaults are used.|
119
+ |eventRuleDlqKeyProps|[kms.KeyProps](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_kms.KeyProps.html)|Optional properties to define the key created to protect the ruleDlq. Only valid if deployRuleDlq is set to true. Defaults to CloudFormation defaults.|
120
+ | deployEventRuleDlq?|boolean|Whether to deploy a DLQ for the Event Rule. If set to `true`, this DLQ will receive any messages that can't be delivered to the target SQS queue. Defaults to `false`.|
118
121
  |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.|
119
122
  |queueProps?|[`sqs.QueueProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.QueueProps.html)|User provided props to override the default props for the SQS Queue. |
120
123
  |enableQueuePurging?|`boolean`|Whether to grant additional permissions to the Lambda function enabling it to purge the SQS queue. Defaults to `false`.|
@@ -131,6 +134,8 @@ constructStack.getEncryptionKey().addToResourcePolicy(policyStatement);
131
134
  |:-------------|:----------------|-----------------|
132
135
  |eventBus?|[`events.IEventBus`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events.IEventBus.html)|Returns the instance of events.IEventBus used by the construct|
133
136
  |eventsRule|[`events.Rule`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events.Rule.html)|Returns an instance of events.Rule created by the construct|
137
+ |eventRuleDlq?|`sqs.Queue`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.Queue.html)|If the client sets deployEventRuleDlq to 'true', then this value will contain the DLQ set up for the rule.|
138
+ |eventRuleDlqKey|[kms.IKey](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_kms.IKey.html)|The key created to encrypt the eventRuleDlq.|
134
139
  |sqsQueue|[`sqs.Queue`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.Queue.html)|Returns an instance of sqs.Queue created by the construct|
135
140
  |encryptionKey?|[`kms.Key`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_kms.Key.html)|Returns an instance of kms Key used for the SQS queue.|
136
141
  |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 SQS queue created by the pattern.|
package/lib/index.d.ts CHANGED
@@ -12,6 +12,7 @@
12
12
  */
13
13
  import * as sqs from 'aws-cdk-lib/aws-sqs';
14
14
  import * as events from 'aws-cdk-lib/aws-events';
15
+ import * as eventtargets from 'aws-cdk-lib/aws-events-targets';
15
16
  import * as kms from 'aws-cdk-lib/aws-kms';
16
17
  import { Construct } from 'constructs';
17
18
  /**
@@ -36,6 +37,20 @@ export interface EventbridgeToSqsProps {
36
37
  * @default - None
37
38
  */
38
39
  readonly eventRuleProps: events.RuleProps;
40
+ /**
41
+ * Whether to deploy a DLQ for the Event Rule. If set to `true`, this DLQ will
42
+ * receive any messages that can't be delivered to the target SQS queue.
43
+ *
44
+ * @default - false
45
+ */
46
+ readonly deployEventRuleDlq?: boolean;
47
+ /**
48
+ * Properties to define the key created to protect the ruleDlq
49
+ * Only valid if deployEventRuleDlq is set to true
50
+ *
51
+ * @default - default props are used
52
+ */
53
+ readonly eventRuleDlqKeyProps?: kms.KeyProps;
39
54
  /**
40
55
  * Existing instance of SQS queue object, providing both this and queueProps will cause an error.
41
56
  *
@@ -54,6 +69,16 @@ export interface EventbridgeToSqsProps {
54
69
  * @default - "false", disabled by default.
55
70
  */
56
71
  readonly enableQueuePurging?: boolean;
72
+ /**
73
+ * Optional user provided properties to define the SQS target on the Event Rule
74
+ *
75
+ * If you specify a deadLetterQueue for the rule here, you are responsible for adding a resource policy
76
+ * to the queue allowing events.amazonaws.com permission to SendMessage, GetQueueUrl and GetQueueAttributes. You
77
+ * cannot send a DLQ in this property and set deployRuleDlq to true
78
+ *
79
+ * @default - undefined (all default values are used)
80
+ */
81
+ readonly targetProps?: eventtargets.SqsQueueProps;
57
82
  /**
58
83
  * Optional user provided properties for the dead letter queue
59
84
  *
@@ -98,6 +123,8 @@ export declare class EventbridgeToSqs extends Construct {
98
123
  readonly eventBus?: events.IEventBus;
99
124
  readonly eventsRule: events.Rule;
100
125
  readonly encryptionKey?: kms.IKey;
126
+ readonly eventRuleDlq?: sqs.Queue;
127
+ readonly eventRuleDlqKey?: kms.IKey;
101
128
  /**
102
129
  * @summary Constructs a new instance of the EventbridgeToSqs class.
103
130
  * @param {cdk.App} scope - represents the scope for all the resources.