Follow-up to #4491. Tracked in #4607.
Problem
Two gaps. (1) W2530 keyword path is AWS::Lambda::Function/Properties/SnapStart/ApplyOn only. (2) Its check looks for an attached AWS::Lambda::Version via get_resource_children, which SAM no longer synthesizes from AutoPublishAlias. So SnapStart on a SAM function is unchecked.
Fix
Add the AWS::Serverless::Function keyword path AND treat AutoPublishAlias on the SAM function as satisfying the version-attached condition (instead of hunting for a synthesized AWS::Lambda::Version).
Acceptance
- SAM function with SnapStart enabled + AutoPublishAlias -> no error
- SnapStart enabled without a version/alias -> W2530
- fixtures + unit test
Follow-up to #4491. Tracked in #4607.
Problem
Two gaps. (1) W2530 keyword path is
AWS::Lambda::Function/Properties/SnapStart/ApplyOnonly. (2) Its check looks for an attachedAWS::Lambda::Versionviaget_resource_children, which SAM no longer synthesizes fromAutoPublishAlias. So SnapStart on a SAM function is unchecked.Fix
Add the
AWS::Serverless::Functionkeyword path AND treatAutoPublishAliason the SAM function as satisfying the version-attached condition (instead of hunting for a synthesizedAWS::Lambda::Version).Acceptance