#
AWS Services
Information is accurate as of 19th Oct 2022.
#
Deploying Node.js application with AWS
- Create an AWS Account
- Go to Elastic Beanstalk and click "Create Environment"
- Select "Web server environment"
- Fill the following details: Application name, Environment Name, Domain (optional), Platform (see screenshot below) and click "Create enviornment"
- Wait for environment to finish setting up, then you can access it from Environment.
- To update and deploy the environment, use "Upload and deploy" button. (create a ZIP file of your source code)
#
Buying a domain from AWS
- Go to Route 53
- Click on Domains > Register Domain
- Choose your domain name and add to cart
- Remember to verify your e-mail address after purchasing the domain
- On clicking the link, you should see this:
#
Add alias to the domain
- Go to Route 53 > Hosted Zones > (your domain)
- Click "Create Record"
- Enabled the "Alias" switch
- For "Route traffic to", select "Alias to Elastic Beanstalk environment", (your region) and the URL for the Elastic Beanstalk environment
#
Create SSL with Certificate Manager
- Go to Certificate Manager
- Click "Request" > Request a public certificate
- Enter the domain name (not elastic beanstalk URL) and pick DNS validation and request.
- (not sure if I did this) Go back to Route 53 > Hosted Zones > (your domain) and create a CNAME record, putting CNAME name as Record name and CNAME value as Value.
#
Use SSL with Elastic Beanstalk
- Go to Elastic Beanstalk > Configuration > Load balancer > Edit
- In Listeners, click "Add listener" and fill the following:
Reference: https://medium.com/@jameshamann/configuring-your-elastic-beanstalk-app-for-ssl-9065ca091f49