Goals
- Use serverless
- Use amplify
- CRUD operations
- Use SQL database
Notes: I tested everything locally and deployed all but RDS to aws though the configuration was validated.
Reference the ENV file to change defaults for the DB and AWS profile. Normally you would not commit this file but for this example I am including it.
cd todoer
install.sh
-
docker-compose up | cat > db.log
-
cd services/todo-api
-
sls offline | cat > api.log
-
cd ../../
-
npm run start
-
Change the env variable
AWS_PROFILE=amplify-sls-profile
- Either create a new aws profile and call it amplify-sls-profile or use an existing one you have.
-
install.sh
-
deploy.sh
-
Replace line 37 in
src/aws-exports.ts
->endpoint: 'http://localhost:3000/dev'
-
Change the env variable
AWS_PROFILE=amplify-sls-profile
- Either create a new aws profile and call it amplify-sls-profile or use an existing one you have.
-
deploy-remote.sh