NodeJS app on AWS Lightsail with SSL

Create an instance on AWS Lightsail

Login to Lightsail page on AWS

Click on create instance

Setup nodeJS app

Setup apache configuration

Include "/opt/bitnami/apps/egg-eliminate/conf/httpd-app.conf" 
ProxyPass /
ProxyPassReverse /
Include "/opt/bitnami/apps/egg-eliminate/conf/httpd-prefix.conf" 

Create a nodeJS app

const http = require('http');const hostname = '';
const port = 3000;
const server = http.createServer((req, res) => {
res.statusCode = 200;
res.setHeader('Content-Type', 'text/plain');
res.end('Hello World');
server.listen(port, hostname, () => {
console.log(`Server running at http://${hostname}:${port}/`);

Test the app by access following

Setup SSL using Let’s Encrypt

Setup DNS record to access via subdomain A
1. Stop web server
2. Configure web server to use a free Let's Encrypt certificate for the domains:
3. Configure a cron job to automatically renew the certificate each month
4. Configure web server name to:
5. Enable HTTP to HTTPS redirection (example: redirect to
6. Start web server once all changes have been performed
Please provide a valid e-mail address for which to associate your Let's Encrypt 
Domain list: game.example.comServer name: game.example.comE-mail address []: pramendra@gmail.comThe Let's Encrypt Subscriber Agreement can be found at:
/tmp/bncert-xxxxx.logIf you find any issues, please check Bitnami Support forums at:
0 0 * * * sudo /opt/bitnami/letsencrypt/lego

Stay ahead of the curve. Subscribe for emerging business & tech trends in byte-sized chunks. Intrapreneur @ Mercari🗼🇯🇵