OpenParable
Skip to content
← Back to skills

Cis AWS Compute 12.11

DevOps & Security
cis-aws-compute-12.11

Cis AWS Compute 12.11 is an Agent Skill for devops & security published in the CyberStrikeus/CyberStrike repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Ensure that the runtime environment versions used for your Lambda functions do not have end of support dates

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/CyberStrikeus/CyberStrike/blob/HEAD/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/AWS/CIS_AWS_Compute_Services_Benchmark_v1.1.0/cis-aws-compute-12.11/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/cis-aws-compute-12-11, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

Ensure that the runtime environment versions used for your Lambda functions do not have end of support dates

Description

Always using a recent version of the execution environment configured for your Amazon Lambda functions adheres to best practices for the newest software features, the latest security patches and bug fixes, and performance and reliability.

Rationale

When you execute your Lambda functions using recent versions of the implemented runtime environment, you should benefit from new features and enhancements, better security, along with performance and reliability.

Impact

Upgrading runtime versions may introduce breaking changes. Functions should be thoroughly tested with the new runtime before deployment.

Audit Procedure

Using AWS Console

  1. Login to the AWS Console using https://console.aws.amazon.com/lambda/.
  2. In the left column, under AWS Lambda, click Functions.
  3. Under Function name click on the name of the function that you want to review
  4. Click Code tab
  5. In the Runtime settings section, check the Runtime attribute value to determine the runtime version.
  6. Compare the function runtime with the updated list of Amazon Lambda runtimes. Link is in the resource section.
  7. If the version you are using is not the latest or is on the EOL list, the selected Amazon Lambda function is using an old and deprecated runtime environment.
  8. Refer to the remediation below.
  9. Repeat steps 2-6 for each Lambda function within the current region.

Then repeat the Audit process for all other regions.

Using AWS CLI

  1. Run aws lambda list-functions
aws lambda list-functions --output table --query 'Functions[*].FunctionName'

This command will provide a table titled ListFunctions

  1. Run aws lambda get-function-configuration using the Function names returned in the table.
aws lambda get-function-configuration --function-name "name_of_fuunction" --query 'Runtime'
  1. The command output should return the execution environment.
  2. Compare the function runtime with the updated list of Amazon Lambda runtimes. Link is in the resource section.
  3. If the version you are using is not the latest or is on the EOL list, the selected Amazon Lambda function is using an old and deprecated runtime environment.
  4. Refer to the remediation below.

Expected Result

All Lambda functions use supported runtime versions that are not deprecated or on the end-of-life (EOL) list.

Remediation

Using AWS Console

  1. Login to the AWS Console using https://console.aws.amazon.com/lambda/.
  2. In the left column, under AWS Lambda, click Functions.
  3. Under Function name click on the name of the function that you want to review
  4. Click Code tab
  5. Go to the Runtime settings section.
  6. Click Edit
  7. On the Edit runtime settings page, select the latest supported version of the runtime environment from the dropdown list. **Note - make sure the correct architecture is also selected.
  8. Click Save
  9. Select the Code tab
  10. Click Test from the Code source section.
  11. Once the testing is completed, the execution result of your Lambda function will be listed
  12. Repeat steps for each Lambda function that failed the Audit within the current region.

Using AWS CLI

  1. Run aws lambda update-function-configuration using the name of the Function you need to remediate
aws lambda update-function-configuration --output table --query 'Functions[*].FunctionName'

This command will provide a table titled ListFunctions

  1. Run aws lambda get-function-configuration using the Function names returned in the table.
aws lambda get-function-configuration --function-name "name_of_fuunction" --function-name "name_of_function" --runtime "python3.9"
  1. The command output should return the metadata available for the reconfigured function.
  2. Repeat steps 1-2 to upgrade the runtime environment for each Amazon Lambda function found in the Audit.

Default Value

Lambda functions use the runtime version specified at creation time. AWS does not automatically upgrade runtimes.

References

  1. https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html

CIS Controls

Controls VersionControlIG 1IG 2IG 3
v87.4 Perform Automated Application Patch Management - Perform application updates on enterprise assets through automated patch management on a monthly, or more frequent, basis.xxx
v73.5 Deploy Automated Software Patch Management Tools - Deploy automated software update tools in order to ensure that third-party software on all systems is running the most recent security updates provided by the software vendor.xxx

Profile

Level 1 | Manual