Replies: 4 comments 2 replies
-
I am also have the same issue. In v2 there are types for aws-lambda. But in v3, could not find any type related to AWS Lambda functions |
Beta Was this translation helpful? Give feedback.
-
Example for v2: Can anyone please provide information on the expected way of typing it in v3? (using "@aws-sdk/client-lambda": "3.476.0")
|
Beta Was this translation helpful? Give feedback.
-
Hi everyone on the thread. Can you highlight specific imports that are missing from v3 but existed in v2? A complete code sample with imports would be ideal. Thanks, |
Beta Was this translation helpful? Give feedback.
-
Hey , Please check the below block import { Handler } from 'aws-lambda';
export const handler: Handler = async (event, context) => {
console.log('EVENT: \n' + JSON.stringify(event, null, 2));
return context.logStreamName;
};
import { Context, APIGatewayProxyCallback, APIGatewayEvent } from 'aws-lambda';
export const lambdaHandler = (event: APIGatewayEvent, context: Context, callback: APIGatewayProxyCallback): void => {
console.log(`Event: ${JSON.stringify(event, null, 2)}`);
console.log(`Context: ${JSON.stringify(context, null, 2)}`);
callback(null, {
statusCode: 200,
body: JSON.stringify({
message: 'hello world',
}),
});
}; currently we were using this package(https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/aws-lambda) for AWS SDK v2 |
Beta Was this translation helpful? Give feedback.
-
Hey, we are migrating aws sdk to v3 but for lamda handler we couldn't find any type inside @aws-sdk/client-lambda package, Are you planning to add the handler types inside the package or we need to use @types/aws-lambda?
Beta Was this translation helpful? Give feedback.
All reactions