Thushar.Aws.CloudFormation.Lambda.Template 1.0.0

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package Thushar.Aws.CloudFormation.Lambda.Template --version 1.0.0
                    
NuGet\Install-Package Thushar.Aws.CloudFormation.Lambda.Template -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Thushar.Aws.CloudFormation.Lambda.Template" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Thushar.Aws.CloudFormation.Lambda.Template" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Thushar.Aws.CloudFormation.Lambda.Template" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Thushar.Aws.CloudFormation.Lambda.Template --version 1.0.0
                    
#r "nuget: Thushar.Aws.CloudFormation.Lambda.Template, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Thushar.Aws.CloudFormation.Lambda.Template@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Thushar.Aws.CloudFormation.Lambda.Template&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Thushar.Aws.CloudFormation.Lambda.Template&version=1.0.0
                    
Install as a Cake Tool

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

  1. Controller Layer invokes a Lambda function based on an event, which passes the request to the Application Layer.
  2. The Application Layer processes the logic and interacts with the Core Layer to perform necessary operations.
  3. Application.Contracts ensures that the requests and responses are in the correct format, using DTOs and validators.
  4. Core Layer manages the core business rules, entities, and exception handling.
  5. Core.Shared provides standardized messages and constants to ensure consistency in error handling and status codes.
  6. The Infrastructure Layer provides data access through Entity Framework and repositories, ensuring interaction with the database and other data sources.
  7. Logger Layer ensures that all application activities are logged for monitoring and debugging.
  8. 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.template file.

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

  1. Install the Template:

    dotnet new install Thushar.Aws.CloudFormation.Lambda.Template
    
  2. Create new project:

    dotnet new aws-cloud-formation-lambda -m <ProjectName.ServiceName>
    

This project template is insipired by MohammedNadeem

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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