Skip to content

W2530 (SnapStart): recognize AutoPublishAlias on AWS::Serverless::Function #4611

Description

@kddejong

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions