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
posta un mese fa395 visualizzazioni
1 Risposta
0
Risposta accettata

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
ESPERTO
con risposta un mese fa
profile picture
ESPERTO
verificato un mese fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande