CDK构造了(1)一个配置为向队列发送消息的AWS Lambda函数;(2)一个amazonsqs队列;(3)一个配置为使用队列中的消息的AWS Lambda函数。

aws-solutions-constructs.aws-lambda-sqs-lambda的Python项目详细描述


aws lambda sqs lambda模块

---

Stability: Experimental

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/
^{tb2}$

这个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}$

参数

  • 范围^{}
  • 标识string
  • 道具^{}

构装道具

NameTypeDescription
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 ^{} property will be ignored.
producerLambdaFunctionProps?^{}Optional user-provided properties to override the default properties for the producer Lambda function. Ignored if an ^{} is provided.
existingQueueObj?^{}An optional, existing SQS queue to be used instead of the default queue. If an existing queue is provided, the ^{} property will be ignored.
queueProps?^{}Optional user-provided properties to override the default properties for the SQS queue. Ignored if an ^{} is provided.
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 ^{} property is set to ^{}.
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 ^{} property will be ignored.
consumerLambdaFunctionProps?^{}Optional user-provided properties to override the default properties for the consumer Lambda function. Ignored if an ^{} is provided.

图案属性

NameTypeDescription
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.Queueundefined`](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主密钥服务器对主密钥队列启用加密。在
  • 对传输中的数据进行加密

建筑

Architecture Diagram


©版权所有2020亚马逊网站,Inc.或其附属公司。版权所有。在

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java通过Spring MVC web应用程序向客户端发送文本文件   java是否可以在运行时动态实例化DAO类?   调用VB。来自Java的net函数   java在Android中通过单击打开特定文件夹   java如何使用maven pom。xml标识非标准项目结构中的testng测试用例?   java为什么FOP在大文件上崩溃?   Architecture python+flask和spring boot+java   java Kafka工具根本没有启动Ubuntu 19.10   如何使用Eclipse运行Java USB API for Windows   java如何在Eclipse中查看J2EE预览服务器/容器的日志/控制台?   网页抓取是否可以使用Java crawler crawler4j暂停和恢复抓取?   java当我第二次按下按钮时,应用程序停止工作   带有偏移量和限制的java SQLite分页问题   java如何在OSX mavericks中将端口80转发到8080   java从泛型方法调用非泛型方法   java My代码未按预期工作。十进制输出不是它应该的样子   节点。java中的js加密(jasypt)和nodejs中的解密   java乘法表不工作数组索引超出范围   java将JDBC与Firebirdsql连接起来