aws-samples / serverless-snippets

Snippets of code used for Serverless Development. Code examples hosted on serverlessland.com/snippets
https://serverlessland.com/snippets
MIT No Attribution
140 stars 93 forks source link

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

Open markusz opened 4 months ago

markusz commented 4 months ago

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 commented 4 months ago

@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: