🗺️
Labs Engineering Guide
HomeStandards
  • Labs Engineering Guide
  • Always Read This First!
  • Product
    • Product Roadmap
    • Planning Your Product
      • Jira
      • User Stories & Tasks
      • Daily Standups
  • Coding
    • Git Workflow
    • Git Rebase
    • Linting and Formatting
    • Environment Variables
  • GitHub
    • Github FAQ
    • GitHub Basics
    • Github Actions
    • Github/Jira Integration
  • AWS
    • AWS Basics
    • AWS Networking
    • Amplify
      • Amplify DNS
      • Amplify Deployment
    • Elastic Beanstalk
      • Elastic Beanstalk DNS
  • Heroku
    • Heroku Basics
    • Heroku Node Deployment
    • Heroku Networking
    • Heroku Pipelines
    • Heroku Review Apps
  • Okta
    • Okta Basics
      • Okta Application Setup
Powered by GitBook
On this page
  • Configuring your subdomain
  • Configuring SSL Termination
  • How it works...

Was this helpful?

  1. AWS
  2. Elastic Beanstalk

Elastic Beanstalk DNS

PreviousElastic BeanstalkNextHeroku Basics

Last updated 3 years ago

Was this helpful?

Configuring your subdomain

When your application is deployed to Elastic Beanstalk, you'll get an automatically generated URL that you can use to connect to your API. This is handy for doing a quick test, but not very useful otherwise. You want to get a proper domain, like c-ds.bridgestoprosperity.dev

This name follows our naming standards and is easier to remember and to share.

First, open the AWS Route 53 console at . Route 53 is Amazon's web service.

Then follow these instructions:

  1. Click 'Create Record'

  2. Use 'Simple Routing'

  3. Click Next

  4. Click 'Define Simple Record'

  5. Your subdomain should follow the naming standards set in the

    • Example: c-ds.bridgestoprosperity.dev

  6. Route traffic to 'Alias to Elastic Beanstalk environment'

  7. Region: us-east-1

    • You did create your environment in us-east-1 right?

  8. Record Type:

  9. Click 'Define Simple Record'

  10. Click 'Create Records'

Configuring SSL Termination

The above subdomain configuration simply gives your API an easier to read name, but does not enable SSL protection, which is essential for security.

The basic flow for hooking a proper domain name up to your environment is as follows:

  1. Open your environment in the AWS console

  2. Click 'Configuration'

  3. Click 'Edit' in the 'Load Balancer' section

  4. Click 'Add Listener' to add a new endpoint for your API

    1. Listener Port: 443

    2. Listener Protocol: HTTPS

      • This means the listener will encrypt traffic

    3. Instance Port: 80

      • This is the port your instances are listening on

    4. Instance Protocol: HTTP

      • The protocol your instances are using

    5. SSL Certificate

      • You should see a certificate with your domain in this list, if not, contact your APL

    6. Click 'Add'

    7. Scroll to the bottom and click 'Apply'

      • Don't forget this step!!

How it works...

When a machine (or human) wants to connect to your API, they first need to find the IP address of the endpoint where your API is hosted.

This is step one, where the caller (aka client) asks the name servers in your hosted zone to translate your domain name (e.g. c-ds.ecosoap.dev) to a proper IP address.

Once the client has the IP address, it will connect to your API, which is hosted in your Elastic Beanstalk environment. We've made this connection secure by adding an SSL certificate to your load balancer and enabling HTTPS.

The client will then send encrypted traffic over the internet to your API. Then, the load balancer sends the traffic to your actual API instances, running on servers or in containers. Since your load balance and application instances are on the same private network (not on the internet) we don't need to keep the traffic encrypted, which adds cost and reduces performance.

The traffic is decrypted by the load-balancer and sent to your application as unencrypted HTTP traffic on port 80.

Your A record will now have been created and you can start using it to access your API endpoint. For example:

This is the port for HTTPS traffic

https://console.aws.amazon.com/route53/
Domain Name System (DNS)
Labs Engineering Standards
A
http://c-ds.bridgestoprosperity.dev/
standard