If you are experience an issue while setting up this project, please take a look at the Common issues section of the documentation. If you cannot find a solution to your problem there, please create a ticket explaining the issue that you are experiencing and the steps to reproduce it.
To set up the development environment, you will need to install pyenv on your computer. You can find installation instruction at https://github.com/pyenv/pyenv#installation. Please make sure that you have the required tools and libraries installed in your environment. If you're using AWS Cloud9 with Amazon Linux 2, you can use make setup-cloud9
to install all necessary tools.
When pyenv is installed, you can run make setup
to configure the Python environment for this project, including development tools and dependencies.
You will also need Node version 12 or greater, jq and md5sum. md5sum is not available by default on MacOS but can be installed through the coreutils formula in homebrew.
If you want to deploy the entire project into your AWS account in a dev environment, you can run the command make all
in the root of this project. Please note that this will create an S3 bucket to store artifacts as part of the packaging step.
If you want to deploy only a specific service and its dependencies, you can use the command make deps-${SERVICE}
.
These commands will lint, build, run unit tests, package, deploy and run integration tests on the services.
If you want to deploy a complete pipeline to a production environment, you can run make bootstrap-pipeline
, which will deploy all services in all environments needed by the pipeline, the CI/CD pipeline itself and seed a CodeCommit repository with the latest commit from this repository.
When you want to push modifications to AWS, you can run git push aws HEAD:main
, which will push the latest commit from the current branch to the main branch in the CodeCommit repository.
All the following commands can be run without the service name (e.g. make tests-integ
to run integration tests for all services).
make ci-${SERVICE}
(e.g. make ci-products): lint, build and run unit tests for a specific service.make all-${SERVICE}
(e.g. make all-orders): lint, build, run unit tests, package, deploy to AWS and run integration tests for a specific service.make tests-unit-${SERVICE}
: run unit tests for a service, useful when you had a bug in the unit tests but don't need to rebuild the Lambda functions.make tests-integ-${SERVICE}
: run integration tests for a service, for when you had a bug in the integration tests.make tests-e2e
: run end-to-end tests that check if the overall ordering workflows work as expected.
To read how you can create a new service or modify an existing one, please read the service structure documentation.