Search code examples
amazon-elastic-beanstalkamazon-ebsawsdeploy

How can I set an address like- 'sub-domain.elasticbeanstalk.com' in Elastic Beanstalk?


I have deployed my django project into AWS ELASTIC BEANSTALK (AWS EB). The default public address of the project is in this form: env-name.region-name.elasticbeanstalk.com.

After some searching I've found out I can modify the env-name portion using modifying the CNAME and I have applied it. It worked!

But, when I tried to set up a direct sub-domain like subdomain-name.elasticbeanstalk.com I couldn't do this. I have searched for a while by different search term, but I couldn't find out a way to do that.

So, my questions are-

Is it even possible to create this form of address: subdomain-name.elasticbeanstalk.com?

If it's possible, then how can I do that?

[OPTIONAL] If it's not possible, then can anyone will be able to give me an explanation?


Solution

  • Question 1;

    This is not possible, all environments have the region in the url, this is because the dns is routed to this specific region.

    Question 3;

    I would suggest using your own custom domain and setup an alias/cname record to point to your beanstalk environments, explained in this documentation.