Closed binchoo closed 2 years ago
As-is: API Gateway + PaimonGanyuSpringBootApp on AWS Lambda
To-be:
./gradlew bootRun
UserHoyopassTable
, UserDailyCheckTable
, UserRedeemTable
and two SSM paramters (HoyopassPublicKey
andHoyopassPrivateKey
).Disgusting to write down to template.yaml.
Let's use Elastic Beanstalk.
The principle: "Keep single-jar deployment."
[x] PaminGanyu> :application
module
.ebextensions
file. Keep the principle.)HealthCheckController
to support ALB's health checking mechanisms./health
handler mapping.application.properties
> set server.port=5000
to customarily handle the proxied request from nginx. What the doc says:
--HTTP(80)--> ALB --HTTP(80)--> ASG --HTTP(80)--> NGINX --HTTP(5000)--> SpringBootApp
paimonganyu-skill
's instance profile.
paimonganyu-skill
.Do not bother yourself to tell that a process is using the 5000 port, because NGINX transparently forwards requests from 80 to 5000.
PaimonGanyuSpringBootApp
section in the original template.yaml
.paimonganyu-skill.yaml
that configures the paimonganyu-skill
application.
prod
and test
.PaimonGanyuSpringBootApp.Properties.Events
is gonna be removed.paimonganyu-skill
beanstalk app.
As-is
Running a SpringBoot application on a lambda container is not optimal at all. The
aws-serverless-java-container
module is trying the best to support SpringBoot apps on the lambda service, but it is not satisfying me.Cons:
Pros: