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
preguntada hace un mes395 visualizaciones
1 Respuesta
0
Respuesta aceptada

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
EXPERTO
respondido hace un mes
profile picture
EXPERTO
revisado hace un mes

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas