By Sanjay Gupta, Sr. Solutions Architect – AWS
By Sumitha Rao, Technical Architect – TCS
Many organizations leverage .NET framework to deploy their application, thus reaping the benefit of flexibility, performance, and ease of development and maintenance. Developing and deploying .NET applications on Amazon Web Services (AWS) is a key activity to help organizations achieve the scale and agility offered by cloud computing.
The TCS Serverless .NET deployment solution described in this post was developed by Tata Consultancy Services (TCS) by using the AWS Serverless Application Model (AWS SAM). The solution simplifies deployment, scalability, and maintenance of .NET applications and provides increased efficiencies and easy adoption of the .NET solutions on AWS.
We will describe the TCS solution’s overview, architecture, key principles, and benefits using a case study from a large financial services company.
An IT services, consulting, and business solutions organization, TCS is an AWS Premier Tier Services Partner and Managed Cloud Services Provider (MSP) that has been partnering with many of the world’s largest businesses in their transformation journeys for the last 50 years.
There are plenty of pitfalls and issues that software developers face during application deployment and maintenance:
- Higher maintenance overhead—in a traditional .NET deployment model, customers had to employ staff to monitor and maintain servers. This required investment of a lot of time, effort, and money.
- Longer time to market for introducing new features—releasing new features takes longer by involving manual process of capacity handling, testing strategy, and monolithic models of application deployment.
- Infrastructure incapability to scale on demand—increasing capacity goes through longer process of procurement and management.
- Inefficient security controls to meet industry compliance requirement.
- Ineffective cost management of pay as you go model.
TCS Serverless .NET Solution Overview
The TCS Serverless .NET solution provides ease of .NET application deployment by addressing key challenges such as scaling, cost management, security management, and maintenance.
TCS built this solution for the deployment of .NET applications by utilizing AWS serverless services to achieve critical business needs:
- Go to market faster: Since there is no operational overhead, teams can release quickly, get feedback, and iterate to go to market faster.
- Cost reduction: Customers need to pay only for what they use.
- Scalability: Serverless technologies can easily scale from zero to peak demands.
- Easy to build application: Serverless applications have built-in service integrations with other AWS services, so teams can focus on building applications instead of configuring the integrations.
Building the Serverless Applications
AWS SAM was used to build and deploy an application on AWS which is completely serverless. It allows programmers to write less code when creating serverless apps. You can easily organize related elements and operate on one stack.
Because AWS SAM is an extension of AWS CloudFormation, developers can also get the benefits of CloudFormation deployment capabilities. The AWS SAM command line interface (CLI) allows for local development, testing, and debugging of serverless applications that are defined by AWS SAM templates.
TCS Serverless .NET Solution Architecture
Most of the organizations today that develop .NET applications choose AWS due to the breadth and depth of AWS offerings.
Applications for this solution were developed using C# language targeting Microsoft .NET core 3.1 runtime on AWS. Frontend web application is built as a single page application using Angular, which invokes microservice APIs to perform operations. Interface with database is achieved using entity framework core version 6.0. Microservices architectures uses domain-driven design, incorporating SOLID design patterns.
AWS Fargate is a serverless compute engine for Amazon Elastic Container Service (Amazon ECS) and is a powerful option for running .NET applications. Every business function is designed as a microservice and launched as containers in AWS Fargate.
AWS Batch is deployed for batch processing of various application transactions with third-party vendors. Amazon API Gateway is the interface for other applications connecting to microservice .NET applications.
Cloud-native services such as AWS CloudTrail, Amazon CloudWatch, AWS Secrets Manager, and AWS Key Management Service (AWS KMS) are enabled for managing logging and encryption. Parallel, asynchronous processing of messages between microservices are done based on “fanout” design pattern using Amazon Simple Notification Service (SNS) and Amazon Simple Queue Service (SQS).
The diagram below depicts the high-level architecture of the TCS Serverless .NET deployment solution.
Figure 1 – High-level architecture of the TCS Serverless .NET solution.
- User hits the Amazon Route 53 DNS endpoint of the web application.
- Route 53 redirects it to the internal Application Load Balancer which exposes the web application. The web application is built as a single-page application using Angular 12.0 and invokes Amazon API Gateway for processing different requests.
- API Gateway redirects to the Network Load Balancer. A virtual private cloud (VPC) link is created in API Gateway for integrating the API with the microservices behind the Network Load Balancer.
- Network Load Balancers invoke the Application Load Balancers which expose the microservices.
- .NET applications are packaged inside AWS Fargate and AWS Batch as microservices.
- Microservices connect to Amazon Relational Database Service (Amazon RDS) for all database operations.
- Small application and database operations are done using AWS Lambda with AWS SDK for .NET which is also inside a VPC.
- Third-party applications invocations are handled through the respective APIs.
- Use AWS-native services for logging, security and notifications.
TCS Serverless .NET Solution Key Principles
TCS Serverless .NET deployment framework is designed around the following key design principles that define the state-of-the-art in modern design practice in AWS.
Building Microservices Architecture
Microservices are a way of breaking large software projects into loosely coupled modules, which communicate with each other. Since the latest .NET versions have light footprint and cross-platform nature, it’s an ideal candidate for microservices architecture.
Remove Operating System Dependency
This is done to avoid licensing cost and implications of the Windows operating system. Windows was once the natural choice for legacy applications using the .NET Framework. Now, .NET Core supports both Windows and Linux.
Running .NET Applications in Containers
Containers allow applications to be bundled with their own libraries and configuration files, and then executed in isolation on a single operating system kernel. This brings the benefits of isolation and high-density, runtime packaging and seamless deployment, high availability, and ease of resource management for distributed systems.
Using AWS Lambda for Small Running Processes
Using AWS Lambda to run .NET code in AWS is simple, efficient, and scalable. Lambda supports many programming languages, including C# and PowerShell. It already includes .NET Core 3.1 and .NET 6 as managed runtime environments. However, as of December 2022 .NET Core 3.1 will be out of support and the Lambda runtime depreciation process will start as per the runtime support policy. It’s also possible to run .NET on Lambda as a custom runtime or container image, which opens up support for all versions of .NET.
Effective Storage Solutions for .NET Applications
Amazon Aurora Serverless is an on-demand, auto-scaling database. .NET serverless applications can leverage Aurora Serverless for storing MySQL and PostgreSQL-compatible relational data, Amazon Simple Storage Service (Amazon S3) for object storage, and Amazon Elastic File System (Amazon EFS) for Linux-based shared file systems, or Amazon FSx for Windows file shares.
Developing .NET Applications
AWS SDK for .NET helps developers get started quickly by providing native .NET APIs to the AWS services. AWS Toolkit for Visual Studio Code, AWS Tools for PowerShell, AWS SAM Local, and the AWS .NET Mock AWS Lambda Test Tool make it easier to develop, test, debug, and deploy .NET applications on AWS.
Real-World Use Case in Financial Services Industry
A global financial enterprise was using a third-party application to process payments between vendors and partners. This application was based on legacy code and incurred steep licensing costs. It did not allow for nimble customer onboarding or change-of-payment process.
The customer was seeking to replace the third-party application by developing an in-house application using .NET framework to deploy on AWS for accelerating customer-focused innovation. They wanted this application to be highly scalable, cost effective with low maintenance overheads, and flexible in development and deployment.
TCS Serverless .NET solution helped them deploy the application on AWS and enabled them to execute on their vision to deliver value to clients. Using the TCS solution, the customer completed deployment of their payment application within five months and replaced the third-party solution.
The new payment application helped create secure interactions with partners to enable new payment process capabilities. The company was able to eliminate licensing overheads, build customer-facing applications faster, and augment ecosystem play.
The financial services company recorded the following benefits:
- Increased agility to launch new business features by 80%.
- 70% reduction in server management overhead by using AWS serverless technologies and managed services.
- 90% reduction in environment creation and maintenance by automating the repetitive work using AWS SAM.
- 30% cost reduction by moving workload from Windows OS to containers running on Linux.
Delivering business value by taking advantage of the AWS Cloud requires agile ways of working, flexible application architectures, and modern development practices.
TCS Serverless .NET solution improves business transactions and customer satisfaction, and offers the following benefits:
- Reduced time taken for business processes.
- Improved capacity to launch features.
- Reduced server management overhead.
- Automated the repetitive work during environment creation/maintenance.
Although .NET was once considered as an exclusive Windows technology, it has evolved to diverse cross-platform application. The real value of running .NET applications on AWS is integrating them with the growing platform of innovative AWS services.
TCS has a proven record of delivering industry-leading solutions for customers, with associates who are trained and certified in implementing AWS services. Contact TCS for more details and implementation of the serverless .NET deployment solution.
TCS – AWS Partner Spotlight
TCS is an AWS Premier Tier Services Partner and MSP that has been partnering with many of the world’s largest businesses in their transformation journeys for the last 50 years.