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
gefragt vor einem Monat395 Aufrufe
1 Antwort
0
Akzeptierte Antwort

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
EXPERTE
beantwortet vor einem Monat
profile picture
EXPERTE
überprüft vor einem Monat

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen