In this step we make some additions to the LazyStack.yaml file to support the use of DynamoDB and configure the Lambda and WebApi projects to reference the new PetStoreRepo project. Before we look at the LazyStack.yaml configuration directives in detail, here is a high-level summary of what we need to do:
When you execute LazyStack - Generate Projects, the following projects are regenerated:
These generated projects should not be edited as your changes would be lost.
In addition to the generated projects, portions of the WebApi project "PetStore" are updated with each execution of LazyStack - Generate Projects.
LazyStack - Generate Projects does not update or modify any other projects in your solution.
You can view the LazyStack log in the Application Output panel.
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:62817",
"sslPort": 44399
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"PetStore": {
"commandName": "Project",
"launchBrowser": true,
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"TABLE_NAME": "PetStoreDev-DB"
}
}
}
}
In this step we updated the LazyStack.yaml file to create a DynamoDB resource and configure the WebApi (PetStore) project and Lambdas projects to reference the PetStoreRepo project. We also inserted an environment variable "TABLE_NAME" in the WebApi project's launchSettings.json file to reference a table called "PetStoreDev-DB" in the DynamoDb resource.