尝试使用脚本更新 Amazon Route53,但域未更新
我有几个运行 Ubuntu 10.04 的 Amazon EC2 实例,我想在其中使用 Amazon 的 Route53。我按照 Shlomo Swidler 的 文章,但我还是缺少一些东西。
当脚本运行时,它不会返回任何输出,我最初认为这意味着它运行正确。但是,当我使用 MyR53DNS 检查 DNS 记录时,我的实例没有任何条目。这是我的脚本:
#!/bin/tcsh -f
set root=`dirname $0`
setenv EC2_HOME /usr/lib/ec2-api-tools
setenv EC2_CERT /etc/cron.route53/ec2_x509_cert.pem
setenv EC2_PRIVATE_KEY /etc/cron.route53/ec2_x509_private.pem
setenv AWS_ACCESS_KEY_ID myaccesskeyid
setenv AWS_SECRET_ACCESS_KEY myaccesskey
/usr/bin/ec2-describe-instances | \
perl -ne '/^INSTANCE\s+(i-\S+).*?(\S+\.amazonaws\.com)/ \
and do { $dns = $2; print "$1 $dns\n" }; /^TAG.+\sShortName\s+(\S+)/ \
and print "$1 $dns\n"' | \
perl -ane 'print "$F[0] CNAME $F[1] --replace\n"' | \
xargs -n 4 /etc/cron.route53/cli53/cli53.py \
rrcreate -x 60 mydomain.com
有人发现这个脚本有问题吗?如果不是脚本,还有什么可能阻止我的 Route53 域更新?
我正在使用安全组来限制实例的 IP。我尝试过打开53端口,但似乎没有效果。 Route53 是否使用其他端口?
我非常感谢 StackOverflow 社区可以提供的任何帮助或指导。如果您需要任何进一步的信息,请告诉我。
I have several Amazon EC2 instances, running Ubuntu 10.04, with which I'd like to use Amazon's Route53. I setup a script as described in Shlomo Swidler's article, but I'm still missing something.
When the script runs, it doesn't return any output, which I initially assumed meant it ran correctly. However, when I check the DNS records using MyR53DNS, there are no entries for my instances. Here's my script:
#!/bin/tcsh -f
set root=`dirname $0`
setenv EC2_HOME /usr/lib/ec2-api-tools
setenv EC2_CERT /etc/cron.route53/ec2_x509_cert.pem
setenv EC2_PRIVATE_KEY /etc/cron.route53/ec2_x509_private.pem
setenv AWS_ACCESS_KEY_ID myaccesskeyid
setenv AWS_SECRET_ACCESS_KEY myaccesskey
/usr/bin/ec2-describe-instances | \
perl -ne '/^INSTANCE\s+(i-\S+).*?(\S+\.amazonaws\.com)/ \
and do { $dns = $2; print "$1 $dns\n" }; /^TAG.+\sShortName\s+(\S+)/ \
and print "$1 $dns\n"' | \
perl -ane 'print "$F[0] CNAME $F[1] --replace\n"' | \
xargs -n 4 /etc/cron.route53/cli53/cli53.py \
rrcreate -x 60 mydomain.com
Does anyone see a problem with this script? If its not the script, what else could be preventing my Route53 domain from being updated?
I am using the Security Groups to IP-restrict the instances. I've tried opening port 53, but that didn't seem to have an effect. Is there another port that Route53 uses?
I'd appreciate any help or guidance the StackOverflow community can offer. Let me know if you need any further info.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在几个不同的地方发布了这个问题来寻找答案。我终于在 StackExchange Unix & Linux 站点。
我希望这对其他人有帮助。
I posted this question in several different places looking for an answer. I finally found it on the StackExchange Unix & Linux site.
I hope this helps someone else out there.