Skip to content

Conversation

@biffgaut
Copy link
Contributor

No description provided.


new LambdaToTranslate(this, "LambdaToTranslatePattern", new LambdaToTranslateProps.Builder()
.lambdaFunctionProps(new FunctionProps.Builder()
.runtime(Runtime.NODEJS_20_X)
Copy link
Contributor

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,
Copy link
Contributor

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?

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 - 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\': \'\'}; }'),
Copy link
Contributor

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.

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'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
Copy link
Contributor

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.

'''''

Copy link
Contributor Author

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
hayesry previously approved these changes Nov 25, 2025
Copy link
Contributor

@hayesry hayesry left a 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!

@biffgaut biffgaut merged commit 717bc01 into main Nov 25, 2025
4 checks passed
@biffgaut biffgaut deleted the aws-lambda-translate branch November 25, 2025 19:23
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