Skip to content

How to dockerize .NET WebAPI lambda on both local and cloud #1489

Answered by ashishdhingra
Fitmavincent asked this question in Q&A
Discussion options

You must be logged in to vote

@Fitmavincent Are you using the .NET 7 serverless container image template or upgrading the serverless WebAPI project to .NET 7? Could you please share what Visual Studio template you used to develop your solution and may be share the minimal code solution (with sensitive information removed), may be attached as a ZIP for investigation?

EDIT: Attached is the sample Serverless WebAPI container image project which has both LocalEntryPoint and LambdaEntryPoint. When the code is executed locally, it should execute LocalEntryPoint and when it is executed in Lamba environment, it should execute LambdaEntryPoint.
ServerlessWebApiNet7.zip

Below is the Dockerfile:

FROM public.ecr.aws/lambda/dotnet…

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
5 replies
@Fitmavincent
Comment options

@ashishdhingra
Comment options

@Fitmavincent
Comment options

@ashishdhingra
Comment options

Answer selected by ashishdhingra
@banderberg
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
response-requested Waiting on additional info and feedback. Will move to close soon in 7 days. module/aspnetcore-support
3 participants