AWS LWA allows running any web application on supported deployment platforms without having to adapt them to Lambda.
This example demonstrates LWA usage by deploying a simple HonoJS web application using OpenTofu.
NodeJS 22.xOpenTofuAWS Account
After cloning, run the following commands:
make app-install
make tf-init- Run the application:
make app-dev - Build the application:
make app-build - Run the built application in preview mode. LWA will use the
run.shfile to start the application:make app-preview
- Assume a role in an AWS account.
- Create and validate plan:
make tf-plan - Deploy the infrastructure:
make tf-apply - Destroy the infrastructure:
make tf-destroy