This project showcases the usage of the AWS Cloud Development Kit (CDK) to provision an AWS infrastructure stack for managing books. The stack includes resources such as an Amazon DynamoDB table for storing book information and AWS Lambda functions for handling CRUD (Create, Read, Update, Delete) operations on the books.
You can find a demo of the frontend application that uses this backend stack here.
Source code for the frontend application can be found here.
The AWS CDK stack created by this project includes the following AWS resources:
- Name:
booksTable
- This table stores information about books, such as title, author...
getBooksFunc
: Retrieves a list of books (Scan) from thebooksTable
.putBooksFunc
: Adds a new book to thebooksTable
.deleteBooksFunc
: Deletes a book from thebooksTable
.getItemBooksFunc
: Retrieves a single book by its ID from thebooksTable
.
- An API Gateway named
Books
is created with the following endpoints:/books
: For listing, creating, and deleting books./books/{bookId}
: For retrieving individual books.
This project also includes user authentication using Amazon Cognito.
A user pool client is created to manage user access to the API. The API Gateway is configured to use this user pool as an authorizer, requiring users to sign in before they can access the API endpoints.
In each resource folder (e.g. lib/api
), there is a README.md
file that contains information about the resource.