EC2 instance - Elastic IP disassociated overnight

0

This is with an EC2 instance created by Elastic Beanstalk single instance environment. Initially, EB creates and associates the Elastic IP. Then, seemingly randomly, the environment goes down because the elastic IP is not longer associated to the EC2 instance. It has been an 'in the morning thing' so it seems to be overnight possibility when servers have started/stopped automatically. But no one has made changes or even logged into the console. Also, there is no disassociation event in CloudTrail (see pictures below). Re-associating the Elastic IP to the EC2 instance brings the environment back up.

I can't see or find any reason for the Elastic IP to be disassociated. Elastic Beanstalk created all of the services. I can't find any documentation or comments that explain this. Please help!

No disassociation events Elastic Ip Dissassociated

Keith
asked 13 days ago29 views
1 Answer
0

The issue you're experiencing with the Elastic IP address being disassociated from your EC2 instance overnight is unusual and not a standard behavior for Elastic Beanstalk or EC2 instances. Since there are no disassociation events in CloudTrail and no manual changes were made, it's challenging to pinpoint the exact cause without more information.

However, there are a few potential reasons and steps you can take to investigate and potentially resolve this issue:

  1. Check your Elastic Beanstalk environment configuration: Ensure that there are no scheduled actions or configuration changes that might be triggering instance replacements or updates overnight.

  2. Review your EC2 Auto Scaling settings: If your Elastic Beanstalk environment is using Auto Scaling, check if there are any scaling activities occurring overnight that might be terminating and replacing instances.

  3. Examine EC2 instance status checks: Look for any failed status checks or instance recoveries that might have occurred, which could potentially lead to instance replacement.

  4. Monitor your Elastic IP address associations: Set up CloudWatch alarms to notify you when an Elastic IP address is disassociated from an instance.

  5. Check for any AWS service issues: Review the AWS Service Health Dashboard for any reported issues with EC2 or Elastic Beanstalk in your region during the times when the disassociation occurs.

  6. Consider using an Elastic Beanstalk operations role: This feature (currently in beta) allows Elastic Beanstalk to manage permissions for downstream services, which might help maintain more consistent resource associations.

If the issue persists, contact AWS Support: They can help investigate the root cause by examining logs and events that might not be visible to you in the console.

As a temporary workaround, you can create a script that periodically checks the Elastic IP association and re-associates it if necessary. However, this should be considered a short-term solution while you work on identifying and addressing the root cause.

Remember to document each occurrence, including exact times and any relevant instance or environment information, as this will be valuable for troubleshooting and if you need to escalate to AWS Support.
Sources
Migrate to a new instance type by launching a new EC2 instance - Amazon Elastic Compute Cloud
DisassociateEnvironmentOperationsRole - AWS Elastic Beanstalk

profile picture
answered 13 days ago
profile picture
EXPERT
reviewed 12 days ago
profile picture
EXPERT
reviewed 13 days ago
profile pictureAWS
EXPERT
iBehr
revised 13 days ago
profile pictureAWS
EXPERT
iBehr
revised 13 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions