Andrew Kloos
Andrew Kloos

Reputation: 4608

Elastic Beanstalk not removing old network interface upon new instance

I have an Elastic Beanstalk instance and when it rebuilds it doesn't remove the old network interfaces causing a public IP that is present to serve up the site. We've recreated the Elastic Beanstalk app but it's still not removing the old interfaces. Thanks!

Upvotes: 1

Views: 237

Answers (2)

Andrew Kloos
Andrew Kloos

Reputation: 4608

Ended up just redirecting the public ip to the domain name.

files:
  "/etc/httpd/conf/http-redirect.conf":
mode: "000644"
owner: root
group: root
content: |
  RewriteEngine On
  RewriteCond %{HTTP:X-Forwarded-Proto} !=https [OR]
  RewriteCond %{HTTP_HOST} !^website.com [OR]
  RewriteCond %{HTTP_HOST} ^www\. [NC]
  RewriteCond %{SERVER_NAME} ^(www\.)?(.*)$ [NC]
  RewriteCond %{HTTP_USER_AGENT} !ELB-HealthChecker
  RewriteRule ^/?(.*)$ https://website.com/$1 [L,R=301]

Upvotes: 0

Did you try deleting the Directory by going to the Directory Service Management Console:

https://console.aws.amazon.com/directoryservice/home?region=us-east-1

There is a forum, which i think you would have visited, in aws related to the same issue. May be this helps to you.

https://forums.aws.amazon.com/thread.jspa?threadID=99189

Upvotes: 0

Related Questions