-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Open
Labels
Description
Description
When using AWS::Serverless::CapacityProvider with optional ScalingConfig properties, the SAM translator incorrectly includes None/null values in the generated CloudFormation template, causing deployment failures or unexpected behavior.
Steps to reproduce
- Create a SAM template with
AWS::Serverless::CapacityProvider - Define
ScalingConfigwith onlyMaxVCpuCount(withoutAverageCPUUtilization) - Or define InstanceRequirements with only some properties (e.g., only AllowedTypes)
- Run
sam buildandsam deploy - The generated CloudFormation template includes null values for omitted properties
Observed result
The generated CloudFormation template contains null/None values for optional properties that were not specified in the SAM template, potentially causing validation errors or unexpected behavior during deployment.
Expected result
Optional properties that are not specified in the SAM template should be completely excluded from the generated CloudFormation template, not included with null values.
Additional environment details
- OS: macOS
- If using the SAM CLI,
sam --version: 1.149.0 - AWS region: N/A