Adib Aroui
Adib Aroui

Reputation: 5065

same AMI on multiple EC2 instances vs multiple AMIs on multiple instances

I am planning to move a web application to AWS for the first time. It contains (locally):

Assuming that my application will need more resources over time, I have two things in mind:

1 - Launch new instance with the AMI containing all the software. In this case, resources of the instance are shared between all softwares.

2- Create 'group's and use multiple AMIs, each AMI contain one software. In this scenario, launching a new instance in a group will add resources to only one software.

What is the most used and convenient approach? Does the second approach need more tools/software to implement?

Thank you very much for your usual help.

Upvotes: 0

Views: 883

Answers (1)

chris
chris

Reputation: 37490

You need to decide what parts of your stack are public and what are internal only. You probably don't want to expose your ES cluster or database to the public.

Then decide the appropriate technology for each part of the stack.

For the database, RDS is a no-brainer.

For search, decide if you want to manage the cluster yourself or if the AWS Managed Elasticsearch will do.

For the web and websockets, both supported by the Application Load Balancer. I would have separate target groups, with separate autoscaling groups for each. One additional reason for using a load balancer, vs just a single instance, is to be able to take advantage of the AWS Certificate Manager to provision and deploy a cert to enable TLS for your site.

Then you just need to decide if you want to use path-based routing or host-based routing for your front end.

So each tier would have it's own AMI (if that's how you're doing deployments) and can be monitored and scaled independently.

Upvotes: 1

Related Questions