Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Elastic Beanstalk Deployment: UndefinedModelAttributeError

I'm trying to deploy to Elastic Beanstalk, specifically using CircleCI, and I ran into this error:

ERROR: UndefinedModelAttributeError - "serviceId" not defined in the metadata of the model: <botocore.model.ServiceModel object at 0x7fdc908efc10>

From my Google search, I see that it's a Python error which makes sense because that's what Elastic Beanstalk uses. But there is no information out there for this specific case. Does anyone know why this happens?

like image 426
Martavis P. Avatar asked Sep 08 '18 17:09

Martavis P.


Video Answer


2 Answers

Update

EBCLI 3.14.6 is compatible with the current latest AWS CLI (> 1.16.10).


Previously ...

To solve this issue:

  1. Upgrade awsebcli to 3.14.5: Upgrade awsebcli to 3.14.6

    pip install awsebcli --upgrade
    

OR

  1. If you must continue using awsebcli < 3.14.5, perform:

    pip install 'botocore<1.12'
    

The core of the problem is the open dependency range on botocore that awsebcli < 3.14.5 allowed so that users can always have access to the latest AWS CLI commands/AWS APIs (botocore manages AWS service models).

When botocore released version 1.12, it created an incompatibility in the EBCLI. EBCLI 3.14.5 restricts the dependency on botocore to < 1.12.

EDIT: As an aside, note that EBCLI 3.14.5 is incompatible with AWS CLI 1.16.10. Instead, use AWS CLI 1.16.9.

like image 129
progfan Avatar answered Oct 18 '22 01:10

progfan


I just had the same error after installing awscli after awsebcli. The botocore dependencies are not matching. So if you want to use awsebcli commands make sure to not overwrite its dependencies:

  1. Either downgrade awscli
  2. Or install it before awsebcli (works for the my usecase but might randomly break)
like image 2
Karens Avatar answered Oct 18 '22 03:10

Karens