Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Pattern: API Gateway Save to DynamoDB and Stream to Lambda with CDK which combine both TypeScript for CDK and Python Lambda Code #1519

Conversation

nguyendinhthi0705
Copy link
Contributor

Issue #, if available:

Description of changes:
Implement a new pattern with API Gateway to insert into DynamoDB stream to trigger a Lambda

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@nguyendinhthi0705 nguyendinhthi0705 changed the title New Pattern: APIGW => DynamoDB => Lambda with CDK New Pattern: API Gateway Save to DynamoDB and Stream to Lambda with CDK which combine both TypeScript for CDK and Python Lambda Code Jul 23, 2023
@julianwood
Copy link
Contributor

julianwood commented Aug 2, 2023

I'm getting a Missing Authentication Token when testing this with the initial DDB put:
image

@nguyendinhthi0705
Copy link
Contributor Author

I'm getting a Missing Authentication Token when testing this with the initial DDB put: image

Hi @julianwood ,
I just update the readme file correct instruction.
The API should be append awsomedynamodb , somthing like https://${API_ID}.execute-api.${REGION_NAME}.amazonaws.com/prod/awsomedynamodb
And you also does not need id on url for a post

1. Install dependencies
```
npm install
cd src
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be cd ..\src

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, I am not sure about this. It should be: cd src

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, just cd src . I tested on Mac

Comment on lines +66 to +70
"id":"14",
"name":"Do some thing",
"description":"Do some thing",
"customer":"John"
}
Copy link
Contributor

@julianwood julianwood Aug 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The items you are adding don't seem relevant to what you query in the testing

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure about this, you can put anything for testing, right ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you can put anything. But although DynamoDB support schemeless, we actually should control scheme in real product

@nguyendinhthi0705
Copy link
Contributor Author

Hi @julianwood J
I fixed from your comment except 2 items. Please review. So far I think it ís good, just update content Readme ?

@nguyendinhthi0705
Copy link
Contributor Author

Hi @julianwood ,
Please review and let me know if you have any concern!

@julianwood julianwood merged commit 8249724 into aws-samples:main Sep 7, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants