Checks if the Lambda function is configured with a function-level concurrent execution limit. The rule is NON_COMPLIANT if the Lambda function is not configured with a function-level concurrent execution limit.
To remediate the misconfiguration of AWS Lambda not having Concurrency configured, follow these steps using the AWS Management Console:
Sign in to the AWS Management Console: Go to https://aws.amazon.com/ and sign in to your AWS account.
Navigate to AWS Lambda: Click on the “Services” dropdown at the top left corner of the console, then select “Lambda” under the “Compute” section.
Select the Lambda Function: From the list of Lambda functions, select the function that you want to configure Concurrency for by clicking on its name.
Configure Concurrency: In the function’s configuration page, scroll down to the “Concurrency” section and click on the “Edit” button.
Set Concurrency Limit: In the Concurrency settings, you can set the maximum number of concurrent executions allowed for the Lambda function. Enter the desired value in the “Reserved concurrency” field. You can also set the “Unreserved concurrency” if needed.
Save Changes: After entering the concurrency limit, click on the “Save” button to apply the changes.
Verify Configuration: Once saved, verify that the Concurrency configuration is correctly set by checking the Concurrency section on the Lambda function’s configuration page.
By following these steps, you have successfully remediated the misconfiguration of AWS Lambda not having Concurrency configured. This will help in controlling the maximum number of concurrent executions for the Lambda function.
Replace <function-name> with the actual name of the Lambda function and <concurrency-limit> with the desired maximum number of concurrent executions allowed for the function.
Verify that the concurrency configuration has been successfully applied by describing the function and checking the concurrency settings:
By following these steps, you can remediate the misconfiguration of AWS Lambda functions not having concurrency configured using AWS CLI.
Using Python
To remediate the misconfiguration of AWS Lambda not having concurrency configured, you can follow these steps:
Open the AWS Management Console and navigate to the AWS Lambda service.
Select the Lambda function for which you want to configure concurrency.
In the function configuration page, scroll down to the “Concurrency” section.
Click on the “Edit” button next to the “Concurrency” section.
In the “Edit Concurrency” dialog box, you can set the maximum number of concurrent executions for the Lambda function. You can set a value between 1 and 1000.
Once you have set the desired concurrency limit, click on the “Save” button to apply the changes.
You can also configure the reserved concurrency for the Lambda function if you want to ensure that a specific number of concurrent executions are always available for the function.
After configuring the concurrency settings, monitor the Lambda function to ensure that it is operating within the specified concurrency limits.
By following these steps, you can remediate the misconfiguration of AWS Lambda not having concurrency configured.
Assistant
Responses are generated using AI and may contain mistakes.