Monday, September 10, 2012

as-create-launch-config: Service error: null AWSRequestId:null

Seemingly out of nowhere, amazon web services was giving me the following error when creating auto-scaling groups:

as-create-launch-config:  Service error: null  AWSRequestId:null

I've been using auto-scaling groups for months without any problems. It turns out this error is a result of a strange bug in the URL length when making a REST request to the amazon web server's api. Basically, the URL length becomes too long.

After some digging I found the solution on Amazon's forums.

The easiest way to solve this is to unset your "AWS_CREDENTIAL_FILE" variable and add the variables "EC2_CERT" and "EC2_PRIVATE_KEY" to point at your cert and pk file. This can be done on the command line as the -K and -C options, or you can add it to your bash_profile.

In your ~/.bash_profile, add the following variables:

export EC2_CERT="your_cert.pem"
export EC2_PRIVATE_KEY="your_pk.pem"

Then simply source your ~/.bash_profile to pick up the new changes.

$ source ~/.bash_profile

This will force the auto-scaling tools to make a SOAP request instead of a RESTful one to the aws api, which seems to get around the issue at hand.

No comments:

Post a Comment