Tibberzz
Tibberzz

Reputation: 551

How Can I Reboot Elastic Beanstalk Instances in an ebextensions script?

I need to run an rpm command, then yum update, then reboot the instance for changes to take affect.

My ebextensions script works if I remove the 03reboot command. When I add it in, it fails and I get the event errors:

Command failed on instance. An unexpected error has occurred [ErrorCode: 0000000001]
Unsuccessful command execution on instance id(s) '<id>'. Aborting the operation.

commands:
    03reboot:
        command: shutdown -r now

Is there a preferred way to issue a reboot in the ebextensions config?

Upvotes: 1

Views: 958

Answers (1)

Tibberzz
Tibberzz

Reputation: 551

The answer is you don't. The recommendation from AWS support is to use a custom AMI that you pre-configure and use for instance replacement going forward.

Upvotes: 1

Related Questions