Skip to content

CodeUri defined in Globals section is ignored when packagingΒ #3376

@bmoller

Description

@bmoller

When executing aws cloudformation package to upload Lambda function ZIP's to S3, the CodeUri property is not inherited from the Globals section.

The SAM documentation makes it appear that it should be possible to specify CodeUri in the Globals section and have it inherited by all AWS::Serverless::Function resources. However, because the current package implementation does not do any kind of transformation involving the globals, this is ignored and the CodeUri property appears to lack a value. The behavior in this case is to zip up the current directory which can lead to all kinds of unexpected behavior (large archives described here, Lambda errors due to incorrect relative paths, etc.).

Would it be acceptable to add something like a dict.update() in the resource export function to make sure that global values for CodeUri are inherited? I can take a whack at it and submit a pull request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    cloudformation package-deploycommunitycustomizationIssues related to CLI customizations (located in /awscli/customizations)feature-requestA feature should be added or improved.p3This is a minor priority issue

    Type

    No type

    Projects

    Status

    Audit

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions