-
Notifications
You must be signed in to change notification settings - Fork 264
feat(aws-lambda-translate): new construct #1434
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
Conversation
|
|
||
| new LambdaToTranslate(this, "LambdaToTranslatePattern", new LambdaToTranslateProps.Builder() | ||
| .lambdaFunctionProps(new FunctionProps.Builder() | ||
| .runtime(Runtime.NODEJS_20_X) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not urgent but Lambda is scheduled to end support for Node.js 20.x on Apr 30 2026 so we should update the example runtimes and Lambda function default runtime to reflect that if we don't have a task for it already.
| new LambdaToTranslate(stack, 'test-lambda-translate-stack', { | ||
| lambdaFunctionProps: { | ||
| code: new lambda.InlineCode('exports.handler = async (event) => { console.log(event); return {\'statusCode\': 200, \'body\': \'\'}; }'), | ||
| runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we have a few integration tests where the runtime is specified as lambda.Runtime.NODEJS_20_X and then at least this case where it's COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME. Should we make these consistent across all tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes - good catch
| // Definitions | ||
| new LambdaToTranslate(stack, 'test-lambda-translate-stack', { | ||
| lambdaFunctionProps: { | ||
| code: new lambda.InlineCode('exports.handler = async (event) => { console.log(event); return {\'statusCode\': 200, \'body\': \'\'}; }'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not urgent but based on general experience using the library over the years, I do think it could be useful to provide a sample SDK call in the README (code snippet) or commented out in the handler so users can have an idea for what changes they'll need to make in order to have a working implementation. Open for discussion, but wanted to raise the idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll reach out internally
| image::aws-lambda-translate-async.png["Diagram showing the Lambda function, source and destination S3 buckets (when asyncJobs is true), Amazon Translate service, and IAM roles created by the construct",scaledwidth=100%] | ||
|
|
||
|
|
||
| // github block |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the placeholder failed to be overwritten, other constructs have something like this:
== Github
Go to the https://github.com/awslabs/aws-solutions-constructs/tree/main/source/patterns/%40aws-solutions-constructs/aws-apigateway-kinesisstreams[Github repo] for this pattern to view the code, read/create issues and pull requests and more.
'''''
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This gets replaced with the actual content required by docs on the web when we do later processing.
hayesry
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few comments mostly pertaining to consistency, overall no major concerns, solid implementation. Excited to have this as part of the library!
No description provided.