Elastic Bean Stalk - Failed to add user
I'm trying to add celery service to elastic bean stalk environment. So I decided to create first user and group "celery". I follow instructions from page http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-ec2.html#linux-users, and I created config: groups: celery: gid: "101" users: celery: groups: - celery uid: "1501" homeDir: "/opt/python/celery" But during deploy, I get error: [2017-02-10T08:59:23.899Z] INFO  - [Application update app-43a4-170210_095832#474/AppDeployStage0/EbExtensionPreBuild/Infra-EmbeddedPreBuild] : Activity execution failed, because: Failed to add user celery (ElasticBeanstalk::ExternalInvocationError) I also was modifing homeDir, and uid, and login, and gruop id, but it doesn't help. How to fix it? Or how to debug useradding by elastic bean stalk?
Workaround with commands sections: groups: celery: gid: "101" commands: command 00_add_user_celery: command: useradd -d /opt/python/celery -g celery -u 1501 celery ignoreErrors: true
The workaround by 404pio offers a solution, but the ignoreErrors set to true can hide surprise errors. I commented on that answer, but formatting is limited and gets hard to understand. Here is a way to improve on error cases: groups: celery: gid: "101" commands: command 00_add_user_celery: test: test ! "`id -u celery 2> /dev/null`" command: useradd -d /opt/python/celery -g celery -u 1501 celery ignoreErrors: false ignoreErrors: false is the default and could also be omitted.
Creating custom scaling trigger for elastic beanstalk
Failing to deploy flask app on AWS Elastic Beanstalk environment
Elastic Beanstalk IAM developer permissions
Elastic beanstalk not using reserved instance
Updating AWS Elastic Bean has encountered a . How to resolve this?
How to automatically remove instances in EB whose status OutOfService is?
chmod configuration in elastic beanstalk
Where can I find elastic beanstalk “instance health for details”
Elastic Cache stuck in creating state
How to get Elastic Beanstalk to send notifications for all log messages?
In elastic beanstalk, how do I run a command before the container is launched?
Unable to add new environment variable to elastic beanstalk
AWS ElasticBeanstalk and AWS CloudWatch
How do I creating a Route53 DNS record for my beanstalk environment?
Hook or something in Gitlab to do a git aws.push to AWS Elastic Beanstalk
cannot deploy - ERROR: You cannot have more than 500 Application Versions