Description
My function uses dependencies from a private Github repository and I have to --mount feature of BuildKit to build Docker image, but SAM does not support BuildKit. Then I have to build image separately first and then define that pre-built image in field ImageUri of template.yaml.
Issue happens when I test on local, SAM must build on fly image to run function -> It can not build image, then can not invoke local.
Is there any way to invoke sam local for this use case? Or SAM does not support that?
AWSTemplateFormatVersion: "2010-09-09"
Transform: AWS::Serverless-2016-10-31
Resources:
FormDataExtractionFunction:
# No MetaData definition
Type: AWS::Serverless::Function
Properties:
FunctionName: "my-lambda-function"
PackageType: Image
ImageUri: "library/test-lambda:latest" # Specify local image
...
Description
My function uses dependencies from a private Github repository and I have to --mount feature of BuildKit to build Docker image, but SAM does not support BuildKit. Then I have to build image separately first and then define that pre-built image in field ImageUri of template.yaml.
Issue happens when I test on local, SAM must build on fly image to run function -> It can not build image, then can not invoke local.
Is there any way to invoke sam local for this use case? Or SAM does not support that?