Skip to content Skip to sidebar Skip to footer

Retrieve Data From Amazon S3

I am trying to retrieve the URL of a picture from Amazon s3. When I run the script below, I get an error: Missing required Key in params This is what I have so far:

Solution 1:

Please go through this url for configuring your sdk first with proper parameters.

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

This part of your code is causing the error

AWS.config.update({
accessKeyId: 'accesskey',
secretAccessKey: 'secretKey'
});

You need to give your accessKeyId and secretAccessKey instead of defaulting them to accesskey and secretkey. They should be replaced with required values following the above url.

Also add 'Key' instead of 'key' in getObject params.

Post a Comment for "Retrieve Data From Amazon S3"