Many organizations today have begun to modernize their Windows workloads to take full advantage of cloud economics. If you're a C# developer at one of these companies, you need options for rehosting, replatforming, and refactoring your existing .NET Framework applications. This practical book guides you through the process of converting your monolithic application to microservices on AWS.
Authors Noah Gift, founder of Pragmatic AI Labs, and James Charlesworth, engineering manager at Pendo, take you through the depth and breadth of .NET tools on AWS. You'll examine modernization techniques and pathways for incorporating Linux and Windows containers and serverless architecture to build, maintain, and scale modern .NET apps on AWS. With this book, you'll learn how to make your applications more modern, resilient, and cost-effective.
Get started building solutions with C# on AWS
Learn DevOps best practices for AWS
Explore the development tools and services that AWS provides
Successfully migrate a legacy .NET application to AWS
Develop serverless .NET microservices on AWS
Containerize your .NET applications and move into the cloud
Monitor and test your AWS .NET applications
Build cloud native solutions that combine the best of the .NET platform and AWS
Author(s): Noah Gift, James Charlesworth
Publisher: O’Reilly
Year: 2023
Language: English
Pages: 259
Cover
Copyright
Table of Contents
Preface
Who Should Read This Book
How This Book Is Organized
Additional Resources
Conventions Used in This Book
Using Code Examples
O’Reilly Online Learning
How to Contact Us
Acknowledgments
Noah
James
Chapter 1. Getting Started with .NET on AWS
What Is Cloud Computing?
Types of Cloud Computing
Getting Started with AWS
Using the AWS Management Console
Utilizing the AWS Communities and Documentation
Using the AWS Command Line Interface
Using Visual Studio with AWS and AWS Toolkit for Visual Studio
Getting Started with the AWS SDK
Conclusion
Critical Thinking Discussion Questions
Challenge Exercises
Chapter 2. AWS Core Services
AWS Storage
Developing with S3 Storage
Developing with EBS Storage
Using Network Storage: EFS and FSx
Using AWS Compute Core Services
Comparison of AWS Compute Core Services
Using EC2
Networking
Using EC2 Pricing Options
Security Best Practices for AWS
Encryption at Rest and Transit
PLP (Principle of Least Privilege)
Using AWS Identity and Access Management (IAM)
Developing NoSQL Solutions with DynamoDB
Build a Sample C# DynamoDB Console App
Amazon Relational Database Service
Fully Managed Databases with Amazon Aurora Serverless v2
Conclusion
Critical Thinking Discussion Questions
Exercises
Chapter 3. Migrating a Legacy .NET Framework Application to AWS
Choosing a Migration Path
Rehosting
Replatforming
Repurchasing
Rearchitecting
Rebuilding
Retaining
Choosing a Strategy
AWS Migration Hub Strategy Recommendations
Rehosting on AWS
Application Migration Service (MGN)
Elastic Beanstalk
Replatforming via Containerization
Rearchitecting: Moving to .NET (Core)
Microsoft .NET Upgrade Assistant
AWS Porting Assistant
Conclusion
Critical Thinking Discussion Questions
Exercises
Chapter 4. Modernizing .NET Applications to Serverless
A Serverless Web Server
Choosing Serverless Components for .NET on AWS
Developing with AWS Lambda and C#
Developing with AWS Step Functions
Developing with SQS and SNS
Developing Event-Driven Systems with AWS Triggers
Serverless Application Model (SAM)
Conclusion
Critical Thinking Discussion Questions
Exercises
Chapter 5. Containerization of .NET
Introduction to Containers
Introduction to Docker
Docker Ecosystem
Containers Versus Virtual Machines?
Developing with AWS Container Compatible Services
Using AWS Container Services for .NET with Cloud9
Containerized .NET 6 API
Containerize the Project
Amazon Elastic Container Registry
App Runner
Managed Container Services with Amazon ECS
Conclusion
Critical Thinking Discussion Questions
Exercises
Chapter 6. DevOps
Getting Started with DevOps on AWS
What Are the Principles Behind DevOps?
AWS DevOps Best Practices
Developing with CI/CD on AWS
AWS Code Deploy Services
Integrating Third-Party Build Servers
Integration with Partner Products
Developing with IaC on AWS
Working with AWS CDK in C#
Conclusion
Critical Thinking Discussion Questions
Exercises
Chapter 7. Logging, Monitoring, and Instrumentation for .NET
AWS CloudWatch
Collecting CloudWatch Logs
Metrics
Monitoring with CloudWatch Dashboards
Distributed Tracing with X-Ray
Setting Up X-Ray Using the SDK for .NET
X-Ray Service Map
OpenTelemetry and App Runner
Resource Health and Synthetics Canaries
Using AWS CloudTrail for Security Auditing
Practical Example: A CloudWatch Circuit Breaker
What Could Go Wrong?
Breaking the Circuit
Resetting the Tripped State
Conclusion
Critical Thinking Discussion Questions
Exercises
Chapter 8. Developing with AWS C# SDK
Using AWS Toolkit for Visual Studio In Depth
Configuring Visual Studio for AWS Toolkit
Project Templates from AWS
Publishing to AWS from Visual Studio
AWS Toolkit for Visual Studio Code
AWS Toolkit for Rider
Key SDK Features
Authentication in the AWS .NET SDK
Dependency Injection with the AWS SDK
Retries and Timeouts
Paginators
Using AWS AI Services
AWS Comprehend
AWS Rekognition
Critical Thinking Discussion Questions
Exercises
Conclusion
Appendix A. Benchmarking AWS
Appendix B. Getting Started with .NET
Hello World in GitHub Codespaces for C#
Hello World in GitHub Codespaces for F#
Index
About the Authors
Colophon