Use newer version of aws-sdk than the one supported by Lambda
See original GitHub issueI 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:
- Created 4 years ago
- Reactions:1
- Comments:7 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.Ok. Thanks for the info.