Developing on AWS with C#

Book description

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

Table of contents

  1. Preface
    1. Who Should Read This Book
    2. How This Book Is Organized
    3. Additional Resources
    4. Conventions Used in This Book
    5. Using Code Examples
    6. O’Reilly Online Learning
    7. How to Contact Us
    8. Acknowledgments
      1. Noah
      2. James
  2. 1. Getting Started with .NET on AWS
    1. What Is Cloud Computing?
    2. Types of Cloud Computing
    3. Getting Started with AWS
      1. Using the AWS Management Console
      2. Utilizing the AWS Communities and Documentation
      3. Using the AWS Command Line Interface
      4. Using Visual Studio with AWS and AWS Toolkit for Visual Studio
      5. Getting Started with the AWS SDK
    4. Conclusion
    5. Critical Thinking Discussion Questions
    6. Challenge Exercises
  3. 2. AWS Core Services
    1. AWS Storage
      1. Developing with S3 Storage
      2. Developing with EBS Storage
      3. Using Network Storage: EFS and FSx
    2. Using AWS Compute Core Services
      1. Comparison of AWS Compute Core Services
      2. Using EC2
      3. Networking
      4. Using EC2 Pricing Options
    3. Security Best Practices for AWS
      1. Encryption at Rest and Transit
      2. PLP (Principle of Least Privilege)
      3. Using AWS Identity and Access Management (IAM)
    4. Developing NoSQL Solutions with DynamoDB
    5. Build a Sample C# DynamoDB Console App
    6. Amazon Relational Database Service
    7. Fully Managed Databases with Amazon Aurora Serverless v2
    8. Conclusion
    9. Critical Thinking Discussion Questions
    10. Exercises
  4. 3. Migrating a Legacy .NET Framework Application to AWS
    1. Choosing a Migration Path
      1. Rehosting
      2. Replatforming
      3. Repurchasing
      4. Rearchitecting
      5. Rebuilding
      6. Retaining
      7. Choosing a Strategy
      8. AWS Migration Hub Strategy Recommendations
    2. Rehosting on AWS
      1. Application Migration Service (MGN)
      2. Elastic Beanstalk
    3. Replatforming via Containerization
    4. Rearchitecting: Moving to .NET (Core)
      1. Microsoft .NET Upgrade Assistant
      2. AWS Porting Assistant
    5. Conclusion
    6. Critical Thinking Discussion Questions
    7. Exercises
  5. 4. Modernizing .NET Applications to Serverless
    1. A Serverless Web Server
    2. Choosing Serverless Components for .NET on AWS
      1. Developing with AWS Lambda and C#
      2. Developing with AWS Step Functions
      3. Developing with SQS and SNS
      4. Developing Event-Driven Systems with AWS Triggers
    3. Serverless Application Model (SAM)
    4. Conclusion
    5. Critical Thinking Discussion Questions
    6. Exercises
  6. 5. Containerization of .NET
    1. Introduction to Containers
      1. Introduction to Docker
      2. Docker Ecosystem
      3. Containers Versus Virtual Machines?
    2. Developing with AWS Container Compatible Services
      1. Using AWS Container Services for .NET with Cloud9
      2. Containerized .NET 6 API
      3. Containerize the Project
      4. Amazon Elastic Container Registry
      5. App Runner
    3. Managed Container Services with Amazon ECS
    4. Conclusion
    5. Critical Thinking Discussion Questions
    6. Exercises
  7. 6. DevOps
    1. Getting Started with DevOps on AWS
      1. What Are the Principles Behind DevOps?
      2. AWS DevOps Best Practices
    2. Developing with CI/CD on AWS
      1. AWS Code Deploy Services
      2. Integrating Third-Party Build Servers
    3. Integration with Partner Products
    4. Developing with IaC on AWS
    5. Working with AWS CDK in C#
    6. Conclusion
    7. Critical Thinking Discussion Questions
    8. Exercises
  8. 7. Logging, Monitoring, and Instrumentation for .NET
    1. AWS CloudWatch
      1. Collecting CloudWatch Logs
      2. Metrics
      3. Monitoring with CloudWatch Dashboards
    2. Distributed Tracing with X-Ray
      1. Setting Up X-Ray Using the SDK for .NET
      2. X-Ray Service Map
      3. OpenTelemetry and App Runner
    3. Resource Health and Synthetics Canaries
    4. Using AWS CloudTrail for Security Auditing
    5. Practical Example: A CloudWatch Circuit Breaker
      1. What Could Go Wrong?
      2. Breaking the Circuit
      3. Resetting the Tripped State
    6. Conclusion
    7. Critical Thinking Discussion Questions
    8. Exercises
  9. 8. Developing with AWS C# SDK
    1. Using AWS Toolkit for Visual Studio In Depth
      1. Configuring Visual Studio for AWS Toolkit
      2. Project Templates from AWS
      3. Publishing to AWS from Visual Studio
      4. AWS Toolkit for Visual Studio Code
      5. AWS Toolkit for Rider
    2. Key SDK Features
      1. Authentication in the AWS .NET SDK
      2. Dependency Injection with the AWS SDK
      3. Retries and Timeouts
      4. Paginators
    3. Using AWS AI Services
      1. AWS Comprehend
      2. AWS Rekognition
    4. Critical Thinking Discussion Questions
    5. Exercises
    6. Conclusion
  10. A. Benchmarking AWS
  11. B. Getting Started with .NET
    1. Hello World in GitHub Codespaces for C#
    2. Hello World in GitHub Codespaces for F#
  12. Index
  13. About the Authors

Product information

  • Title: Developing on AWS with C#
  • Author(s): Noah Gift, James Charlesworth
  • Release date: October 2022
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781492095873