Cloud Defense Logo

Products

Solutions

Company

Book A Live Demo

Rule: Lambda Functions Dead-Letter Queue Configuration

Ensure Lambda functions are configured with a dead-letter queue for improved fault tolerance.

RuleLambda functions should be configured with a dead-letter queue
FrameworkNIST 800-53 Revision 5
Severity
Medium

Rule Description:

Lambda functions should be configured with a dead-letter queue to comply with the requirements of NIST 800-53 Revision 5. A dead-letter queue is used to capture and store failed events from the Lambda function for further analysis and troubleshooting. This ensures that no events are lost or discarded without appropriate handling.

Troubleshooting Steps:

If your Lambda function is not configured with a dead-letter queue, you may encounter issues with event handling and troubleshooting failed events. To troubleshoot and resolve this issue, follow the steps below:

  1. 1.

    Check Dead-Letter Queue Configuration:

    • Open the AWS Lambda console.
    • Select the relevant Lambda function.
    • Scroll down to the "Asynchronous Invocation" section.
    • Ensure that a dead-letter queue is configured.
  2. 2.

    Review Permissions:

    • Confirm that the Lambda function has the necessary permissions to access and write to the dead-letter queue.
    • Check the Lambda function's execution role for the required permissions.
  3. 3.

    Create or Update Dead-Letter Queue:

    • If a dead-letter queue is not configured, create a new queue specifically for this purpose.
    • If an existing dead-letter queue is already in place, verify its configuration and ensure it meets the requirements.

Remediation Steps:

To configure a dead-letter queue for your Lambda function, follow the steps below:

  1. 1.

    Open the AWS Lambda console.

  2. 2.

    Select the relevant Lambda function for which you want to configure a dead-letter queue.

  3. 3.

    Scroll down to the "Asynchronous Invocation" section.

  4. 4.

    Click on the "Edit" button next to "Asynchronous invocation" to modify the setting.

  5. 5.

    In the "Destination for failed invocations" section, select "SQS queue".

  6. 6.

    If you have an existing queue, select it from the drop-down list. Otherwise, choose "Create new queue" and provide a name for the new dead-letter queue.

  7. 7.

    Click "Save" to save the changes.

Ensure that the Lambda function's execution role has the necessary permissions to access and write to the dead-letter queue. Update the execution role if required.

By configuring a dead-letter queue, you comply with the NIST 800-53 Revision 5 requirement for Lambda functions and provide a mechanism to capture and handle failed events effectively.

Note: The troubleshooting and remediation steps provided above assume the usage of the AWS Management Console. Equivalent commands can be used with AWS CLI or SDKs if preferred.

Is your System Free of Underlying Vulnerabilities?
Find Out Now