My Elastic Beanstalk container uses container_commands to run a script to patch the database on every deployment.

I run the deployments with a home-brewed script that calls the UpdateEnvironment on the Elastic Beanstalk API.

The problem is, I have no visibility on the output of my container_commands, which is pretty scary during deployment. The only way I can tell if something went wrong is when a command returns a non-zero value: in that case DescribeEvents will report a problem. But still, I have no way to get the actual output of the command.

How can I get my container_commands output after the deployment has finished?

Ideally, with the Elastic Beanstalk API, but any other programmatic way will be fine!


2 Answers 2


Not a console view, but it is (now) visible in the logs.


    command: "whoami"

/var/log/cfn-init.log after deployment

2014-07-01 22:08:10,695 [DEBUG] Running command 05-whoami
2014-07-01 22:08:10,695 [DEBUG] Generating defaults for command 05-whoami
2014-07-01 22:08:11,014 [DEBUG] Defaults script for 05-whoami output: {"env":{"EB_REQUEST_ID":"110d0932-016c-11e4-9f71-3fe967c5cd60", [long list of params omitted for brevity]}
2014-07-01 22:08:11,015 [DEBUG] No test for command 05-whoami
2014-07-01 22:08:11,050 [INFO] Command 05-whoami succeeded
2014-07-01 22:08:11,050 [DEBUG] Command 05-whoami output: root
  • 2
    found mine in /var/log/cfn-init-cmd.log
    – otaku
    Jan 21, 2021 at 16:12

Reply from the AWS support:

The easiest way to see the output would be to pipe the command or script output to a file using >>. Unfortunately there isn't a live console that can be viewed to show the process live.

So unfortunately there is no way to do that (yet).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.