7/23/2023 0 Comments Sqs queue lambdaAn Updated Lambda IAM Policy We’ll need to update Lambda permissions to get SQS data. Lambda uses Event Source Mappings that works somewhat separately from lambda to poll the Event Source, in your case SQS. A Lambda Trigger To Receive SQS Messages We’ll need to tell Lambda that it can be triggered by SQS. You are correct in assuming lambda is polling the queue however, the lambda itself is not running to check for messages. Result: I still can't send messages to the SQS queue anymore ?!? What is happening here? It is the same policy state as with the first change. A Lambda Trigger On Our Queue We’ll need to tell SQS that Lambda is a consumer. My CMK has the following policy and ONLY allows in it: │ │ SSE doesn't encrypt the following: Queue metadata (queue name and attributes) Message metadata (message ID, timestamp, and attributes) Per-queue metrics Encrypting a message makes its contents unavailable to unauthorized or anonymous users. Now I always get this following error: KMS.AccessDeniedException: The ciphertext refers to a customer master key that does not exist, does not exist in this region, or you are not allowed to access. SSE encrypts the body of a message in an Amazon SQS queue. Then it suddenly stopped working even after I reverted back to the really broad permissions. The queue construct deploys: An SQS queue A worker Lambda function: this function processes messages sent to the queue. (These DLQ can be configured at primary queue level). Using SQS with AWS Lambda and Serverless Get started with Simple Queue Service (SQS) and Serverless, and learn some of the important configuration options. After I got it working I made some adjustments to the permissions so they are more specific. SQS queue provide a feature where if the consumers of SQS fails to process the message for a certain number of times, These failed message can be moved to DLQ. At one point I got it working that my AWS Lambda function could send messages to this encrypted SQS queue. I have a AWS Lambda function that needs to send messages to an encrypted SQS queue.
0 Comments
Leave a Reply. |