I'm attempting to deploy a .NET application to ElasticBeanstalk using the AWS-cli tools.
First upload then create version using:
aws elasticbeanstalk create-application-version
--application-name "MyApp - DEV"
--version-label "0.1.165"
--source-bundle S3Bucket="xxx",S3Key="MyApp.0.1.165.zip"
--process
This works, so next step:
aws elasticbeanstalk update-environment
--environment-name "myapp-dev-env"
--version-label "0.1.165"
--application-name "MyApp - DEV"
This sometimes exits with code 255 and outputs:
A client error (InvalidParameterValue) occurred when calling the UpdateEnvironment operation: Application version is unusable and cannot be used with an environment
What is frustrating is these exact steps (run by my continuous integration server) sometimes work, and if I go and deploy this version using the AWS console, it also works. The zip I'm uploading doesn't appear any different, and in fact, if I rebuild from the same source revision (using a build that previously deployed successfully, which gives it a new version number), it seems to (usually) run into this problem.
I can't find any detail about what this error means, so where else can I look to figure out what's happening?