In this lesson step we will build the initial PetStore solution using the LazyStack Visual Studio Extension.
This tutorial assumes you are using the Windows Visual Studio IDE.
Note: In a production application you may choose to use the corresponding NuGet packages instead of using these projects directly. In this tutorial it is useful to be able to debug into these projects to understand how their features are implemented.
Note the PetStore.yaml file you dropped into the Solution's root folder is now visible in the "Solution Items" solution folder. LazyStack also created default LazyStack.yaml and default LocalApis.yaml files for you and these are also in the "Solution Items" solution folder.
The Generate Projects command created a default LazyStack.yaml file in your solution's root folder. The file is now visible in the "Solution Items" folder in the solution explorer. The top of your LazyStack.yaml file should look like this:
LzyStackDirectiveVersion: 1.1.0 Stacks: Dev: ProfileName: default RegionName: us-east-1 StackName: PetStoreDev Stage: Dev UriCodeTarget: Debug/netcoreapp3.1 Test: Stage: Test UriCodeTarget: Release/netcoreapp3.1 Prod: Stage: Prod UriCodeTarget: Release/netcoreapp3.1 ApiTagMap: HttpApiSecure: - pet - order
The SAM_Review.yaml file was generated in the solution folder. This file contains the stack configuration without stack environment specific content inserted. Stack environments might include Dev, Test and Prod. Fully constituted templates are placed in the serverless.template files placed in the stack environment folder. For instance, the Stacks\Dev\serverless.template file is the template you will later use to publish the PetStoreDev stack to AWS.
You never edit the SAM_Review.yaml file directly.
The SAM_Review.yaml file will be updated with new content as we add and configure AWS stack resources during the tutorial. This file is regenerated each time you execute LazyStack -- Generate Projects.
LazyStack Generate Projects process generates one serverless.template file for each environment. In this case, we have one Stacks Environment called "Dev" so a serverless.template file is generated in the Stacks\Dev folder.
You want to review the SAM template we will later publish to AWS. You never edit this file directly.
The serverless.template file will be updated with new content as we add and configure AWS stack resources during the tutorial. This file is regenerated each time you execute LazyStack -- Generate Projects.
In this lesson step we created a PetStore solution using the LazyStackWebApi project template, downloaded a OpenApi Specification called PetStore.yaml and then used the Tools → LazyStack - Generate Projects to generate projects and configuration files for our stack. We then updated the LazyStack.yaml file AWS ProfileName and RegionName.