TypeError: AWS.SimpleDB () is not a constructor

I am trying to access AWS SimpleDB with JavaScript. My code is as follows:

<script src="https://sdk.amazonaws.com/js/aws-sdk-2.1.38.js"></script>
<script type="text/javascript">
    AWS.config.update({accessKeyId: 'mykey', secretAccessKey: 'mysecret'});
    AWS.config.region = 'us-east-1';
</script>
<script>
    var simpledb = new AWS.SimpleDB();
</script>

I get this error:

TypeError: AWS.SimpleDB () is not a constructor

I tried to create an AWS.S3 () object and it works fine.

What is the correct way to initialize and use SimpleDB using simple JavaScript?

+4
source share
2 answers

It doesn't seem like more recent versions of the JavaScript SDK support SimpleDB. I looked at the source of the JS library that you are trying to use, and even the latest version of the SDK for the browser, and does not have such functionality (access to SimpleDB). The following is a list of services supported in the current SDK. Please let me know if I do not understand:

http://docs.aws.amazon.com/AWSJavaScriptSDK/guide/browser-services.html

EDIT:   , , JS script, . SDK script, , SimpleDB. :

http://docs.aws.amazon.com/AWSJavaScriptSDK/guide/browser-building.html

+6

All Articles