You can deploy the Rails application as a Rails - Puma application for an elastic bean stack or docker. The answer will be more general and accurate where to start than a complete solution.
Ruby - Puma
It can be quite complicated: if you create a new Elastic Beanstalk environment for Ruby through the console (in a web browser), it can install the default Passenger platform instead of the Puma platform. And probably you cannot change it in the console:

To create a new environment with Puma, use eb cli . Good walkthrough here . However, before you run eb create , you need to do one more thing - choose a platform:
$ eb platform select It appears you are using Python. Is this correct? (y/n): n Select a platform. 1) Go 2) Node.js 3) PHP 4) Python 5) Ruby 6) Tomcat 7) IIS 8) Docker 9) Multi-container Docker 10) GlassFish 11) Java (default is 1): 5 Select a platform version. 1) Ruby 2.3 (Puma) 2) Ruby 2.2 (Puma) 3) Ruby 2.1 (Puma) 4) Ruby 2.0 (Puma) 5) Ruby 2.3 (Passenger Standalone) 6) Ruby 2.2 (Passenger Standalone) 7) Ruby 2.1 (Passenger Standalone) 8) Ruby 2.0 (Passenger Standalone) 9) Ruby 1.9.3 (default is 1):
If you want to create an Elastic Beanstalk Worker instead of a web server, run:
$ eb create -t worker
To set a different configuration, you can use the console (web browser) or eb cli ( docs ).
Docker
The following post may be useful on how to configure Rails + Puma + Nginx + Docker:
http://codepany.com/blog/rails-5-and-docker-puma-nginx/
This is a multi-container configuration where Nginx is bound to port 80 and the stream requests puma through the socket. In your case it will be: "unix:///var/run/puma/my_app.sock"
To download Dockers, you can use AWS ECR to store Docker images. You need to create the Dockerrun.aws.json file (it is very similar to the docker-compose.yml file), which you can deploy through the AWS console (web browser) into your environment.
EDIT
Here is the puma.rb configuration file:
threads_count = ENV.fetch('RAILS_MAX_THREADS') { 5 } threads threads_count, threads_count bind "unix:///var/run/puma.sock?umask=0000" stdout_redirect "/var/log/puma.stdout.log", "/var/log/puma.stderr.log", true
Some settings may vary, but the fact is that I connect the puma server to the UNIX socket there and connect to NGINX. NGINX configuration file:
user root; error_log /var/log/app-nginx-error.log; pid /var/run/app-nginx.pid; events { worker_connections 8096; multi_accept on; use epoll; } http { include /etc/nginx/mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/app-nginx-access.log main; sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 10; upstream appserver { server unix:///var/run/puma.sock; } server { listen 80 default_server; root /var/www/public; client_max_body_size 16m; location ^~ /assets/ { gzip_static on; expires max; add_header Cache-Control public; } try_files $uri/index.html $uri @appserver; location @appserver { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Host $server_name; proxy_set_header Client-IP $remote_addr; proxy_pass http://appserver; } access_log /var/log/app-nginx-access.log; error_log /var/log/app-nginx-error.log debug; error_page 500 502 503 504 /500.html; } }
The most important part of the NGINX configuration file:
upstream appserver { server unix:///var/run/puma.sock; }