Over a million developers have joined DZone.

Amazon Autoscaling ~ Issue uploading payload?

· Cloud Zone

Download this eBook outlining the critical components of success for SaaS companies - and the new rules you need to play by.  Brought to you in partnership with NuoDB.

We tried to upload a payload.zip for the autoscaled load balanced system, with the startup-parameters for our Application Server (using the commands given below). There seems to be some issue for the current Amazon Autoscaling API, that prevents us from uploading the user-data-file. We have reported the issue in the AWS forum, and awaiting their reply. :)


Creating a launch config
pradeeban@pradeeban:~/pem$ as-create-launch-config autoscalelcapp --image-id ami-xxxxxxxx --instance-type m1.large --user-data-file /tmp/payload.zip --key "keypair" --group "default" -K KEY.pem -C CERT.pem


Updating Auto Scaling Group
pradeeban@pradeeban:~/pem$ as-update-auto-scaling-group autoscleasg1 --availability-zones us-east-1c --launch-configuration autoscalelcas --min-size 1 --max-size 5 -K KEY.pem -C CERT.pem

However we found that, it works when the payload is sent as a string using the param --user-data, instead of --user-data, so we used that to get appserver running, load balanced and auto scaled.

Launch Config

pradeeban@pradeeban:~/pem$ as-create-launch-config autoscalelcas2 --image-id ami-xxxxxxxx --instance-type m1.large --user-data  "AWS_ACCESS_KEY_ID=xxxxxxxxxxxxxxxx,AWS_SECRET_ACCESS_KEY=xxxxxxxxxxx,AMI_ID=ami-xxxxxxxx,ELASTIC_IP=xx.xx.xxx.xxx,PRODUCT_MODIFICATIONS_PATH_S3=s3://wso2-stratos-conf-1.0.0/appserver/,COMMON_MODIFICATIONS_PATH_S3=s3://wso2-stratos-conf-1.0.0/stratos/,PRODUCT_PATH_S3=s3://wso2-stratos-products-1.0.0,PRODUCT_NAME=wso2stratos-as-1.0.0,SERVER_NAME=appserver.cloud.wso2.com,HTTP_PORT=9763,HTTPS_PORT=9443,STARTUP_DELAY=0" -K KEY.pem -C CERT.pem 
OK-Created launch config

Since this works, we are happy to proceed passing the payload as a string, instead of sending it as a zip file. Relevant products will be taken from the S3 buckets and run using the script, hence producing the autoscaled appserver instances.


Source: http://kkpradeeban.blogspot.com/2011/03/amazon-autoscaling-issue-uploading.html

Learn how moving from a traditional, on-premises delivery model to a cloud-based, software-as-a-service (SaaS) strategy is a high-stakes, bet-the-company game for independent software vendors. Brought to you in partnership with NuoDB.

Topics:

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}