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

AWS Lambda function to connect to Amazon DocumentDB with Java #195

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

markusz
Copy link

@markusz markusz commented Jun 26, 2024

Issue #, if available:

Comes from AWS internal content initiative. Internal ticket id: P131071597

Description of changes:

Adds a folder lambda-function-connect-documentdb-java to add a snippet. The snippet demonstrates how to use Amazon DocumentDB from an AWS Lambda function written in Java. It includes a CDK project that creates a CRUD API based on Amazon API Gateway as the frontdoor to a backend powered by Lambda and DocumentDB

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

@yualexan
Copy link
Collaborator

@markusz Thanks for the contribution. This is a very comprehensive example that don't fit best with this repo, which is intended to just be "snippets" of function code that customers can quickly copy-paste into their Lambda functions to get started with particular integrations. The depth of this code example is probably better suited for the serverless-patterns repo, or the like.

As is, we cannot merge this snippet into the repo. We are looking for something that's much simpler, and assumes that the customer has the requisite setup such that they require only the Lambda function code to get their integration working. First and foremost, please create the snippet in the integration-docdb-to-lambda directory of this repo. There, you will find samples of snippets we are looking for in other languages. We want an equivalent for Java. Specifically, this means you should remove/change the following in this PR:

  • Remove all the CDK code and associated scripts. Assume the customer has the DocDB cluster set up already.
  • Remove the build.gradle and associated build scripts--this is not a full-fledged app.
  • Please explicitly use Java21 (i.e. don't say Java17+).
  • Remove the API Gateway integration portion of this. We want to have just a single Lambda handler setup with DocDB. Please see the other snippets in the integration-docdb-to-lambda directory of this repo for an idea of what this would look like (there is no need for one function per CRUDL action).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants