aws-samples / aws-refarch-wordpress

This reference architecture provides best practices and a set of YAML CloudFormation templates for deploying WordPress on AWS.
MIT No Attribution
1.08k stars 609 forks source link

Rollback on Route53 #22

Closed dbeja closed 6 years ago

dbeja commented 6 years ago

Hi,

I've been trying to run the stack on eu-west-1 but it always rollback on Route53:

15:47:52 UTC+0000 | CREATE_FAILED | AWS::CloudFormation::Stack | route53 | Embedded stack arn:aws:cloudformation:eu-west-1:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx was not successfully created: The following resource(s) failed to create: [RecordSet].

How can I debug this error? I'm trying to use a subdomain like sites.mydomain.com, and I already have the hosted zone for mydomain.com created. I didn't created the sites record on route53.

Thanks!

michael-newman commented 6 years ago

Did you happen to see Closed Issue #15: Terminates and Rollback on Route 53 setup ?

From above, it sounds like you need to create a sites.mydomain.com hosted zone before re-running the template...

dbeja commented 6 years ago

I did but I already have a hosted zone for my domain.com. So I should also create a different one just for sites.mydomain.com?

Thanks!

michael-newman commented 6 years ago

yes, you will need to create new Hosted Zone for sites.mydomain.com then copy the NS records created there into your main domain mydomain.com via Create Record Set, Name: sites.mydomain.com, Type: NS - Name Server, Value: just copy the NS records from sites.mydomain.com here, then hit create.

dbeja commented 6 years ago

ok, perfect it worked, but I asked for sites.mydomain.com and I got www.sites.mydomain.com. Is there a setting on the script to not put on www?

Thanks!

michael-newman commented 6 years ago

What I wound up doing was adding another record in the hosted zone for sites.mydomain.com.

Name: leave as sites.mydomain.com, Type: A - Alias, Value: www.sites.mydomain.com should be in the pick list, then hit create. Once it propagates, you should be able to get to your site w/o the www.

dbeja commented 6 years ago

Great, thanks! I did that and worked fine but after that I just pointed the A record of sites.mydomain.com to ELB and then updated wordpress to point the new url.