Lambda Deployment Prompts for CloudFormation Template

0

I'm working through the tutorial : https://aws.amazon.com/developer/language/net/badges-and-training/aws-lambda/module-one.

I have completed the exercises up to Demo 2 (A .NET API running in a Lambda Function) Step 3. This is very similar to the project that I need to create. I run the code within Visual Studio and the Minimal API deploys and in the Chrome Browser. However, when executing the

dotnet lambda deploy-serverless...

command line I get prompted to "Enter CloudFormation Template". This is not documented in the tutorial. What do I need to do?

I have attempted to create CloudFormation templates. All of my attempts have failed, seemingly due to some permissions role issues.

Is there a default template that should be used here?

DavidM
asked a month ago388 views
1 Answer
0
Accepted Answer

Hello.

If you look at the directory structure below, there is a file called "serverless.template" in "src/AspNetCoreWebAPI", so I think this is the CloudFormation template.

├───src
│   └───AspNetCoreWebAPI
│       │   appsettings.Development.json
│       │   appsettings.json
│       │   AspNetCoreWebAPI.csproj
│       │   aws-lambda-tools-defaults.json // basic Lambda function config, and points to serverless.template file for deployment
│       │   LambdaEntryPoint.cs // Contains the function handler method, this handles the incoming JSON payload
│       │   LocalEntryPoint.cs // Equivalent to Program.cs when running locally, starts Kestrel (only locally)
│       │   Readme.md  
│       │   serverless.template // CloudFormation template for deployment
│       │   Startup.cs // Familiar Startup.cs, can use dependency injection, read config, etc.
│       │
│       └───Controllers
│               ValuesController.cs // Familiar API controller
│
└───test
    └───AspNetCoreWebAPI.Tests
        │   appsettings.json
        │   AspNetCoreWebAPI.Tests.csproj
        │   ValuesControllerTests.cs // Unit test for ValuesController
        │
        └───SampleRequests
                ValuesController-Get.json // JSON representing an APIGatewayProxyRequest, used by the unit test
profile picture
EXPERT
answered a month ago
profile picture
EXPERT
reviewed a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions