Coder Social home page Coder Social logo

Comments (3)

RanVaknin avatar RanVaknin commented on June 12, 2024 1

Hi @jepetko ,

Which npm package do you mean by aws-lambda? Do you mean @types/aws-lambda? https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/aws-lambda

I'm referring to the imports shared in your initial code:

import {APIGatewayProxyEvent, APIGatewayProxyResult, Context} from 'aws-lambda';

@types/aws-lambda is not a package maintained by AWS and has nothing to do with the SDK therefore it should not be related to the migration between v2 and v3. If there is an issue with the compatibility with v3, I suggest you open an issue on that repo, since the SDK only officially supports AWS packages and not 3rd party tools.

My guess is that there is no issue and you can safely re-introduce those imports since they just seem like type definitions and should be safe to use regardless of SDK version.

All the best,
Ran~

from aws-sdk-js-v3.

RanVaknin avatar RanVaknin commented on June 12, 2024

Hi @jepetko ,

the aws-lambda package is not related to the AWS SDK. The aws-sdk/client-lambda package is a control plane API that lets you create, update, and invoke your lambda function. I'm not too familiar with aws-lambda package, but this is not a part of the AWS SDK, and therefore should not be related to the JS SDK's migration from v2 to v3. AFAIK aws-lambda is the client for the data-plane API of lambda, and is mainly revolving exposing types that you can use in your code which should be SDK version agnostic.

Is there anything specific stopping you from using the aws-lambda package with v3?

Thanks,
Ran~

from aws-sdk-js-v3.

jepetko avatar jepetko commented on June 12, 2024

Hi @RanVaknin !

thank you for the answer!

Which npm package do you mean by aws-lambda? Do you mean @types/aws-lambda? https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/aws-lambda

What I realized now is when I migrated to v3 ("@aws-sdk/*": "^3.*.*"), I removed both, "aws-sdk": "^2.*.*" and "@types/aws-lambda": "^*.*.*" in the expectation that the types will be served by @aws-sdk/*.
So the way to go is to take the types unrelated to the internal implementation of aws-sdk (such as events coming from SQS, API GW etc.) from @types/aws-lambda, correct?

Thanks!

from aws-sdk-js-v3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.