Supported `null` properties are removed from CloudFormation template
See original GitHub issueDiscussed in https://github.com/serverless/serverless/discussions/10649
<div type='discussions-op-text'>Originally posted by jack-c-tang February 7, 2022 Hi,
Based on the second note of the resource configuration document, the properties with null assignment are stripped before upload, because CloudFormation doesn’t allow them.
But CloudFormation template supports to include some transforms and macros that take those properties and transform to resources CFN allows. For example, AWS::Serverless
is a transform CFN supports. The ResultPath
specified in Definition
property of AWS::Serverless::StateMachine
resources accepts null
value with certain purpose. Stripping them make the step functions not work as expected.
Should the strip function bypass resources that will be transformed? Or is there a better suggestion or workaround for this usage? Thanks.
Related PR: https://github.com/serverless/serverless/pull/10304 Related issue: https://github.com/serverless/serverless/issues/10279</div>
Example of a valid template, that hosts null
values:
AWSTemplateFormatVersion: 2010-09-09
Description: Serverless transform resource with null assigned property
Transform: AWS::Serverless-2016-10-31
Resources:
NullResultPathStateMachine:
Type: AWS::Serverless::StateMachine
Properties:
Type: STANDARD
Name: nullResultPathStateMachine
Policies: arn:aws:iam::aws:policy/AWSStepFunctionsReadOnlyAccess
Definition:
StartAt: State1
States:
State1:
Type: Pass
Parameters:
parameter: 'sample'
ResultPath: null
End: true
Issue Analytics
- State:
- Created 2 years ago
- Comments:18 (12 by maintainers)
Suffering same problem.
ResultPath: null
is stripped and the next state cannot receive input. Fix in https://github.com/serverless/serverless/pull/8975 might be stripping the supported null value. Is there any (temporary) workaround for this? I have to manually setResultPath: null
in AWS console currently.any update on this? or possible workaround? the stripping of
null
means we can’t useResultPath: null
which is making our step function output exceed the 256k limit imposed by AWS