Migrating C# Code to AWS: Best Hosting Options

Choose the Right Hosting for Your C# Code on AWS

Prev Question Next Question

Question

Your company is planning to migrate code written in C# from their on-premises infrastructure onto AWS.

They want to ensure to limit the amount of maintenance that would be required for the underlying infrastructure.

Which of the following would they choose for hosting the code base?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Answer - A.

The AWS Documentation mentions the following.

AWS Lambda is a compute service that lets you run code without provisioning or managing servers.

AWS Lambda executes your code only when needed and scales automatically, from a few requests per day to thousands per second.

You pay only for the compute time you consume.

There is no charge when your code is not running.

With AWS Lambda, you can run code for virtually any type of application or backend service - all with zero administration.

With Lambda, you don't need to build, secure, or maintain a container.

You must be worried about the code.

EC2

- is simply a remote (virtual) machine.

ECS stands for Elastic Container Service.

ECS is basically a logical grouping of

EC2

Instances.

Technically, ECS is a mere configuration for the efficient use and management of your

EC2

instance(s) resources i.e.

storage, memory, CPU, etc.

To simplify it further, if you have launched an Amazon ECS with no

EC2

instances added to it, it's good for nothing.

So you can't do anything about it.

ECS.

makes sense only once one (or more)

EC2

instances are added to it.

Options B and C are incorrect since here you would need to manage the underlying servers.

Option D is incorrect since this is a messaging service.

For more information on AWS Lambda, please visit the URL-

https://docs.aws.amazon.com/lambda/latest/dg/welcome.html

When it comes to hosting C# code on AWS, there are a few different options available. However, based on the requirement to limit maintenance, the best option would be AWS Lambda (Option A).

AWS Lambda is a serverless computing service, which means that there are no servers to manage or maintain. Instead, you simply upload your code and Lambda takes care of everything else. You only pay for the compute time that your code actually uses, so there is no need to worry about provisioning or managing any infrastructure. Additionally, AWS Lambda is highly scalable, so it can handle large numbers of requests without any additional setup.

AWS EC2 (Option B) is a traditional compute service that provides virtual machines that can be configured and managed by the user. This means that there would be more maintenance required, as you would need to manage and maintain the underlying infrastructure yourself. While EC2 does offer more flexibility and customization options than Lambda, it requires a higher level of expertise to manage.

AWS ECS (Option C) is a container orchestration service that allows you to run and manage Docker containers on AWS. While ECS can provide a high level of scalability and flexibility, it also requires more maintenance than Lambda. You would need to manage the underlying infrastructure, as well as the containers themselves.

AWS SQS (Option D) is a message queue service that allows you to decouple and scale microservices, distributed systems, and serverless applications. While SQS can be useful in certain scenarios, it is not a hosting option for C# code.

In conclusion, based on the requirement to limit maintenance, AWS Lambda (Option A) is the best option for hosting C# code on AWS.