awslabs / awslabs/aws-solutions-constructs
New Pattern: lambda-comprehend
- Dominant language
- TypeScript
- Stars
- 1.4k
- Forks
- 268
- Avg merge
- 5h 18m
- Merged PRs (30d)
- 5
Description
Based on which feature and service of comprehend you plan to use, comprehend requires permission policy setup so that lambda functions can access them. Some of the API endpoints in Comprehend also require an S3 bucket to be setup for input and ouput. Specifically in case of topic modeling, the outputs are written to the S3 bucket after about 25-30 mins. Which would mean that we need a lambda function bound to an S3 notification to be notified once the data becomes available. Hence the need for a higher level construct to provide the plumbing required to integrate lambda with comprehend services.
### Use Case
Comprehend is one of key NLP services for AWS AI/ML services. For my use-case, I ingest text data and subject that to various comprehend services to derives inferences. This helps understand public perception and our customers have a better understanding of customer feedback
### Proposed Solution
The proposed solution is that
1. Provide the flexibility to the user to specify which Amazon Comprehend services does he plan to integrate with
2. Build the service role permissions required to access lambda
3. If the service selected requires S3 bucket, create the bucket too and update the bucket permissions as required by comprehend to access it
4. If the NLP output from comprehend is to be put in an S3 bucket (non-realtime inference), build the plumbing required to generate an S3 notification to a lambda function.
### Other
I currently use this pattern in https://aws.amazon.com/solutions/implementations/discovering-hot-topics-using-machine-learning/
* [x] :wave: I may be able to implement this feature request
* [ ] :warning: This feature might incur a breaking change
---
This is a :rocket: Feature Request
Contributor guide
Research direction
No source files, tests, or entry points are identified. Start by locating existing AWS CDK patterns in the repository and compare their handling of Lambda permissions, S3 buckets and notifications, and Comprehend service selection; completion should cover the four proposed integration capabilities.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- backend, cloud
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100