Skip to content

Conversation

@moelasmar
Copy link
Contributor

@moelasmar moelasmar commented Dec 15, 2021

Which issue(s) does this change fix?

sam deploy fail to deploy the a template that contains Lambda function with Image Package Type, and refer to a local image uri. example template:

Resources:
  HelloWorldFunctionRole:
    Type: AWS::IAM::Role
     ......
  HelloWorldFunction:
    Type: AWS::Lambda::Function
    Properties:
      PackageType: Image
      .... 
      Code:
        ImageUri: func217e03a4:latest

This PR also fixes sam build for the same template.

Why is this change necessary?

How does it address the issue?

What side effects does this change have?

Checklist

  • Add input/output type hints to new functions/methods
  • Write design document (Do I need to write a design document?)
  • Write unit tests
  • Write/update functional tests
  • Write/update integration tests
  • make pr passes
  • make update-reproducible-reqs if dependencies were changed
  • Write documentation

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

…rces with Image package type, and its code is local image uri,
@github-actions github-actions bot added pr/internal area/build sam build command labels Dec 15, 2021
@moelasmar moelasmar changed the title (fix) allow sam to deploy templates contain CFN Lambda Function resources with Image package type, and its code is local image uri. fix: allow sam to deploy templates contain CFN Lambda Function resources with Image package type, and its code is local image uri. Dec 22, 2021
@moelasmar moelasmar merged commit b570979 into aws:develop Dec 22, 2021
@moelasmar moelasmar deleted the develop-fix-sam-deploy-cfn-lambda-function-image branch December 22, 2021 21:12
moelasmar added a commit to moelasmar/aws-sam-cli that referenced this pull request Dec 22, 2021
…ces with Image package type, and its code is local image uri. (aws#3529)

* (fix) allow sam to deploy templates contain CFN Lambda Function resources with Image package type, and its code is local image uri,

* make reformat

* (fix) fix sam build failure for templates contians function without Docker Metadata

* run black format

* resolve PR comments
moelasmar added a commit to moelasmar/aws-sam-cli that referenced this pull request Dec 30, 2021
…ces with Image package type, and its code is local image uri. (aws#3529)

* (fix) allow sam to deploy templates contain CFN Lambda Function resources with Image package type, and its code is local image uri,

* make reformat

* (fix) fix sam build failure for templates contians function without Docker Metadata

* run black format

* resolve PR comments
@okofish
Copy link

okofish commented Jan 21, 2022

Is it intentional that SAM CLI is now requiring both DockerContext and Dockerfile metadata entries to be present? This change broke sam build for my template that had only DockerContext and no Dockerfile.

I'm not clear on the reasoning here but it seems like it would be better to require either property rather than both.

okofish added a commit to WolframResearch/AWSLambda-WolframLanguage that referenced this pull request Jan 25, 2022
mndeveci pushed a commit to mndeveci/aws-sam-cli that referenced this pull request Apr 5, 2022
…ces with Image package type, and its code is local image uri. (aws#3529)

* (fix) allow sam to deploy templates contain CFN Lambda Function resources with Image package type, and its code is local image uri,

* make reformat

* (fix) fix sam build failure for templates contians function without Docker Metadata

* run black format

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

Labels

area/build sam build command pr/internal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants