nathanpeck / s3-upload-stream

A Node.js module for streaming data to Amazon S3 via the multipart upload API
MIT License
347 stars 46 forks source link

TokenExpired Error #39

Open recursivefunk opened 9 years ago

recursivefunk commented 9 years ago

Getting a weird token expired error:

var AWS = require('aws-sdk');
var s3  = new AWS.S3();

 // creds.fetch() just returns an object with the access key and secret key
AWS.config.update( creds.fetch() );

var s3Stream  = require('s3-upload-stream')( s3 );

var up = s3Stream.upload({
     Bucket: bucket,
     Key: key,
     ACL: 'public-read',
     StorageClass: 'REDUCED_REDUNDANCY',
     ContentType: 'application/javascript'
 });

fs.createReadStream( './foo.json'  ).pipe( up );

Yields:

ExpiredToken: The provided token has expired.

The creds are good and are tied to an IAM with full S3 access.