This is just a sample project used by me for learning how to use:
- AWS API Gateway
- AWS Lambda
- Terraform
- Node.JS and NPM
- Terraform
Install the Node.JS dependencies:
npm install
Zip the lambdas using:
npm run zip
Then execute terraform:
terraform apply
Terraform will ask for your AWS account ID. After inserting it, you can go to AWS and deploy the API manually.
Returns a list of movies in the following format:
[
{
"id": "b973b68e-83e2-4ad6-9bce-c3fe025168f2",
"name": "The Dark Knight Rises",
"year": 2012,
"director": "Christopher Nolan"
}
]
Creates a movie. You need to inform the following JSON body:
{
"name": "The Dark Knight Rises",
"year": 2012,
"director": "Christopher Nolan"
}
The API will return you the movie object with it's generated ID:
{
"id": "b973b68e-83e2-4ad6-9bce-c3fe025168f2",
"name": "The Dark Knight Rises",
"year": 2012,
"director": "Christopher Nolan"
}