Microsoft Workloads on AWS
Accelerating .NET modernization with AWS Transform for .NET and CAST
This post has been co-written by Nicolas Bidaux, Gaby Choucrallah, Damien Santé from CAST
In today’s rapidly evolving cloud landscape, modernizing legacy .NET applications is a great opportunity for enterprises to transform their application portfolio. However, modernization presents challenges due to limited expertise and resource-intensive actions. AWS Transform for .NET, together with CAST Highlight, offers a compelling solution for enterprises seeking to modernize their .NET applications efficiently and effectively. This post demonstrates how these services work in tandem to streamline the modernization process, reduce risks, and accelerate your cloud transformation journey.
Introduction
Legacy .NET applications often hinder an organization’s agility and scalability in the cloud era. Modernizing these applications can lead to significant cost savings, improved performance, and enhanced scalability. However, the process can be complex, time-consuming, and risky if not approached strategically.
In this context, AWS Transform for .NET and CAST Highlight comes together to make it easier for customers to modernize their application portfolio. AWS Transform for .NET is the first agentic AI service for modernizing .NET applications at scale. It helps you to modernize Windows based .NET applications to be Linux-ready up to four times faster than traditional methods and realize up to 40% savings in licensing costs. It supports transforming a wide range of .NET project types including MVC, WCF, Web API, class libraries, console apps, and unit test projects.
CAST Highlight is an intelligent software solution that helps organizations gain rapid insights into their custom-developed applications. It offers a rapid and comprehensive analysis for each application, providing insights into cloud readiness, software quality, code complexity, and open-source risks. It also provides actionable and prioritized recommendations for improvement, enabling businesses to make informed decisions about cloud migration, modernization, and digital transformation initiatives.
Solution Overview
Our solution approach combines the strengths of CAST Highlight for portfolio assessment and AWS Transform for .NET for code transformation. Here’s a high-level overview of the process:
- Portfolio Assessment: CAST Highlight analyzes your application portfolio, providing insights into cloud readiness and modernization potential.
- Modernization Planning: Based on CAST’s analysis, applications are grouped into “waves” for transformation, from “ideal” to “complex” candidates.
- Code Transformation and validation: AWS Transform for .NET converts the Microsoft Windows-based source source code to cross-platform .NET, handling the entire transformation process, and validates the transformed code by executing unit test cases.
- Post-Transformation Analysis: CAST Highlight performs a comparative analysis of the code before and after transformation, identifying further modernization opportunities.
Figure 1 – End-to-End integrated flow with CAST Highlight and AWS Transform for .NET
Prerequisites
Before starting the workflow, ensure you have:
- An AWS account with appropriate permissions to use AWS Transform for .NET and have setup your AWS Identity center
- A CAST Highlight account and security token
- Access to the source code repositories of the .NET applications you wish to modernize in GitHub
- Currently, CAST Highlight only supports integration with GitHub and GitLab repositories
- GitHub or GitLab account with appropriate permissions (for CAST Highlight integration)
- Python installed on your local machine or EC2 instance
- Familiarity with .NET Framework and basic cloud concepts
Estimated time to complete all steps: 2+ hours, depending on the size and complexity of your application portfolio.
Step by step workflow
Below are step wise instructions for running the workflow described above.
Step 1: The user downloads their source code to their local machine and run CAST Highlight Code Reader, either in CLI mode or desktop mode to analyze the code. The Code Reader can run on an EC2 instance or directly as a GitHub Action. Customer will have to select GitHub option, so that CAST can capture the repository details, and branch name in the wave planning. After the scan, CAST Highlight automatically uploads analysis results to the CAST Highlight portal, without disclosing any snippet of the customer code. Only analysis result metadata is uploaded.
Figure 2 – Sign-in to CAST Highlight
Step 2: CAST Highlight examines the project type and recommends AWS Transform agent for .NET ,when appropriate, to facilitate the transformation.
Step 3: CAST Highlight generates a portfolio segmentation with recommended waves for all custom .NET application containing essential details such as repository names, and branches information.
Figure 3 – Wave generation based on CAST Highlights analysis
Step 4: User can get started with the first wave of “Ideal Candidates” by uploading the JSON generated by CAST script directly to AWS transform when creating .NET transformation jobs, giving them the advantage of working with repositories that CAST Highlight has already assessed and categorized. User can upload this JSON to AWS Transform job using “Upload custom mapping” function.
Now the workflow moves into AWS Transform agent for .NET for code transformation process.
- Download the CAST Automation script for pre-transformation from CAST Highlight on your local computer:
- Using script from CAST Highlight run below command to extract application waves
- python CastAWSTransformAdvisorExtraction.py –cast-token <<CAST SECURITY TOKEN>>
- The output JSON file can be used to select repositories in AWS Transform shown in Figure 4.
Step 5: Set up AWS Transform for code transform process
5.a Create an AWS Transform Job for .NET
Figure 4 – Creating a job with AWS Transform
5.b Setup code connection connector.
Figure 5 – Setting up connector to source code repository
5.c Confirm repositories to be transformed
In this step, upload the JSON file generated from CAST highlight to select repos assessed for code transformation with AWS Transform using “Upload customized plan”.
Figure 6 – Uploading the CAST wave to repository mapping
Figure 7 – wave 1 and wave 3 JSON file
Figure 8 – Wave selection in the AWS Transform page
After the repositories are selected and approved, AWS Transform will modernize these applications. Once the transformation is completed, and unit test case projects are executed, the code is written back into the repository, customer can proceed with the next steps.
5.d Download the dashboard report from Repositories table after the transformation is completed and unit test cases are executed
Figure 9– Dashboard page where the transformation summary can be downloaded
Figure 10 – Dashboard with Unit test case execution
Step 6: Once the code is transformed by AWS Transform for .NET and placed in code repository, the integration with CAST Highlight will allow to trigger a comprehensive comparative analysis of the pre-and post-transformation for security analysis (open-source risks, other vulnerabilities), and overall software health/technical debt metrics.
Run CAST Highlight post automation script to read transformation report.json downloaded from AWS Transform and upload results to CAST highlight
<GITHUB_TOKEN>: should have following permissions – repo:status, repo_deployment, public_repo, repo:invite
<CAST_HIGHLIGHT_SECURITY_TOKEN>: Generate security token from CAST Highlight website
<PATH_TO_TRANSFORMATION_REPORT_JSON_FILE>: Path location where transformation_report.json file is downloaded
Download the CAST Automation script for post transformation from: https://doc.casthighlight.com/extensions/extension.php?identifier=cast.awstransform.downstreamreview
Unzip the folder and run below command
python CastAutomationPost.py –json-file-path <PATH_TO_TRANSFORMATION_REPORT_JSON_FILE> –github-token ghp_<GITHUB_TOKEN> –cast-token <CAST_HIGHLIGHT_SECURITY_TOKEN>
Step 7: Navigate to CAST Highlight website to view applications pre- and post-transformation
CAST Highlights selects successfully transformed repositories from post transformation report and generates snapshots of pre and post transformation from repository source and transformed branch respectively.
Here you can see that post-transformation, there is a significant improvement in open-source safety, Component security, and vulnerabilities identified post-transformation using AWS Transform for .NET.
Figure 11 – Run post-transformation analysis with CAST Highlight
Step 8: Identify follow-on modernization opportunities in CAST Highlight
CAST Highlight generates comprehensive insights to identify and plan further modernization opportunities for the .NET applications and neighboring applications part of the same portfolio . Refer CAST Highlight technology coverage for further details
Key Benefits Summary
By leveraging this solution, organizations can:
- Accelerate Modernization: Modernize applications up to 4x faster than traditional methods.
- Reduce Costs: Realize up to 40% savings in licensing costs.
- Minimize Risk: Gain comprehensive insights into application health and modernization readiness.
- Optimize Resources: Prioritize modernization efforts based on data-driven analysis.
- Enhance Quality: Improve code quality and reduce technical debt throughout the modernization process.
- Strategic Planning: Develop a clear, phased approach to modernization using CAST’s recommendations.
Conclusion
The integration of AWS Transform for .NET and CAST Highlight demonstrates a powerful approach to accelerating .NET application modernization at scale, from application portfolio analysis to code transformation through a seamless experience .
Call To Action – Begin your .NET Modernization journey
- Sign up for a free CAST Highlight technical workshop
- Explore AWS Transform for .NET through the AWS console
- Contact your AWS representative or CAST partner for personalized guidance
AWS has significantly more services, and more features within those services, than any other cloud provider, making it faster, easier, and more cost effective to move your existing applications to the cloud and build nearly anything you can imagine. Give your Microsoft applications the infrastructure they need to drive the business outcomes you want. Visit our .NET on AWS and AWS Database blogs for additional guidance and options for your Microsoft workloads. Contact us to start your migration and modernization journey today.