question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use newer version of aws-sdk than the one supported by Lambda

See original GitHub issue

I am trying to use the EventBridge client from aws-sdk. Lambda does not support the latest version of the SDK that has the EventBridge code. I included the latest version of aws-sdk in my package dependencies but when the code is bundled by serverless-bundle and deployed, I get an error stating “AWS.EventBridge is not a constructor”. Am i doing something wrong? How do I include my own version of aws-sdk in lambda.

My code is:

`const AWS = require(“aws-sdk”); const eventBridge = new AWS.EventBridge({ region: “us-east-1”, apiVersion: “2015-10-07” });

…`

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
hotgazpachocommented, Dec 6, 2019

It would be great if there was an option to explicitly include my local aws-sdk as an external module, and include it in the bundle; I don’t want to wait for AWS to decide when to update the SDK in the runtime, and I want to make sure that the SDK version I’m running in the Lambda environment is the same version I’m running locally.

1reaction
jliburd-nsicommented, Nov 3, 2019

Ok. Thanks for the info.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Managing AWS SDKs in Lambda functions
SDK versions change frequently as AWS adds new features and services, and the Lambda service periodically updates the bundled SDKs.
Read more >
Is it possible to use a newer version of the aws-sdk than ...
Yes, you simply need to bundle the latest version of the SDK in your Lambda function's deployment file, ...
Read more >
@aws-sdk/client-lambda - npm
AWS SDK for JavaScript Lambda Client for Node.js, Browser and React Native. Latest version: 3.238.0, last published: 5 hours ago. Start using ...
Read more >
make AWS SDK JS v2 and v3 available with ESM in ... - GitHub
Describe the bug Nodejs lambda is not able to find AWS SDK. ... code to use the locally installed copy of aws-sdk ,...
Read more >
Compatibility and requirements of AWS Lambda monitoring
Support is limited for agent versions older than 3.9.0. To minimize performance impact, we've taken a different approach with Java and .NET Core....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found