livelycode/aws-lib — Issue #34: not able to validate the provided access credentials
Author: mark-hahn
Created: 2011-12-04 22:18:06+00:00
State: open

I am working on a script to manage my aws instances. The first part looks like this ...

http	= require 'http'
aws	= require "aws-lib"

srvr = http.createServer (req, res) ->

req.ec2 = aws.createEC2Client 'AKI...ZOQ', 'lgHJcg+...HYz2',
host: 'ec2.us-west-1.amazonaws.com'

req.ec2.call "DescribeInstances", {}, (resp) ->
console.log 'DescribeInstances', resp

srvr.listen 80

This was working the first few hours while I was debugging the rest of my code. Now it started giving me this error ...

{ Errors: { Error: { Code: 'AuthFailure', Message: 'AWS was not able to validate the provided access credentials' } } }

Using the command line ec2-describe-instances still works with the same security keys. Has anyone seen a problem like this?

I have a question about security. How is it that aws-lib only requires the two keys, while the aws api command line requires those plus the certificate etc.?

As you can tell I'm new to using the aws api. Any help would be appreciated.