3

I have recently used AWS elastic beanstalk to migrate my parse application server. Everything is working well with just plain HTTP, but I need more security so I've tried diving into the AWS documentation for setting up HTTPS with my server.

My goal is to have a scaleable server using a load balancer which protects all parameters in my API calls.

What I've done:

  1. Purchased a domain name from Namecheap.

  2. Setup a CNAME alias in Namecheap to point to the DNS of my load balancer management in namecheap

  3. Created a certificate using AWS Certificate manager for this purchased domain name

  4. Added a load balancer in the network tier of my beanstalk instance I've turned off the HTTP port because I only want the api to be called with HTTPS

  5. Created a Route 53 Hosted Zone for this domain and added a record set enter image description here

Now I'm not sure how to use or test this. Before I had a load balancer I would just input the DNS name of my beanstalk instance when calling the Parse Server with

curl -X GET -H "X-Parse-Application-Id: XXX-XXX-XXX-XXX" -H "Content-Type: application/json" https://my-name.us-east-1.elasticbeanstalk.com/parse/classes/GameScore

But anytime I run this I get a: curl: (51) SSL: no alternative certificate subject name matches target host name error.

So I figured I might now need to start point my requests at the domain name I purchased? Or possibly the load balancer?

Do you see anything wrong with this setup?

I saw a very similar question here Setting up Elastic Beanstalk application with HTTPS

and like this person, my domain is just timing out right now. The given answer didn't make much sense to me.

  • Yes, you'd want to point curl at the URL the SSL certificate is for. Or add -k to the cURL call to skip SSL verification. – ceejayoz Jun 25 '16 at 16:45
  • So in my old curl I can pass parameters and headers. If I change the curl URL to be curl -X GET -H "X-Parse-Application-Id: XXX-XXX-XXX-XXX" -H "Content-Type: application/json" my-domain.com/parse/classes/GameScore would this correctly get it to the /parse/classes/GameScore route on the actual EB server without changing the headers or any included parameters? – Peter Kaminski Jun 25 '16 at 16:48
  • Wow. I just tried it and it worked! Was not expecting that. Thanks for the quick help. – Peter Kaminski Jun 25 '16 at 16:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.