This is project with study purposes, fell free to comment and use it in your own test cases!
Uses TypeScript development with CDK.
The cdk.json
file tells the CDK Toolkit how to execute your app.
Please follow the AWS CDK Instructions and setup your local environmeant with a valid AWS credential and account.
yarn build
Build projectyarn test
Run tests within this appyarn deploy
Build and deploy your servicescdk synth
Generates Cloudformation files
When you run yarn deploy
the app will deploy the following services with the described vinculations:
Amplify is used just to create a simple frontend linked with our Appsync API
.
In this example I'm using a personal React demo that can
communicate with the API using Amplify's interface.
TODO: Some configs need to be updated at user-demo so this actually works
Describes a simple API for the following entity:
type User {
id: String!
name: String!
password: String!
}
And the following endpoints:
type Mutation {
addUser(user: SaveUserInput!): User
deleteUser(id: String!): User
}
type Query {
getUser(id: String!): User
getUsers: [User]
}
The data is persisted at DynamoDB table.
DynamoDB with Dynamo Streams on. For each data modified it will trigger a lambda with a event and context to be processed.
The Table is a simple table that stores User
's
Triggered by DynamoDB it will send multiple messages in a SNS
topic and it also has a
SQS DLQ
in case of failures.
As noted, they're both binded to the Lambda
service, you can set the SNS
to deliver a email
for you and test the whole process!