Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: AWS SAM support #50

Open
chrisbelyea opened this issue Jan 29, 2021 · 1 comment
Open

Feature Request: AWS SAM support #50

chrisbelyea opened this issue Jan 29, 2021 · 1 comment

Comments

@chrisbelyea
Copy link

This Action isn't compatible with SAM templates that use a local file path for the CodeUri property of a AWS::Serverless::Function resource.

The CodeUi property states

The function code's Amazon S3 URI, local file path, or FunctionCode object.

If an Amazon S3 URI or FunctionCode object is provided, the Amazon S3 object referenced must be a valid Lambda deployment package.

If a local file path is provided, for the code to be transformed properly the template must go through the workflow that includes the sam deploy or sam package command.

(emphasis added)

Attempting to use this Action with a Serverless transform template that contains a AWS::Serverless::Function resource using a local path for CodeUri results in CloudFormation producing this error during stack creation:

Transform AWS::Serverless-2016-10-31 failed with: Invalid Serverless Application Specification document.
Number of errors found: 1.
Resource with id [MyLambdaFunction] is invalid. 'CodeUri' is not a valid S3 Uri of the form 's3://bucket/key' with optional versionId query parameter.

Somewhat related to #32 and #33.

Since this requires SAM CLI to correctly deploy a stack, this functionality might instead belong in a separate aws-sam-github-deploy action.

@tmclaugh
Copy link

tmclaugh commented Sep 4, 2024

In case anyone else runs into this issue, perform sam package and use --output-template-file to output the template to a file. Then pass that template file to this action.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants