简体   繁体   English

如何在 AWS 的 VPC 中刷新 DNS 条目?

[英]How do I flush DNS entries in my VPC in AWS?

I recently added VPC Endpoints to my CloudFormation stack.我最近将 VPC 端点添加到了我的 CloudFormation 堆栈中。 I then deleted my stack and tried to recreate it.然后我删除了我的堆栈并尝试重新创建它。

When I tried to recreate it, I got the following error:当我尝试重新创建它时,出现以下错误:

private-dns-enabled cannot be set because there is already a conflicting DNS domain for secretsmanager.us-east-2.amazonaws.com in the VPC vpc-63170e0b (Service: AmazonEC2; Status Code: 400; Error Code: InvalidParameter; Request ID: b7d28d81-c2c0-4f44-9642-f22171cf513d)

I suspect the error is here because the VPC's private DNS still has an entry from the last time the stack was created.我怀疑错误就在这里,因为 VPC 的私有 DNS 仍然具有上次创建堆栈时的条目。

Is there a way to manually remove entries from the private DNS of the VPC?有没有办法从 VPC 的私有 DNS 中手动删除条目?

This is some kind of eventually consistency behavior when the private hosted zone record is deleted.这是删除私有托管区域记录时的某种最终一致性行为。 It take some time and during it you will experience this error.这需要一些时间,在此期间您会遇到此错误。 Just wait some minutes and try again.请稍等几分钟,然后重试。 It worked for me.它对我有用。 Deploys performed after this first success are completed without problems.在第一次成功之后执行的部署可以顺利完成。

Do no try to modify the VPC endpoint record manually because you will not find any "private hosted zone" in Route53.不要尝试手动修改 VPC 端点记录,因为您在 Route53 中找不到任何“私有托管区域”。 It is some kind of internal private hosted zone for AWS endpoints that is visible only from your VPC when you send a request to your VPC DNS endpoint.它是 AWS 终端节点的某种内部私有托管区域,当您向 VPC DNS 终端节点发送请求时,它仅在您的 VPC 中可见。

Im suffering exactly the same.我的痛苦完全一样。

private-dns-enabled cannot be set because there is already a conflicting DNS domain for monitoring.eu-west-1.amazonaws.com in the VPC vpc-.....无法设置 private-dns-enabled 因为在 VPC vpc-中已经有一个冲突的 DNS 域进行监控。eu-west-1.amazonaws.com

I did the following:我做了以下事情:

$ aws route53 list-hosted-zones
{
    "HostedZones": []
}

It didnt help.它没有帮助。 There is not any private hosted zone to fix it.没有任何私有托管区域可以修复它。

Anyone can help?任何人都可以帮忙吗?

I received a similar error when trying to rename and VPC endpoint in a CloudFormation stack.在尝试重命名 CloudFormation 堆栈中的 VPC 端点时,我收到了类似的错误。 There is no option to wait, so I fixed it by using the following steps:没有等待的选项,所以我使用以下步骤修复了它:

  • Log into the AWS Console登录AWS 控制台
  • Navigate to VPC -> Vitual Private Cloud -> Endpoints导航到VPC -> Vitual Private Cloud -> Endpoints
  • In the list of Endpoints , find the entry causing the issueEndpoints列表中,找到导致问题的条目
  • CLick on the entry and select Actions -> Delete Endpoint单击条目和 select Actions -> Delete Endpoint
  • Wait for deletion (can take a few minutes)等待删除(可能需要几分钟)

I then reran my CloudFormation stack and all worked.然后我重新运行了我的 CloudFormation 堆栈,一切正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何让 AWS Client VPN 使用 VPC 对等私有托管区域来解析 DNS - How do I get AWS Client VPN to resolve DNS using VPC-peered Private Hosted Zone 如何在VPC上下文中将我的AWS :: EC2 :: DBSecurityGroup连接到我的AWS :: RDS :: DBSecurityGroup? - How do I connect my AWS::EC2::DBSecurityGroup to my AWS::RDS::DBSecurityGroup in a VPC context? 如何通过AWS解析DNS? - How do I resolve my DNS through AWS? Cloudformation:如何使用AWS :: Route53 :: RecordSet设置多个dns条目 - Cloudformation: How do I setup multiple dns entries using AWS::Route53::RecordSet 如何配置我的 PUBLIC AWS 自定义域以解析为我的 VPC 配置的 lambda? - How do I configure my PUBLIC AWS custom domain to resolve to a lambda that is configured for my VPC? 如何使用 AWS EKS 中的 static DNS 向我的 vpc 中的所有用户公开 kubernetes 仪表板? - How to expose kubernetes dashboard to all users within my vpc using a static DNS in AWS EKS? AWS VPC DNS主机名打开或关闭 - AWS VPC DNS Hostnames on or off 如何列出我的AWS VPC的区域? - How can I list the regions for my AWS VPC? 如何为 Elasticsearch 创建 AWS VPC 终端节点? - How do I create an AWS VPC Endpoint for Elasticsearch? 如何从VPC中的Lambda调用AWS Rekognition - How do I invoke AWS Rekognition from a Lambda within a VPC
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM