AWS For .NET
Published: 2021-04-14 09:48:48

---
title: AWS For .NET
published: true
description: A collection of C# .NET5 projects that show how to integrate with AWS services using the AWS SDK for .NET
tag: aws, showdev, dotnet, csharp
cover_image: https://user-images.githubusercontent.com/33935506/114672166-f0595000-9d58-11eb-8240-65c0b06493b5.png
---
## AWS for .NET Developers

I have created a [github project](https://github.com/drminnaar/aws-dotnet-examples) that provides a collection of independent .NET projects written in C# .NET 5 that demonstrate how to integrate with various AWS services using the AWS SDK for dotnet.

I summarise the project in the following sections. However, if you prefer going straight to the code then check out the following links:

* [AWS .NET Examples](https://github.com/drminnaar/aws-dotnet-examples)
* [S3 ConsoleApp]
* [DynamoDb ConsoleApp]
* [SNS ConsoleApp]
* [SQS ConsoleApp]
* [Cognito Mvc]
* [Cognito Api]

---

## AWS Services And Projects Summary

So far, projects have been created for the following AWS Services:

* [Amazon S3] - An AWS service that provides authentication, authorization, and user management for your web and mobile apps.
  * [S3 ConsoleApp] - Console Application
* [Amazon SNS] - Amazon Simple Notification Service (Amazon SNS) is a web service that coordinates and manages the delivery or sending of messages to subscribing endpoints or clients.
  * [SNS ConsoleApp] - Console Application
* [Amazon SQS] - Amazon Simple Queue Service (SQS) is a fully managed message queuing service that enables you to decouple and scale microservices, distributed systems, and serverless applications.
  * [SQS ConsoleApp] - Console Application
* [Amazon Cognito] - Amazon Simple Notification Service (Amazon SNS) is a web service that coordinates and manages the delivery or sending of messages to subscribing endpoints or clients.
  * [Cognito Mvc] - ASP.NET Core MVC Application
  * [Cognito Api] - ASP.NET Core WebAPI Application
* [Amazon DynamoDb] - Amazon DynamoDB is a fully managed NoSQL database service that provides fast and predictable performance with seamless scalability.
  * [DynamoDb ConsoleApp] - Console Application

---

## Projects

* [Cognito Mvc] - This project demonstrates how to integrate an ASP.NET Core MVC web application with Amazon Cognito using the Amazon SDK.

    The following features have been implemented:

  * Signup for a new account
  * Confirm Signup (using confirmation code)
  * Sign into account
  * Sign out of account

  ![cognito-signup-3](https://user-images.githubusercontent.com/33935506/114539975-20491a80-9ca9-11eb-8b68-95c45f879519.png)

* [Cognito Api] - This project demonstrates how to integrate a .NET Core Web Api application with Amazon Cognito using the Amazon SDK.

  This Web Api application provides the following endpoints:

  * Signups
    * POST api/signups - Allows an api consumer to signup for a new account
  * Tokens
    * POST api/tokens - Provides JWT access token for valid account credentials
  * Values
    * GET api/values - An unauthorized endpoint that returns a list of values
    * GET api/values/123 - An authorized endpoint (Requires JWT access token) that returns a single value

* [S3 ConsoleApp] - This project demonstrates how to integrate a .NET Core Console application with Amazon S3 using the Amazon SDK.

  The following features have been implemented:

  * List all S3 buckets
  * Create new S3 bucket
  * Delete S3 bucket

  ![aws-s3-demo](https://user-images.githubusercontent.com/33935506/114326429-da953080-9b88-11eb-8ef0-aa4c1ec554bf.png)

* [DynamoDb ConsoleApp] - This project demonstrates how to integrate a .NET Core console application with DynamoDb using the Amazon SDK. This application provides the functionality required to both manage DynamoDb tables, and manage the data stored in a DynamoDB table

    The following features have been implemented:

  * Manage Tables
    * Create table
    * List and find tables
    * Wait for tables to be described (eventually consistent)
    * Delete table
  * Manage Book Table Data
    * Automatically creates Book table
    * Add books to Book table
    * Update books in Book table
    * Delete books from Book table
    * List and find books in Book table

    ![dynamodb-1](https://user-images.githubusercontent.com/33935506/114658257-a2871c80-9d45-11eb-9024-d5acde7d266e.png)

* [SNS ConsoleApp] - This project demonstrates how to integrate a .NET Core console application with SNS using the Amazon SDK. This application provides the functionality required to manage SNS topcs, subscriptions, and publications.

    The following features have been implemented:

  * Manage Topics
    * Create topic
    * List and find topics  
    * Delete topic
  * Manage Subscriptions
    * Create an email subscription
    * Cancel a subscription
    * List subscriptions
  * Manage Publications
    * An example showing how to publish a 'Game Ranking' to a 'game-ranking' topic
  
  ![aws-sns-demo](https://user-images.githubusercontent.com/33935506/114331020-32d32f00-9b97-11eb-8041-3a9a923df51b.png)

* [SQS ConsoleApp] - This project demonstrates how to integrate a .NET Core console application with SQS using the Amazon SDK.

    The following features have been implemented:

  * Manage Queues
    * Create queue
    * List queues
    * Delete queue
    * Get queue url
  * Manage Game Ranking Queue
    * Enqueue game ranking to queue
    * Dequeue game rankings from queue
  
  ![aws-sqs-overview](https://user-images.githubusercontent.com/33935506/114371324-7c8e3a80-9bd4-11eb-8e8d-5d4a126c9d2e.png)

-

## What's Next

I have plans to extend this project by implementing the following features:

- Improve existing examples (both code and documentation)
- Add additional examples for the current services that I have provisioned for (S3, DynamoDB, SQS, SNS, Cognito)
- Add examples for new services

That's all folks!

---

[Cognito Mvc]: https://github.com/drminnaar/aws-dotnetcore-examples/tree/master/cognito-mvc-web
[Cognito Api]: https://github.com/drminnaar/aws-dotnetcore-examples/tree/master/cognito-mvc-api
[S3 ConsoleApp]: https://github.com/drminnaar/aws-dotnetcore-examples/tree/master/s3-console
[DynamoDb ConsoleApp]: https://github.com/drminnaar/aws-dotnetcore-examples/tree/master/dynamodb-console
[SNS ConsoleApp]: https://github.com/drminnaar/aws-dotnetcore-examples/tree/master/sns-console
[SQS ConsoleApp]: https://github.com/drminnaar/aws-dotnetcore-examples/tree/master/sqs-console
[Creating .NET Core AWS Lambda Projects without Visual Studio]: https://aws.amazon.com/blogs/developer/creating-net-core-aws-lambda-projects-without-visual-studio/
[.NET5]: https://www.microsoft.com/net/download
[C#]: https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/
[Ubuntu 20.04]: https://releases.ubuntu.com/focal/
[Visual Studio Code]: https://code.visualstudio.com/
[Amazon S3]: https://docs.aws.amazon.com/s3
[Amazon SNS]: https://docs.aws.amazon.com/sns/latest/dg/welcome.html
[Amazon SQS]: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/welcome.html
[Amazon Cognito]: https://aws.amazon.com/cognito/getting-started/
[Amazon DynamoDb]: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Introduction.html