Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

as aws-sdk doesn't read in region automatically :( #6

Open
piascikj opened this issue Sep 24, 2016 · 0 comments
Open

as aws-sdk doesn't read in region automatically :( #6

piascikj opened this issue Sep 24, 2016 · 0 comments
Labels

Comments

@piascikj
Copy link
Member

Check if environment supports native promises


opened via imdone.io from a code comment on aa2a5c89 by Michael Holtzman


AWS.config.region = process.env.SERVERLESS_REGION; // HACK as aws-sdk doesn't read in region automatically :(
// Check if environment supports native promises
if (typeof Promise === 'undefined') {
AWS.config.setPromisesDependency(require('bluebird')); // eslint-disable-line global-require
}
const dynamodb = new AWS.DynamoDB.DocumentClient();

@piascikj piascikj added the HACK label Mar 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant