13
votes

I'm trying to deploy my code to AWS Beanstalk and get this error. I researched that it could be that the number of versions is more than 500, so I deleted a lot of versions. But, I still get this error.

eb deploy
ERROR: No Application Version named 'v0_9_2-76-gf5a4' found.

I also tried

git aws.push
Error: Failed to create the AWS Elastic Beanstalk application version

Edit: Trying with eb deploy --debug I now get:

Instance: i-2ad238d5 Module: AWSEBAutoScalingGroup ConfigSet: null Command failed on instance. Return code: 1 Output: Error occurred during build: Command hooks failed . Script /opt/elasticbeanstalk/hooks/appdeploy/pre/10_bundle_install.sh failed with returncode 18

ebcli.objects.exceptions.ServiceError: Update environment operation is complete, but with errors. For more information, see troubleshooting documentation.

5
Can you provide the output of eb deploy --debug?Nick Humrich
eb deploy /opt/elasticbeanstalk/hooks/appdeploy/pre/10_bundle_install.sh failed with returncode 18 ERROR: [Instance: i-2ad238d5 Module: AWSEBAutoScalingGroup ConfigSet: null] Command failed on instance. Return code: 1 Output: Error occurred during build: Command hooks faileduser2974739
vipul$ eb deploy --debug 2015-05-11 11:06:27,291 (DEBUG) eb : logging initialized for 'eb' using LoggingLogHandler 2015-05-11 11:06:27,291 (DEBUG) cement.ext.ext_plugin : plugin config dir /etc/eb/plugins.d does not exist. 2015-05-11 11:06:27,292 (DEBUG) cement.ext.ext_plugin : plugin config dir /Users/vipul/.eb/plugins.d does not exist. 2015-05-11 11:06:27,294 (DEBUG) eb : collecting arguments/commands for <ebcli.core.base.EbBaseController object at 0x10e633950> 2015-05-11 11:06:27,298 (DEBUG) eb : collecting arguments/commandsuser2974739
You'll have to add it as an edit to your question or put in pastebin or something because a comment is not sufficient for all the debug log.Nick Humrich
I just updated the question. Instance: i-2ad238d5 Module: AWSEBAutoScalingGroup ConfigSet: null Command failed on instance. Return code: 1 Output: Error occurred during build: Command hooks failed . Script /opt/elasticbeanstalk/hooks/appdeploy/pre/10_bundle_install.sh failed with returncode 18 INFO: New application version was deployed to running EC2 instances. ERROR: Update environment operation is complete, but with errors. For more information, see troubleshooting documentation.user2974739

5 Answers

10
votes

Did you update the file .elasticbeanstalk/config.yml ? It may have a wrong setup.

  1. Make a backup of .elasticbeanstalk/ folder and remove it
  2. Execute eb create
  3. Select the same region you deployed it before. You can check the region on .elasticbeanstalk/config.yml backup
  4. A list with the environments will appear, select the right one
  5. Deploy now
  6. Remove the .elasticbeanstalk/config.yml backup
7
votes

Check for the .elasticbeanstalk/config.yml file

environment: CORRECT_ENV_NAME
   global:
     application_name: CORRECT_APP_NAME
4
votes

In my case, I was doing eb deploy X where X was an environment for a different project.

1
votes

When I had the error

InvalidParameterValueError: No Application Version named 'app-9f5c-180927_071528' found.

I fixed this by specifying the label I wanted to push up.

eb deploy XXX-env -l XXX.0.0.1

The -l flag is documented AWS EB Deploy Docs

0
votes

most likely, the deploy is trying an incorrect Elasticbeanstalk Application. it could be because you renamed the application in the AWS console.

so double check you're pointing to the correct elasticbeanstalk Environment and Application. it could be picking out default values from your .elasticbeanstalk/config.yml file.