CDK构造了(1)一个配置为向队列发送消息的AWS Lambda函数;(2)一个amazonsqs队列;(3)一个配置为使用队列中的消息的AWS Lambda函数。
aws-solutions-constructs.aws-lambda-sqs-lambda的Python项目详细描述
aws lambda sqs lambda模块
---All classes are under active development and subject to non-backward compatible changes or removal in any future version. These are not subject to the Semantic Versioning model. 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/ |
---|
这个AWS解决方案构造实现了(1)配置为向队列发送消息的AWS Lambda函数;(2)Amazon SQS队列;(3)配置为使用队列中的消息的AWS Lambda函数。在
以下是Typescript中的最小可部署模式定义:
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826fromaws_solutions_constructs.aws_lambda_sqs_lambdaimportLambdaToSqsToLambda,LambdaToSqsToLambdaPropsLambdaToSqsToLambda(self,"LambdaToSqsToLambdaPattern",producer_lambda_function_props=FunctionProps(runtime=lambda_.Runtime.NODEJS_12_X,handler="index.handler",code=lambda_.Code.from_asset(f"{__dirname}/lambda/producer-function")),consumer_lambda_function_props=FunctionProps(runtime=lambda_.Runtime.NODEJS_12_X,handler="index.handler",code=lambda_.Code.from_asset(f"{__dirname}/lambda/consumer-function")))
初始值设定项
^{pr2}$参数
构装道具
Name | Type | Description |
---|---|---|
existingProducerLambdaObj? | ^{ | An optional, existing Lambda function to be used instead of the default function for sending messages to the queue. If an existing function is provided, the ^{ |
producerLambdaFunctionProps? | ^{ | Optional user-provided properties to override the default properties for the producer Lambda function. Ignored if an ^{ |
existingQueueObj? | ^{ | An optional, existing SQS queue to be used instead of the default queue. If an existing queue is provided, the ^{ |
queueProps? | ^{ | Optional user-provided properties to override the default properties for the SQS queue. Ignored if an ^{ |
deployDeadLetterQueue? | ^{ | Whether to create a secondary queue to be used as a dead letter queue. Defaults to ^{ |
deadLetterQueueProps? | ^{ | Optional user-provided props to override the default props for the dead letter queue. Only used if the ^{ |
maxReceiveCount? | ^{ | The number of times a message can be unsuccessfully dequeued before being moved to the dead letter queue. Defaults to ^{ |
existingConsumerLambdaObj? | ^{ | An optional, existing Lambda function to be used instead of the default function for receiving/consuming messages from the queue. If an existing function is provided, the ^{ |
consumerLambdaFunctionProps? | ^{ | Optional user-provided properties to override the default properties for the consumer Lambda function. Ignored if an ^{ |
图案属性
Name | Type | Description |
---|---|---|
producerLambdaFunction | ^{ | Returns an instance of the producer Lambda function created by the pattern. |
sqsQueue | ^{ | Returns an instance of the SQS queue created by the pattern. |
deadLetterQueue? | [`sqs.Queue | undefined`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-sqs.Queue.html) |
consumerLambdaFunction | ^{ | Returns an instance of the consumer Lambda function created by the pattern. |
默认设置
此构造的现成实现(没有任何重写属性)将遵循以下默认值:
AWS Lambda函数
- 为Lambda函数配置有限权限访问IAM角色。在
- 启用NodeJs Lambda函数的Keep Alive重用连接。在
- 启用X射线跟踪
Amazon SQS队列
- 为主队列部署死信队列。在
- 使用AWS-s主密钥服务器对主密钥队列启用加密。在
- 对传输中的数据进行加密
建筑
©版权所有2020亚马逊网站,Inc.或其附属公司。版权所有。在
- 项目
标签: