Skip to main content

More Info:

Ensure Lambda compute platform is not using default configuration

Risk Level

Medium

Address

Operational Excellence, Performance Efficiency, Reliability, Security

Compliance Standards

  • APRA CPS 234 (Australia)
  • BSI C5 (Germany)
  • Brazil LGPD
  • CCPA / CPRA (California)
  • CIS Critical Security Controls v8
  • CMMC 2.0
  • CSA Cloud Controls Matrix v4
  • Cloudanix Best Practice
  • DPDPA
  • Digital Operational Resilience Act (EU)
  • Essential 8
  • ISO/IEC 27017
  • ISO/IEC 27018
  • ISO/IEC 27701
  • KSA PDPL
  • MAS Technology Risk Management (Singapore)
  • MITRE ATT&CK (Cloud)
  • NIS2 Directive
  • NIST SP 800-171
  • NYDFS 23 NYCRR 500
  • SWIFT Customer Security Controls Framework
  • Sarbanes-Oxley IT General Controls
  • UK NCSC Cyber Assessment Framework

Triage and Remediation

Remediation

Using Console

To fix “Lambda compute platform should not use default deployment configuration” you need to change the CodeDeploy deployment configuration used for your Lambda application (often triggered from CodeBuild/CodePipeline). This is done in CodeDeploy, not directly in CodeBuild, but it will remediate the issue for builds that deploy Lambdas.Below are the console steps.

1. Identify the Lambda deployment group used by your build

  1. In the AWS Management Console, go to CodePipeline (if you use it) or check your CodeBuild project’s buildspec to see how deployments are triggered.
  2. Note the CodeDeploy Application and Deployment Group used for Lambda deployments.
    • In CodePipeline:
      • Open CodePipeline → select your pipeline → look at the Deploy stage → note the Application name and Deployment group (they will have Compute platform: Lambda).
    • Or directly in CodeDeploy:
      • Go to CodeDeployApplications → look for applications with Compute platform = Lambda.

2. Change the deployment configuration for the Lambda deployment group

  1. In the console, open CodeDeploy.
  2. In the left menu, choose Applications.
  3. Click the Lambda application that corresponds to your deployment.
  4. In the application details, select the Deployment group you identified.
  5. At the top-right of the deployment group page, choose Edit.
  6. In the Deployment settings section, locate Deployment configuration.
  7. Change it from the default (often CodeDeployDefault.LambdaAllAtOnce) to a safe traffic-shifting configuration, for example:
    • CodeDeployDefault.LambdaCanary10Percent5Minutes (10% first, wait 5 minutes, then 90%)
    • or CodeDeployDefault.LambdaLinear10PercentEvery1Minute
      Choose based on your risk tolerance and rollout requirements.
  8. Review the rest of the settings, then click Save (or Update deployment group).

3. Confirm future builds use the new configuration

  1. If using CodePipeline, confirm the Deploy stage references the same deployment group you just edited (no changes needed if it does).
  2. If your CodeBuild project triggers CodeDeploy directly (via aws deploy create-deployment in buildspec.yml), verify that:
    • The deploymentGroupName you pass is the updated deployment group, and
    • You are not overriding deploymentConfigName in the command. If you do, set it to the same non-default configuration, for example:

After these changes, deployments originating from CodeBuild/CodePipeline will no longer use the default Lambda deployment configuration and will instead use a safer canary/linear strategy.
You fix this by creating a custom CodeDeploy deployment configuration for the Lambda compute platform and then updating your deployment group (used by CodeBuild/CodePipeline) to use that config instead of the default.Below are the minimal AWS CLI steps.

1. Create a custom Lambda deployment configuration

Example: linear 10% every 1 minute.
Other valid type options: AllAtOnce, Canary, TimeBasedLinear.
Adjust linearPercentage and linearInterval to your needs.

2. Find your existing Lambda deployment group

List deployment groups for your Lambda application:
Note the name of the target deployment group, e.g. MyLambdaDG.

3. Update the deployment group to use the custom config

This replaces the default (e.g. CodeDeployDefault.LambdaAllAtOnce) with your custom configuration.

4. Ensure your build/pipeline uses this deployment group

If CodeBuild is part of a CodePipeline:
  • Confirm the pipeline’s deploy stage is pointing to MyLambdaDG.
  • If needed, update CodePipeline via CLI:
After this, deployments triggered from CodeBuild/CodePipeline will no longer use the default Lambda deployment configuration.
For Lambda deployments, this setting is controlled by AWS CodeDeploy, not CodeBuild. The misconfiguration means your Lambda deployment groups are using the default Lambda deployment configuration (usually CodeDeployDefault.LambdaAllAtOnce) instead of a canary/linear or custom config.Below are step‑by‑step remediation instructions using Python (boto3).

1. Prerequisites

  • Python 3.x
  • boto3 installed:
  • AWS credentials configured (via aws configure, environment variables, or an IAM role).

2. Identify Lambda deployment groups using the default config

This tells you which Lambda deployment groups are misconfigured.

3. Choose a safer deployment configuration

Use a built‑in safer config, for example:
  • CodeDeployDefault.LambdaCanary10Percent5Minutes
  • CodeDeployDefault.LambdaCanary10Percent15Minutes
  • CodeDeployDefault.LambdaLinear10PercentEvery1Minute
  • CodeDeployDefault.LambdaLinear10PercentEvery2Minutes
  • CodeDeployDefault.LambdaAllAtOnce (what you want to avoid)
If you don’t need a custom one, pick one of the above and skip to step 4.

3a (Optional). Create a custom Lambda deployment configuration

Example: 20% canary, 10 minutes bake time.
Note the name LambdaCanary20Percent10Minutes; you’ll use it in step 4.

4. Update deployment groups to use a non‑default config

Here we’ll switch all groups currently using CodeDeployDefault.LambdaAllAtOnce to, for example, CodeDeployDefault.LambdaCanary10Percent5Minutes (or your custom config).
Run this once for each region where you have Lambda+CodeDeploy.

5. Ensure future deployments don’t revert to default

Wherever you start deployments (CodePipeline, custom scripts, etc.), ensure deploymentConfigName is explicitly set.Example with boto3 create_deployment:
If you share how you invoke deployments today (CodePipeline YAML, CDK, or direct boto3), I can give a targeted snippet for that flow as well.
Changing deployment_config_name is an in-place update and does not force replacement of the deployment group.For verification, terraform plan should show an in-place update on aws_codedeploy_deployment_group.LAMBDA_DEPLOYMENT_GROUP with deployment_config_name changing from CodeDeployDefault.LambdaAllAtOnce (or the previous value) to CodeDeployDefault.LambdaLinear10PercentEvery1Minute, and no other changes.