This project provides a simple .NET 8.0 Web API with DynamoDB integration. It showcases a layered architecture (domain, repository, service, controllers) and uses Terraform for infrastructure deployment.
- Base URL: https://7tzavkdxw1.execute-api.us-east-2.amazonaws.com/
- Swagger URL: https://7tzavkdxw1.execute-api.us-east-2.amazonaws.com/swagger/index.html
You can access the OpenAPI documentation and test endpoints directly from the Swagger UI link above.
- .NET 8.0 SDK
- An AWS Account, with permissions to manage DynamoDB tables and deploy Lambda/API Gateway resources.
- Terraform (v1.x+)
If you wish to run the application locally (e.g., for development or debugging), you can:
- Ensure you have the .NET 8.0 SDK installed.
- Clone the repository.
- Navigate to the project folder and run:
This will start the Web API on your localhost port (by default,
dotnet build dotnet run
http://localhost:5000orhttps://localhost:5001).
-
Edit dev.tfvars
Open the file located at:/terraform/environments/dev.tfvarsAdd/update your AWS Account ID (and any other required variables). For example:
aws_account_id = "123456789012" region = "us-east-2" ...
-
Run the Deployment Script
From the root of the repository (or wherever thescriptsfolder is located), run:sh ./scripts/lambda_deploy_from_local.sh
This script will:
- Build the .NET 8 project.
- Package and upload the Lambda.
- Apply the Terraform configuration (which sets up or updates the Lambda, API Gateway, DynamoDB, etc.).
-
Verify the Deployment
Once finished, Terraform should output relevant URLs or confirmation messages.
You can test the API at the above Base URL and check Swagger at:https://<api-id>.execute-api.<region>.amazonaws.com/swagger/index.html
For questions or contributions, please create an issue or open a pull request. We welcome feedback and suggestions!