How to enable Secure Web Sockets on Elastic Beanstalk - node.js

Documentation exists for enabling insecure web sockets on AWS Elastic Beanstalk with an ALB, however, nothing appears to exist that shows how to enable secure websockets (wss://) on Elastic Beanstalk.
Looking for the .ebextensions configuration for enabling secure websockets on Elastic Beanstalk for a node app using the ws library.

Related

configure https://domainname:3000 in AWS ec2 instances

There is a NodeJS application hosted in the AWS EC2 instance. We need to configure HTTPS for the instance of all ports like 3000,1337 and 8080 for Call service through our Android apps.
here We are puzzled to configure https://domainname:3000,https://domainname:1337 and https://domainname:8080. Please suggest to us how we can solve this using Nginx or AWS load balancer.
Please check below useful links for deployed node in AWS
https://sumantmishra.medium.com/how-to-deploy-node-js-app-on-aws-with-github-db99758294f1
https://ourcodeworld.com/articles/read/977/how-to-deploy-a-node-js-application-on-aws-ec2-server
https://aws.plainenglish.io/deploying-a-nodejs-application-in-aws-ec2-c1618b9b3874

I have an angular app with a Node server - no DB yet. How to deploy on AWS?

I'm not sure where and how to start with AWS for deploying, very confused at the moment. It seems like I deploy my server on Elastic Beanstalk, but then where does my build and static files go? S3 I'm guessing? Should I just follow the tutorial for Beanstalk? Thanks!
You can use Elastic Beanstalk to host your entire application including Static files where it will resides in the web server.
The downside of it is the performance for large scale applications where you can leverage AWS S3 and CloudFront. So if you are a starter with AWS, then I would recommend to consider Elastic Beanstalk for entire application hosting for the moment.

HTTPS requirements - express server on AWS elastic beanstalk

I have written an express application which I have deployed on AWS. I want to understand if I need to enable https in my node js express server code or if the https enabled in the AWS console is enough i.e. is https between the web client and the AWS load balancer enough to protect my site or do i need to enable https within AWS infrastructure internally as well. Are there any other security considerations to be aware of in this scenario?

Security of hosting a RESTful API server on AWS Beanstalk or EC2

I want to host a RESTful API on AWS Beanstalk or EC2 so a client server in an on-premise data center can use it.
Is it secure to host a RESTful API server on AWS Beanstalk or EC2 without authentication and secure them only with security group ?
I put the client IP address into the security group which Beanstalk or EC2 instance uses. So only the client with this IP address can connect to the RESTful API server.
The client is located outside the AWS in a on-premise data center.
Is there any better solutions to handle this problem? I know it is possible to connect AWS VPC with on-premise network, but that seems to be a too expensive for us in such small use case.
Is it secure to host a RESTful API server on AWS Beanstalk or EC2 without authentication and secure them only with security group ?
No authentication is not a recommended method for securing RESTful API but security provided by AWS security groups is rock solid.
Another suggestion will be implementing HTTPS instead of HTTP. Please go through this article. http://aws.amazon.com/articles/1928

How to configure AWS Elastic Beanstalk for a Node.js WebSocket server?

I'm writing a pure Node.js WebSocket server with:
AWS Elastic Beanstalk
AWS Relational Database Service (RDS) for PostgreSQL
AWS Simple Notification Service (SNS) for Apple Push Notification Service (APNs)
Node.js ws module
Node.js pg module
I also want it to be secure, e.g.:
WSS (WebSockets over SSL/TLS)
DoS attack prevention
I've changed "proxy server" to "none," but which other configurations should I change?

Resources