6
votes

My iOS software platform runs on AWS Elastic Beanstalk and has a URL we'll call "something.elasticbeanstalk.com". I have a website we'll call "website.com" I purchased and operate the DNS records for through Namecheap. I need to make the URL my iOS client apps use to connect to the server HTTPS since Apple is requiring this soon due to App Transport Security.

WHAT I THINK I'M SUPPOSED TO DO

What I think I'm supposed to do is, create an SSL certificate for "website.com" and apply that SSL certificate to the AWS EB load balancer. Then I need to create a subdomain for "website.com" that redirects traffic to "something.elasticbeanstalk.com". Client apps connect to the subdomain of "website.com" which is now HTTPS and redirects to "something.elsastic.beanstalk.com". Is that correct?

WHAT I'VE DONE SO FAR

So far, I created a SSL certificate for "website.com" using AWS Certificate Manager. For this I had to verify my email address associated with "website.com". I then applied that SSL certificate to my environment's load balancer int the AWS Management Console. After that, I went into Namecheap and followed this guide in the 'Domain Name & AWS 53 Management' section to do it.

I read in this article that I needed to create an alias and/or set up Nameservers in AWS Route53. I tried doing that but don't know what I'm doing and it seems to conflict with the Medium article I linked above that I followed telling me to change the CNAME record for the URL and the Redirect URL record for "website.com".

QUESTION

What do I do from here?

1
Did you move your DNS completely from Namecheap to Route53? You could have just created a CNAM entry in Namecheap and not used Route53 at all. Also you said you made an SSL certificate in Route53, but that is a DNS service that doesn't really have anything to do with SSL certificates. You probably made the SSL certificate in the AWS Certificate Manager service. Anyway, the SSL certificate has absolutely no relation to your domain's DNS configuration. - Mark B
What you did on Namecheap is all you needed to do. The Route53 stuff would be needed if you were using Route53 instead of Namecheap. You should be able to just delete that Route53 hosted zone to prevent getting billed further for that. That tutorial you linked to is terrible and has you moving your entire DNS service from Namecheap to Route53 without explaining in the article that that is what you are doing. - Mark B
If you need "something.com" to function as a website hosted somewhere else, then you can't also have "something.com" pointing to an application hosted on EB. You need to have "something.com" pointing to whereever you are hosting your website, and create a new CNAME record for a subdomain like "api.something.com" that points to elastic beanstalk. - Mark B
That's correct. You might also have to recreate the SSL certificate using the subdomain you want to use for the application. - Mark B
There is no URL redirect record. You only needed a redirect if you needed to redirect the root domain "website.com" to a subdomain like "www.website.com". Forget about Route53. Delete the hosted zone on Route53 so you stop getting charged for it, and forget it exists. You would only need to copy the nameservers over if you were moving DNS hosting from Namecheap to Route53. You created a CNAME that says data.website.com points to this app on Elastic Beanstalik. Just wait a few hours for the DNS to propagate and you're done. - Mark B

1 Answers

5
votes

SITUATION

-I have a Parse Server on Elastic Beanstalk with URL “something.elasticbeanstalk.com”

-I have a domain with Namecheap called “website.com”

WHAT I NEEDED

I needed to make my client app connect to an HTTPS address since Apple is requiring it shortly with App Transport Security. Since I couldn’t get an SSL certificate using AWS certificate manager for “something.elasticbeanstalk.com”, I created one for “website.com”. I then needed to have my client app connect to the HTTPS “website.com” which would forward it over to “something.elasticbeanstalk.com”. This satisfied the HTTPS requirements of Apple.

HOW TO DO IT

  1. Make an SSL certificate for “website.com” using AWS Certificate Manager. You will need to confirm the domain via a confirmation email to the administrator for it.

  2. Apple the SSL certificate for “website.com” to the AWS EB Load Balancer. Go to your AWS EB Console, click "configuration", click "Load Balancing" under the "Network Tier" category. Now under the first category which is "Load Balancer", select the SSL record you made and apply it in the "SSL certificate ID" section.

  3. Set a CNAME record for “website.com” with a host of whatever subdomain of “website.com” you want. I chose “data” as my host value and subdomain (so my subdomain is “data.website.com”). Set the value of the CNAME record to “something.elasticbeanstalk.com”. Wait for it to propagate. It’s usually pretty fast but not always.

  4. (I’m unsure if this particular step is proper but it worked for me) Set the serverURL of Parse-Server to “https://something.elasticbeanstalk.com” and the publicServerURL to “https://data.something.com

  5. In the Parse “initializeWithConfiguration” method in your client app that enables the app to connect to the server, change the server URL to “https://data.something.com/parse”. NOTE: include the “/parse” which is the MOUNT PATH of the parse-server. This value MAY BE DIFFERENT for you depending on how you set it but I set it to “/parse” since that’s what I saw in the Parse-Server docs.

NOTES

-I deleted all Route53 records since they are irrelevant here since “something.com” DNS services are controlled by Namecheap.

-A Redirect URL record in Namecheap is unnecessary