More Info:
Ensure Lambda compute platform is not using default configurationRisk Level
MediumAddress
Operational Excellence, Performance Efficiency, Reliability, SecurityCompliance 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
Remediation
Using Console
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.
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.
1. Identify the Lambda deployment group used by your build
- 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.
- 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).
- Open CodePipeline → select your pipeline → look at the Deploy stage → note the Application name and Deployment group (they will have
- Or directly in CodeDeploy:
- Go to CodeDeploy → Applications → look for applications with Compute platform = Lambda.
- In CodePipeline:
2. Change the deployment configuration for the Lambda deployment group
- In the console, open CodeDeploy.
- In the left menu, choose Applications.
- Click the Lambda application that corresponds to your deployment.
- In the application details, select the Deployment group you identified.
- At the top-right of the deployment group page, choose Edit.
- In the Deployment settings section, locate Deployment configuration.
- 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.
- Review the rest of the settings, then click Save (or Update deployment group).
3. Confirm future builds use the new configuration
- If using CodePipeline, confirm the Deploy stage references the same deployment group you just edited (no changes needed if it does).
- If your CodeBuild project triggers CodeDeploy directly (via
aws deploy create-deploymentinbuildspec.yml), verify that:- The
deploymentGroupNameyou pass is the updated deployment group, and - You are not overriding
deploymentConfigNamein the command. If you do, set it to the same non-default configuration, for example:
- The
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.
Using CLI
Using CLI
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.
Other valid
Adjust
Note the name of the target deployment group, e.g.
This replaces the default (e.g.
After this, deployments triggered from CodeBuild/CodePipeline will no longer use the default Lambda deployment configuration.
1. Create a custom Lambda deployment configuration
Example: linear 10% every 1 minute.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:MyLambdaDG.3. Update the deployment group to use the custom config
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:
Using Python
Using Python
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
This tells you which Lambda deployment groups are misconfigured.
Note the name
Run this once for each region where you have Lambda+CodeDeploy.
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.
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
boto3installed:- AWS credentials configured (via
aws configure, environment variables, or an IAM role).
2. Identify Lambda deployment groups using the default config
3. Choose a safer deployment configuration
Use a built‑in safer config, for example:CodeDeployDefault.LambdaCanary10Percent5MinutesCodeDeployDefault.LambdaCanary10Percent15MinutesCodeDeployDefault.LambdaLinear10PercentEvery1MinuteCodeDeployDefault.LambdaLinear10PercentEvery2MinutesCodeDeployDefault.LambdaAllAtOnce(what you want to avoid)
3a (Optional). Create a custom Lambda deployment configuration
Example: 20% canary, 10 minutes bake time.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 usingCodeDeployDefault.LambdaAllAtOnce to, for example, CodeDeployDefault.LambdaCanary10Percent5Minutes (or your custom config).5. Ensure future deployments don’t revert to default
Wherever you start deployments (CodePipeline, custom scripts, etc.), ensuredeploymentConfigName is explicitly set.Example with boto3 create_deployment:Using Terraform
Using Terraform
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.
