javascript - Uncaught reference error: AWS not defined -
i have been trying implement dynamodb using javascript. when used, aws.config.update='my_region', i'm getting "uncaught referenceerror: aws in not defined". have declared aws globally.
note: aws.sdk.js has been implemented
if using node.js
aws sdk, should include require
.
var aws = require("aws-sdk"); var creds = new aws.credentials('akid', 'secret', 'session'); aws.config.update({ region: "us-west-2", endpoint: "http://localhost:8000", credentials: creds });
if using javascript in html
, please include sdk.
<script src="https://sdk.amazonaws.com/js/aws-sdk-2.1.12.min.js"></script>
if above solution doesn't resolve issue, please show full code @ scenario specifically.
Comments
Post a Comment