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.

javascript example


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -