0

Good day all,

Scenario:

  • I am building a web application based on ASP.NET Core Zero Framework. This web application will utilize both front-end components such as login page, reports, etc. as well as exposed RESTFUL services. This application needs to be hosted in AWS.

Requirements:

  • ASP.NET Core application.
  • MVC as front-end
  • Restful API's as back-end
  • Authorization decoupled from API's (AWS Cognito)

Problem:

  • I am not sure if I should use AWS Fargate for everything or AWS Lambda.
  • If I use AWS Fargate, how would I use AWS API Gateway to add authorization to my API's. The fargate tasks run in a VPC and API Gateway cannot access them.

Question:

  • What would be the best solution, Fargate or Lambda or something completely different.

Kind Regards Simon Erasmus

Simon Erasmus
  • 134
  • 12

1 Answers1

1

AWS container service team member here. This is a very open ended question whose answers will most likely be based on opinions and preferences. These questions often don't lend well on Stackoverflow. In general we see Fargate being used for deployments that implement the very traditional service model associated with standard compute resources (e.g. EC2 or containers) where you launch a process and that process is long lived to accept connections. Lambda is used when you can re-factor your code to work with a specific programming model (function). Many customers are confused by the fact that "Lambda supports containers" but that is limited to the packaging format (Vs. Lambda traditional packaging which is zip). In other words, Lambda supporting containers doesn’t mean you can run ANY container image on Lambda. See here for more background.

We, anecdotically, more commonly see API GW being used with Lambda and ALB/NLB being used with Fargate but it is indeed possible to use API GW with Fargate as well (see here for an example).

mreferre
  • 5,464
  • 3
  • 22
  • 29