private IP addresses of MWAA Web server keeps changing

0

hi,

Does anyone know why the private IP address of the MWAA web server keeps changing time to time? Example: i have an AWS MWAA environment and i created a DNS record in route53 against the IP address i get after running the dig command against the web server hostname, but the url stops working after few days and when i check the dig command again, i get a new IP. Any help would be great. Thanks.

1개 답변
5

The private IP address of the MWAA web server changes because it's running on an AWS Elastic Network Interface (ENI). ENIs are automatically created when you launch a new Amazon MWAA environment. When an environment is updated or experiences an internal failure, the ENI may be replaced, resulting in a new private IP address.

To avoid issues with changing IPs, instead of using an IP address in your Route 53 record, you should create a CNAME record pointing to the MWAA environment's web server hostname. This way, the URL will continue to work even if the IP address changes.

Here's an example of how to create a CNAME record in Route 53:

  1. Open the Route 53 Management Console in AWS.
  2. Select the hosted zone where you want to create the CNAME record.
  3. Click "Create record."
  4. Choose "Simple routing" and click "Next."
  5. Click "Define simple record."
  6. In the "Record name" field, enter the desired subdomain for your MWAA environment (e.g., mwaa.example.com).
  7. For "Value/Route traffic to," choose "Alias to another record in this hosted zone" and enter the web server hostname of your MWAA environment (e.g., abc123xyz.mwaa.environment.amazonaws.com).
  8. Set the "Record type" to "CNAME."
  9. Choose an appropriate TTL (Time to Live) value, such as 300 seconds or 5 minutes.
  10. Click "Create records."

Now, your custom domain (e.g., mwaa.example.com) should resolve to the MWAA environment's web server hostname, regardless of the underlying private IP address changes.

profile picture
전문가
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인