I've deployed a nodejs worker. However whenever I try to start it, it gets red and this error is showned: ERROR Instance: i-6eef007a Module: AWSEBAutoScalingGroup ConfigSet: null Command failed on instance. Return code: 1 Output: Error occurred during build: Command 01-start-sqsd failed .
I don't know if it's related, sometimes I get this error on the screen: IamInstanceProfile: The environment does not have an IAM instance profile associated with it. To improve deployment speed please associate an IAM instance profile with the environment.
I've already given permission to SQS and set key and secret. I don't know what else to do.
Log attached.
Thank you very much.
You need to have an IAM role with the appropriate permissions to create an Elastic Beanstalk worker environment.
The IAM role should have the following permissions:
Detailed documentation: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/AWSHowTo.iam.roles.aeb.html#AWSHowTo.iam.policies.actions.worker
For debugging you can ssh to the instance and look at /var/log/aws-sqsd/default.log to see the logs. If you want to avoid ssh'ing to the instance you can also snapshot logs from the AWS Console as shown here.
You can read more about worker role environments here.