This is a project to experience application development on AWS with the actual minimal implementations!
It contains:
- Basic 3-tiers serverlss WEB application which depends on:
- Amazon API Gateway
- AWS Lambda
- Amazon DynamoDB
- Unit tests
- SAM (Serverless Application Model) CLI
- Docker
- for SAM Local
- for DynamoDB Local
- Both SAM Local and unit tests depend on it
- Python 3.6 or later
- Specified 3.8 as default
- You can easily change the version by modifying
pyproject.toml
This project depends on Poetry
to manage the environment and dependencies.
So first of all, install it using pip
command.
$ pip install poetry
And then, create its virtual environment and install dependencies.
$ poetry shell
$ poetry install
You can launch the application on your local machine with the following script, it performs:
- Pull the docker image of DynamoDB Local from dockerhub
- Create a docker network common between DynamoDB Local and SAM Local if not exists
- Lanuch DynamoDB Local
- Create DynamoDB schema into DynamoDB Local
- Launch application through SAM Local
$ bash scripts/samlocal.sh
You can run unit test with the following script, it performs:
- Lanuch DynamoDB Local
- Different container from SAM Local's one
- Run py.test
bash scripts/unittest.sh
This library is licensed under the MIT-0 License. See the LICENSE file.