Thushar.Aws.CloudFormation.Lambda.Template
1.0.2
The owner has unlisted this package.
This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet new install Thushar.Aws.CloudFormation.Lambda.Template::1.0.2
This package contains a .NET Template Package you can call from the shell/command line.
AWS CloudFormation Lambda Project Template
This project template is built using .NET 8 with AWS CloudFormation Lambda, following Microservice and Clean Architecture principles.
Project Structure
The project follows a Clean Architecture pattern with a focus on separating concerns into different layers, making it highly maintainable, testable, and scalable. It is organized into the following main components:
1. Controller Layer (Lambda Functions)
- Contains Lambda functions that act as the entry point for the microservices.
- Handles incoming events from AWS API Gateway, S3, or other AWS services.
- Routes requests to the appropriate services in the application layer.
2. Application Layer
- Contains the core business logic of the application.
- Coordinates the execution of the application's use cases and handles domain-specific operations.
- Implements the application-specific logic required for the Lambda functions to process requests.
3. Application.Contracts Layer
- Contains Request DTOs (Data Transfer Objects), Response DTOs, Service Interfaces, and Validators.
- Defines the contract between different layers, ensuring consistency and abstraction.
- Validates incoming data and ensures it conforms to the required structure before processing.
4. Core Layer
- Contains Managers (which implement business rules and logic).
- Defines Entities (the core data models used in the application).
- Provides Exception Handling mechanisms and manages application-specific errors.
- Defines Repository Interfaces that provide abstractions for data access.
5. Core.Shared Layer
- Contains Constants, Validation Error Messages, and Application Status Code Messages.
- Centralizes common data used throughout the application, ensuring consistency and maintainability.
- Provides standard error messages and status codes used across multiple layers.
6. Infrastructure Layer
- Contains Entity Framework (EF) configurations and data access logic.
- Implements Repositories that interact with the underlying database or other data stores.
- Manages external dependencies and integrates with third-party services like AWS or databases.
7. Logger Layer
- Configures Custom Logging to track application events and errors.
- Integrates with external logging services or stores logs locally to ensure effective monitoring.
- Allows for logging at different levels (e.g., Info, Debug, Error) to capture various events in the application lifecycle.
8. Serverless Support Layer
- Provides support for External Lambda Functions, S3, and other AWS Services.
- Contains logic for integrating with AWS services and supporting serverless workflows.
- Manages interactions between the core application and external AWS resources (like S3, Lambda, etc.).
How It Works
- Controller Layer invokes a Lambda function based on an event, which passes the request to the Application Layer.
- The Application Layer processes the logic and interacts with the Core Layer to perform necessary operations.
- Application.Contracts ensures that the requests and responses are in the correct format, using DTOs and validators.
- Core Layer manages the core business rules, entities, and exception handling.
- Core.Shared provides standardized messages and constants to ensure consistency in error handling and status codes.
- The Infrastructure Layer provides data access through Entity Framework and repositories, ensuring interaction with the database and other data sources.
- Logger Layer ensures that all application activities are logged for monitoring and debugging.
- Serverless Support Layer handles interactions with external AWS services like Lambda functions or S3, making it easy to extend functionality.
Deployment
- The project utilizes AWS services for deployment, and CloudFormation templates can be used for infrastructure management.
- AWS Lambda functions, API Gateway, and other resources can be defined in the
serverless.templatefile.
Key Features
- Microservice Architecture: Decouples services for better scalability, fault tolerance, and independent deployments.
- Clean Architecture: Ensures separation of concerns between the business logic, application, and infrastructure layers, promoting testability and maintainability.
- AWS Lambda: Serverless functions to execute specific tasks.
- AWS CloudFormation: For infrastructure-as-code to define and manage AWS resources.
- .NET 8: Utilizes the latest .NET 8 features for better performance and developer experience.
How to Use
Install the template:
dotnet new install Thushar.Aws.CloudFormation.Lambda.TemplateCreate a project using the template:
dotnet new aws-cloud-formation-lambda -n <ProjectName.ServiceName>
This template is inspired by MohammedNadeem
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|