This project contains the handler function to the CloneAI Client
.
├── Makefile <-- Make to automate build
├── README.md <-- This instructions file
├── lambdas <-- Lambda definition directory
│ └── default <-- Default lambda directory
│ └── app.py <-- Lambda function code
├── shared_layer <-- Lambda layer directory
│ └── python <-- Content of the layer
├── test <-- Tests directory
└── template.yaml <-- SAM-CLI template definition
- AWS CLI already configured with Administrator permission
- Docker installed
- Python
- SAM CLI - Install the SAM CLI
Make a copy of the envs file and replace the content with your access tokens
cp .env.copy .env
Parameter | Description |
---|---|
STAGE | Stage identifier |
In this example we use the built-in sam build
to automatically download all the dependencies and package our build target.
Read more about SAM Build here
The sam build
command is wrapped inside of the Makefile
. To execute this simply run
make build
In order to VSCode can resolve dependencies in the shared_layer directory, add (o create if you don't have it) the folowing code to your .vscode/settings.json
{
"python.analysis.extraPaths": [
"shared_layer/python"
],
"python.autoComplete.extraPaths": [
"shared_layer/python"
]
}
To deploy the application, run the following in your shell:
make deploy STAGE=stage PROJECT_NAME=project_name
Parameter | Description | Default Value | Example |
---|---|---|---|
stage | Stage name to be used on the deploy process | dev | ["dev", "prod"] |
project_name | Prefix to be used in the aws cloud formation stack name | clone-template-lambdas | any |