4. Configure EC2 (editing)
Launch an EC2
Launch an EC2 that will run jar.
name: our-company-lunch-ec2-v6
os: Amazon Linux 2023 AMI
type: t2.micro
subnet: public
security group: allow HTTP
The name tag input here will be used at CodeDeploy configuration. The -v6 suffix is just my trial counts.
Install java and nginx
Connect to the EC2 terminal.
Switch to root user.
sudo -iUpdate a package index.
dnf update -yInstall java.
Install nginx.
Configure nginx
This will relay a request from the designated address and port to localhost:8080.
A Spring server would be up and running on 8080 port.
client_max_body_size 20M for image upload.
nginx server name length related.
The default is 64.
Last updated