Package: aws-solutions-constructs.aws-iot-sqs
aws-iot-sqs module---All classes are under active development and subject to non-backward compatible changes or removal in any
future version. These are not subject to theSemantic Versioningmodel.
This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.Reference Documentation:https://docs.aws.amazon.com/solutions/latest/constructs/LanguagePackagePythonaws_solutions_constructs.aws_iot_sqsTypescript@aws-solutions-constructs/aws-iot-sqsJavasoftware.amazon.awsconstructs.services.iotsqsOverviewThis AWS Solutions Construct implements an AWS IoT MQTT topic rule and an AWS SQS Queue pattern.Here is a minimal deployable pattern definition:Typescriptimport{Construct}from'constructs';import{Stack,StackProps}from'aws-cdk-lib';import{IotToSqsProps,IotToSqs}from'@aws-solutions-constructs/aws-iot-sqs';constconstructProps:IotToSqsProps={iotTopicRuleProps:{topicRulePayload:{ruleDisabled:false,description:"Testing the IotToSqs Pattern",sql:"SELECT * FROM 'iot/sqs/#'",actions:[]}}};newIotToSqs(this,'test-iot-sqs-integration',constructProps);Pythonfromaws_solutions_constructs.aws_iot_sqsimportIotToSqsfromaws_cdkimport(aws_iotasiot,Stack)fromconstructsimportConstructIotToSqs(self,'test_iot_sqs',iot_topic_rule_props=iot.CfnTopicRuleProps(topic_rule_payload=iot.CfnTopicRule.TopicRulePayloadProperty(rule_disabled=False,description="Testing the IotToSqs Pattern",sql="SELECT * FROM 'iot/sqs/#'",actions=[])))Javaimportsoftware.constructs.Construct;importjava.util.List;importsoftware.amazon.awscdk.Stack;importsoftware.amazon.awscdk.StackProps;importsoftware.amazon.awscdk.services.iot.*;importsoftware.amazon.awscdk.services.iot.CfnTopicRule.TopicRulePayloadProperty;importsoftware.amazon.awsconstructs.services.iotsqs.*;newIotToSqs(this,"test_iot_sqs",newIotToSqsProps.Builder().iotTopicRuleProps(newCfnTopicRuleProps.Builder().topicRulePayload(newTopicRulePayloadProperty.Builder().ruleDisabled(false).description("Testing the IotToSqs Pattern").sql("SELECT * FROM 'iot/sqs/#'").actions(List.of()).build()).build()).build());Pattern Construct PropsNameTypeDescriptioniotTopicRulePropsiot.CfnTopicRulePropsUser provided CfnTopicRuleProps to override the defaultsexistingQueueObj?sqs.QueueExisting instance of SQS queue object, providing both this andqueuePropswill cause an error.queueProps?sqs.QueuePropsUser provided props to override the default props for the SQS queue.deadLetterQueueProps?sqs.QueuePropsOptional user provided properties for the dead letter queue.deployDeadLetterQueue?booleanWhether to deploy a secondary queue to be used as a dead letter queue. Defaulttrue.maxReceiveCount?numberThe number of times a message can be unsuccessfully dequeued before being moved to the dead-letter queue. Required field ifdeployDeadLetterQueue=true.enableEncryptionWithCustomerManagedKey?booleanIf 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.KeyAn optional, imported encryption key to encrypt the SQS Queue with.encryptionKeyProps?kms.KeyPropsOptional user provided properties to override the default properties for the KMS encryption key used to encrypt the SQS queue with.Pattern PropertiesNameTypeDescriptionencryptionKey?kms.KeyReturns an instance ofkms.Keyused for the SQS queue.iotActionsRoleiam.RoleReturns an instance ofiam.Rolecreated by the construct, which allows IoT to publish messages to the SQS QueuesqsQueuesqs.QueueReturns an instance ofsqs.Queuecreated by the constructdeadLetterQueue?sqs.QueueReturns an instance of the dead-letter SQS queue created by the pattern.iotTopicRuleiot.CfnTopicRuleReturns an instance ofiot.CfnTopicRulecreated by the constructDefault settingsOut of the box implementation of the Construct without any override will set the following defaults:Amazon IoT RuleConfigure an IoT Rule to send messages to the SQS QueueAmazon IAM RoleConfigure least privilege access IAM role for Amazon IoT to be able to publish messages to the SQS QueueAmazon SQS QueueDeploy a dead-letter queue for the source queue.Enable server-side encryption for the source queue using a customer-managed AWS KMS key.Enforce encryption of data in transit.Architecture© Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.