Triage and Remediation
Remediation
Using Console
Using Console
To remediate the misconfiguration of Lambda Functions using deprecated versions in AWS, follow these steps:
- Login to the AWS Management Console.
- Go to the AWS Lambda service.
- Select the Lambda function that is using a deprecated version.
- Click on the “Configuration” tab.
- In the “Runtime settings” section, select the latest version of the runtime that is available. For example, if the function is using Node.js 8.10, select Node.js 14.x.
- Click on the “Save” button to save the changes.
- Test the function to ensure that it is working properly with the updated runtime version.
Using CLI
Using CLI
To remediate the Lambda Functions Should Not Use Deprecated Versions misconfiguration in AWS using AWS CLI, follow these steps:Replace This command will return a list of all the Lambda functions and their respective runtimes. Make sure that all the runtimes are non-deprecated versions.By following these steps, you can remediate the Lambda Functions Should Not Use Deprecated Versions misconfiguration in AWS using AWS CLI.
- Open your terminal and make sure you have the AWS CLI installed.
- Run the following command to list all the Lambda functions in your AWS account:
- Identify the Lambda functions that are using deprecated versions.
- Run the following command to update the runtime of the Lambda function to a non-deprecated version:
<function-name>
with the name of the Lambda function that you want to update, and <runtime>
with the non-deprecated runtime version that you want to use.- Repeat steps 4 and 5 for all the Lambda functions that are using deprecated versions.
- Verify that all the Lambda functions are now using non-deprecated versions by running the following command:
Using Python
Using Python
To remediate the misconfiguration “Lambda Functions Should Not Use Deprecated Versions” in AWS using Python, follow the below steps:
- Login to the AWS Management Console and navigate to the Lambda service.
- Select the Lambda function that is using a deprecated version.
- Click on the “Configuration” tab and scroll down to the “Runtime settings” section.
- Verify the runtime version of the function. If it is using a deprecated version, then it needs to be updated.
- Update the runtime version of the Lambda function to the latest version supported by AWS. You can refer to the AWS documentation to find the latest supported version.
- Once the update is complete, click on the “Save” button to save the changes.
- Test the updated Lambda function to ensure that it is functioning as expected.
- Finally, it is recommended to regularly monitor the runtime versions of your Lambda functions and update them as needed to ensure that they are not using any deprecated versions.