Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

aws elasticbeanstalk: cannot deploy to worker environment via eb cli

I've created a worker environment for my eb application in order to take advantage of its "periodic tasks" capabilities using cron.yaml (located in the root of my application). It's a simple sinatra app (for now) that I would like to use to use to issue requests to my corresponding web server environment.

However, I'm having trouble deploying via the eb cli. Below is what happens I run eb deploy.

╰─➤  eb deploy
Creating application version archive "4882".
Uploading myapp/4882.zip to S3. This may take a while.
Upload Complete.
INFO: Environment update is starting.
ERROR: Service:AmazonCloudFormation, Message:Stack named 'awseb-e-1a2b3c4d5e-stack'
aborted operation. Current state: 'UPDATE_ROLLBACK_IN_PROGRESS'
Reason: The following resource(s) failed to create: [AWSEBWorkerCronLeaderRegistry].

I've looked around the CloudFormation dashboard to see to check for possible errors. After reading a bit of about what I could find regarding AWSEBWorkerCronLeaderRegistry, I found it that it's most likely a DynamoDB table that gets updated/created. However, when I look in the DynamoDB dashboard, there are no tables listed.

As always, any help, feedback, or guidance is appreciated.

like image 334
Kurt Mueller Avatar asked May 10 '15 02:05

Kurt Mueller


2 Answers

If you are reluctant to add full DynamoDB access (like I was), Beanstalk now provides a Managed Policy for Worker environment permissions (AWSElasticBeanstalkWorkerTier). You can try adding one of these to your instance profile role instead.

See http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/iam-instanceprofile.html

like image 168
bryantrobbins Avatar answered Oct 06 '22 23:10

bryantrobbins


We had the same issue and fixed it by attaching AmazonDynamoDBFullAccess to Elastic Beanstalk role (which was named aws-elasticbeanstalk-ec2-role in our case).

like image 35
ali gurbuz Avatar answered Oct 07 '22 00:10

ali gurbuz