angst
angst

Reputation: 49

How to safely remove Load Balancer and route directly to EC2 Instance?

We have a single t2.micro instance serving a simple WordPress site, which for some reason is connected to a load balancer (this is pointless right?). And it is costing us way too much for the very little traffic and cpu usage we have.

I didn't set up our AWS and have no experience with the platform, but I'd like to safely delete the ELB. How can I do this without disconnecting our instance from the internet?

From what I seem to have understood, the ELB is sitting between the instance and the internet traffic - so if I disconnect the ELB I'm guessing that our t2.micro will no longer be accessible from the internet. Is this (roughly) correct?

Can anyone inform me (or point me in the direction of a comprehensive guide/walkthrough) about everything I need to change in order to directly route the traffic to my EC2 instance so I can kill the redundant ELB?

Thanks for any help in advance!

Upvotes: 0

Views: 444

Answers (1)

iTech
iTech

Reputation: 18460

If you use Route53, then you should find a CNAME that points your domain to the ELB.

Consider using CloudFront to access the EC2 instance.

Otherwise, if you want to access the EC2 directly, take these steps as rough guide:

  • Before changing anything, ensure that your EC2 instance is accessible over the Internet with a Public IP/DNS assignes to it. Even better as per the comment, assign Elastic IP, which is free as long as it is attached to instance

  • Allow access on the security group attached to the instance

  • In Route53, replace the ELB CNAME with the EC2 public DNS

Upvotes: 2

Related Questions