Package: aws-solutions-constructs.aws-iot-s3
aws-iot-s3 moduleAll 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_s3Typescript@aws-solutions-constructs/aws-iot-s3Javasoftware.amazon.awsconstructs.services.iots3OverviewThis AWS Solutions Construct implements an AWS IoT MQTT topic rule and an Amazon S3 Bucket pattern.Here is a minimal deployable pattern definition:Typescriptimport{Construct}from'constructs';import{Stack,StackProps}from'aws-cdk-lib';import{IotToS3Props,IotToS3}from'@aws-solutions-constructs/aws-iot-s3';constconstructProps:IotToS3Props={iotTopicRuleProps:{topicRulePayload:{ruleDisabled:false,description:"Testing the IotToS3 Pattern",sql:"SELECT * FROM 'solutions/constructs'",actions:[]}}};newIotToS3(this,'test-iot-s3-integration',constructProps);Pythonfromaws_solutions_constructs.aws_iot_s3importIotToS3Props,IotToS3fromaws_cdkimport(aws_iotasiot,Stack)fromconstructsimportConstructIotToS3(self,'test_iot_s3',iot_topic_rule_props=iot.CfnTopicRuleProps(topic_rule_payload=iot.CfnTopicRule.TopicRulePayloadProperty(rule_disabled=False,description="Testing the IotToS3 Pattern",sql="SELECT * FROM 'solutions/constructs'",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.iots3.*;newIotToS3(this,"test_iot_s3",newIotToS3Props.Builder().iotTopicRuleProps(newCfnTopicRuleProps.Builder().topicRulePayload(newTopicRulePayloadProperty.Builder().ruleDisabled(false).description("Testing the IotToS3 Pattern").sql("SELECT * FROM 'solutions/constructs'").actions(List.of()).build()).build()).build());Pattern Construct PropsNameTypeDescriptionexistingBucketInterface?s3.IBucketExisting S3 Bucket interface. Providing this property andbucketPropsresults in an error.bucketProps?s3.BucketPropsOptional user provided props to override the default props for the S3 Bucket. Providing this andexistingBucketObjreults in an error.loggingBucketProps?s3.BucketPropsOptional user provided props to override the default props for the S3 Logging Bucket.iotTopicRuleProps?iot.CfnTopicRulePropsUser provided CfnTopicRuleProps to override the defaults.s3KeystringUser provided s3Key to override the default (${topic()}/${timestamp()}) object key. Used to store messages matched by the IoT Rule.logS3AccessLogs?booleanWhether to turn on Access Logging for the S3 bucket. Creates an S3 bucket with associated storage costs for the logs. Enabling Access Logging is a best practice. default - truePattern PropertiesNameTypeDescriptions3Bucket?s3.BucketReturns an instance of the S3 bucket created by the pattern. If an existingBucketInterface is provided in IotToS3Props, then this value will be undefineds3BucketInterface?s3.IBucketReturns S3 Bucket interface created or used by the pattern. If an existingBucketInterface is provided in IotToS3Props, then only this value will be set and s3Bucket will be undefined. If the construct creates the bucket, then both properties will be set.s3LoggingBucket?s3.BucketReturns an instance ofs3.Bucketcreated by the construct as the logging bucket for the primary bucket.iotActionsRoleiam.RoleReturns an instance ofiam.Rolecreated by the construct, which allows IoT to publish messages to the S3 bucket.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 S3 BucketAmazon IAM RoleConfigure least privilege access IAM role for Amazon IoT to be able to publish messages to the S3 BucketAmazon S3 BucketConfigure Access logging for S3 BucketEnable server-side encryption for S3 Bucket using AWS managed KMS KeyEnforce encryption of data in transitTurn on the versioning for S3 BucketDon't allow public access for S3 BucketRetain the S3 Bucket when deleting the CloudFormation stackApplies Lifecycle rule to move noncurrent object versions to Glacier storage after 90 daysArchitecture© Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.