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

[AWS::Lambda::Function] - [Enhancement] - Support ImageUri as an attribute #2211

Open
packplusplus opened this issue Dec 11, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@packplusplus
Copy link

packplusplus commented Dec 11, 2024

Name of the resource

AWS::Lambda::Function

Resource name

No response

Description

The return values are limited to the following:

  • SnapStartResponse
  • SnapStartResponse.ApplyOn
  • SnapStartResponse.OptimizationStatus
  • Arn

In the use case of a Sam Template, if you do an AWS::Serverless::Function, it does an AWS::Lambda::Function under the covers. If you are using an image_function, each function builds an independent Container Image. If AWS::Lambda::Function allowed you to get the ImageUri, you could have a single function build the image, and additional functions refer back to the initial image, reducing build times.

Example:

  Function1:
    Type: AWS::Serverless::Function
    Properties:
      PackageType: Image
      CodeUri: funcCode
      ImageConfig:
        Command:
          - "app.lambda_handler1"
    Metadata:
      Dockerfile: funcCode/Dockerfile
      DockerTag: Function1
  Function2:
    Type: AWS::Serverless::Function
    Properties:
      PackageType: Image
      CodeUri: !GetAtt Function1.ImageUri
      ImageConfig:
        Command:
          - "app.lambda_handler2"
  Function3:
    Type: AWS::Serverless::Function
    Properties:
      PackageType: Image
      CodeUri: !GetAtt Function1.ImageUri
      ImageConfig:
        Command:
          - "app.lambda_handler3"

Other Details

No response

@packplusplus packplusplus added the enhancement New feature or request label Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant