Uncaught reference error: AWS not defined

Viewed 12484

I have been trying to implement DynamoDB using Javascript. When I used, AWS.config.update='my_region', I'm getting "uncaught referenceerror: AWS in not defined". I have declared AWS globally.

Note: aws.sdk.js has been implemented

5 Answers

One Crucial Mistake I was doing is not to add
<script src="https://sdk.amazonaws.com/js/aws-sdk-2.1.12.min.js"></script> this line in my html code(for front-end side in angular2). If you are using NodeJS then you have to add this file by using npm install aws-sdk.

You can find this information in this link.

Related