Skip to content

Commit cc3be69

Browse files
authored
Create cognito-lambda-dynamodb.json
1 parent 91a3c21 commit cc3be69

File tree

1 file changed

+94
-0
lines changed

1 file changed

+94
-0
lines changed
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
{
2+
"title": "Amazon Cognito to AWS Lambda to Amazon DynamoDB",
3+
"description": "Create a user in Amazon Cognito, handle a Post Confirmation trigger with AWS Lambda, and store user details in Amazon DynamoDB.",
4+
"language": "TypeScript",
5+
"level": "200",
6+
"framework": "CDK",
7+
"introBox": {
8+
"headline": "How it works",
9+
"text": [
10+
"This sample project demonstrates how to create a user in an Amazon Cognito User Pool, then automatically insert that user's details into a DynamoDB table once the user confirms their email. The Post Confirmation Lambda trigger handles the event from Cognito and uses the AWS SDK for JavaScript (v3) to write user data to the DynamoDB table.",
11+
"Key attributes such as the user's unique ID (sub), email, and optional custom attributes are passed to Lambda, which then processes and persists this data. The table is configured in on-demand capacity mode (Pay Per Request) for cost efficiency and minimal management overhead.",
12+
"This pattern deploys a Cognito User Pool, a User Pool Client, a DynamoDB table, and a Node.js AWS Lambda function as the trigger."
13+
]
14+
},
15+
"gitHub": {
16+
"template": {
17+
"repoURL": "https://github.com/aws-samples/serverless-patterns",
18+
"templateURL": "serverless-patterns/cognito-lambda-dynamodb",
19+
"projectFolder": "cognito-lambda-dynamodb/cdk",
20+
"templateFile": "lib/cdk-stack.ts"
21+
}
22+
},
23+
"resources": {
24+
"bullets": [
25+
{
26+
"text": "Amazon Cognito - User sign-up/sign-in with triggers",
27+
"link": "https://aws.amazon.com/cognito/"
28+
},
29+
{
30+
"text": "AWS Lambda - Serverless compute for triggered actions",
31+
"link": "https://aws.amazon.com/lambda/"
32+
},
33+
{
34+
"text": "Amazon DynamoDB - Fast and flexible NoSQL database",
35+
"link": "https://aws.amazon.com/dynamodb/"
36+
}
37+
]
38+
},
39+
"deploy": {
40+
"text": [
41+
"cdk synth",
42+
"cdk deploy"
43+
]
44+
},
45+
"testing": {
46+
"text": [
47+
"See the GitHub repo for end-to-end tests using Jest and manual sign-up steps."
48+
]
49+
},
50+
"cleanup": {
51+
"text": [
52+
"Delete the stack: <code>cdk destroy</code>."
53+
]
54+
},
55+
"authors": [
56+
{
57+
"name": "Vidit Shah",
58+
"bio": "Software Engineer working @ServerlessCreed,making Serverless Courses and workshops",
59+
"linkedin": "www.linkedin.com/in/vidit-shah",
60+
"twitter": "https://x.com/Vidit_210/",
61+
"image": "https://media.licdn.com/dms/image/v2/D4D03AQHbL_7ZCYfUGQ/profile-displayphoto-shrink_200_200/B4DZUXcQlTGkAY-/0/1739855039564?e=2147483647&v=beta&t=MhOEFqsUDaKnLypK8eYYRqqD8Uq9xHUnijO5tN-fMpc"
62+
}
63+
],
64+
"patternArch": {
65+
"icon1": {
66+
"x": 20,
67+
"y": 50,
68+
"service": "cognito",
69+
"label": "Amazon Cognito"
70+
},
71+
"icon2": {
72+
"x": 50,
73+
"y": 50,
74+
"service": "lambda",
75+
"label": "AWS Lambda"
76+
},
77+
"icon3": {
78+
"x": 80,
79+
"y": 50,
80+
"service": "dynamodb",
81+
"label": "Amazon DynamoDB"
82+
},
83+
"line1": {
84+
"from": "icon1",
85+
"to": "icon2",
86+
"label": ""
87+
},
88+
"line2": {
89+
"from": "icon2",
90+
"to": "icon3",
91+
"label": ""
92+
}
93+
}
94+
}

0 commit comments

Comments
 (0)