this project is based on litemall,We have made some modifications to it so that it can run correctly and efficiently on AWS Lambda.
This project is only for learning purposes. If it is used for commercial purposes, please contact the original author
What changes have we made:
- Treat litemall as a regular Java web project and use aws-lambda-web-adapter to package it, so that we can migrate traditional Java web projects to AWS lambda with minimal changes
- The AWS lambda snapstart feature has been enabled, which makes the cold start speed of Java projects running on AWS lambda faster.
- Added Amazon ElastiCache Redis as a distributed cache,modified Litemall's Shiro to use Redis for distributed session synchronization. This allows multiple lambda instances to synchronize user login status.
- Added a POC(Proof Of Concept):use Amazon Q to update litemall from java 8 to java 17
- Add AI functionality to Litemall by using AWS Bedlock
Recommended software runtime environment
SDK | version |
---|---|
JDK | 1.8.x & 17.x |
NodeJs | 20.x |
for deploy detils: litemall doc
- change to project's root directory litemall
- maven package project
# maven build project mvn clean mvn install mvn clean package
- use aws sam deploy project to aws lambda
# sam build project sam build # deploy to aws lambda sam deploy
- change to project's litemall-admin directory litemall-admin
- use npm build frontend project
cd litemall-admin npm install --registry=https://registry.npmmirror.com # for developing and debugging locally npm run dev # optional: for test environment # npm run build:dep # optional: for product environment # npm run build:prod
- change to project's litemall-vue directory litemall-vue
- use npm build frontend project
cd litemall-vue npm install --registry=https://registry.npmmirror.com # for developing and debugging locally npm run dev # optional: for test environment # npm run build:dep # optional: for product environment # npm run build:prod
See CONTRIBUTING for more information.
This library is licensed under the MIT-0 License. See the LICENSE file.