ERROR: The EB CLI cannot find a platform for key "multi-container docker".

Hi,

I am getting the an error for the following command:

eb init MY_APP --region us-east-1 --platform ‘Multi-container Docker’ --keyname MY_KEY

ERROR: The EB CLI cannot find a platform for key “multi-container docker”.

To provide a bit more context this command is being run in a Gitlab pipeline. I have the correct AWS creds set as environment variables and tested listing out platforms etc.

Locally the command above works fine but not in this Gitlab runner. I set the debug flag and the only thing I could see that was different is that on the runner it has in the output:

  • Python Version: 2.7.6
  • Botocore version: 1.7.2
  • EBCLI Version: 3.10.6

Where as locally I have:

  • Python Version: 2.7.5
  • Botocore version: 1.5.80
  • EBCLI Version: 3.10.3

This is the last part of the debug:

2017-09-03 14:22:45,906 (INFO) eb : Traceback (most recent call last):
File “/usr/local/lib/python2.7/dist-packages/ebcli/core/ebrun.py”, line 45, in run_app
app.run()
File “/usr/local/lib/python2.7/dist-packages/cement/core/foundation.py”, line 797, in run
return_val = self.controller._dispatch()
File “/usr/local/lib/python2.7/dist-packages/cement/core/controller.py”, line 472, in _dispatch
return func()
File “/usr/local/lib/python2.7/dist-packages/cement/core/controller.py”, line 478, in _dispatch
return func()
File “/usr/local/lib/python2.7/dist-packages/ebcli/core/abstractcontroller.py”, line 60, in default
self.do_command()
File “/usr/local/lib/python2.7/dist-packages/ebcli/controllers/initialize.py”, line 91, in do_command
self.solution = self.get_solution_stack()
File “/usr/local/lib/python2.7/dist-packages/ebcli/controllers/initialize.py”, line 273, in get_solution_stack
commonops.get_solution_stack(solution_string)
File “/usr/local/lib/python2.7/dist-packages/ebcli/operations/commonops.py”, line 1211, in get_solution_stack
solution_string))
NotFoundError: The EB CLI cannot find a platform for key “multi-container docker”.

Anyone come across this before?

Thanks.


Related discussions:

What’s the output of get-solution-stacks?

With the --debug on eb init I can see that an api call:

2017-09-03 14:22:45,727 (DEBUG) ebcli.lib.aws : Making api call: (elasticbeanstalk, list_available_solution_stacks) to region: us-east-1 with args:{}
2017-09-03 14:22:45,891 (DEBUG) ebcli.lib.aws : API call finished, status = 200
2017-09-03 14:22:45,892 (DEBUG) ebcli.lib.aws : Response: {u’SolutionStacks’: [‘64bit Windows Server Core 2016 v1.2.0 running IIS 10.0’, ‘64bit Windows Server 2016 v1.2.0 running IIS 10.0’, ‘64bit Windows Server Core 2012 R2 v1.2.0 running IIS 8.5’, ‘64bit Windows Server 2012 R2 v1.2.0 running IIS 8.5’, ‘64bit Windows Server 2012 v1.2.0 running IIS 8’, etc…

The list is quite long however I do see 'Multi-container Docker" listed multiple times in that list. Snippet:

‘64bit Amazon Linux 2017.03 v2.7.4 running Multi-container Docker 17.03.1-ce (Generic)’, ‘64bit Amazon Linux 2016.09 v2.5.2 running Multi-container Docker 1.12.6 (Generic)’, ‘64bit Amazon Linux 2016.03 v2.1.6 running Multi-container Docker 1.11.2 (Generic)’, ‘64bit Amazon Linux 2016.03 v2.1.1 running Multi-container Docker 1.9.1 (Generic)’, ‘64bit Amazon Linux 2016.03 v2.1.0 running Multi-container Docker 1.9.1 (Generic)’, ‘64bit Amazon Linux 2015.09 v2.0.8 running Multi-container Docker 1.9.1 (Generic)’, ‘64bit Amazon Linux 2015.09 v2.0.6 running Multi-container Docker 1.7.1 (Generic)’, ‘64bit Amazon Linux 2015.03 v1.4.6 running Multi-container Docker 1.6.2 (Generic)’,

And the very next log says:

2017-09-03 14:22:45,892 (DEBUG) ebcli.lib.elasticbeanstalk : Solution Stack result size = 114

Ok, so looks like the issue is that “Multi-container Docker” is not the name of an available solution stack. You need to change this to the full name:
“64bit Amazon Linux 2017.03 v2.7.4 running Multi-container Docker 17.03.1-ce (Generic)”

If you want to see the list (without having to run debug mode on the eb cli) you can run:

aws elasticbeanstalk list-available-solution-stacks

As I said in my original post specifying just “Multi-container Docker” seems to work with the version I have installed locally. Using the above command does show the version you have mentioned.

I’ve been doing a bit digging around and found this repo which is a clone i.e. not official (old one by the looks of it): https://github.com/flatearthtruth/awsebcli/blob/7b27e2a6c6774917137967aa66c7644757dad882/ebcli/core/operations.py#L1197. You’ll see that it does a regex at the start which looks like it would do a partial match. I guess they have stopped doing this. I’ll try and check the code tomorrow.

It may also be the case that there was originally only one version of multi-container docker available, so the regex only got one result previously, but now gets two.

You could try setting the stack name to “multi-container docker 17”, although I would generally recommend always specifying the exact version you want.

Yeah this is some old command line that I was taking when converting from Jenkins to Gitlab. I’ll ask about on the AWS forums but I suspect they have stopped doing this partial match now.