You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried the following command and selected shield, it creates one operation but gives an error. python3 scripts/scaffold.py
Traceback (most recent call last):
File "moto/scripts/scaffold.py", line 694, in <module>
main()
File "moto/.venv/lib/python3.12/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "moto/.venv/lib/python3.12/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/moto/.venv/lib/python3.12/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "moto/.venv/lib/python3.12/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "moto/scripts/scaffold.py", line 663, in main
operation = select_operation(service)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "moto/scripts/scaffold.py", line 92, in select_operation
implemented, operation_names = get_operations(service_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "moto/scripts/scaffold.py", line 109, in get_operations
moto_client, _name = get_moto_implementation(service_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "moto/scripts/implementation_coverage.py", line 21, in get_moto_implementation
else backends[0]["global"]
~~~~~~~~~~~^^^^^^^^^^
File "moto/moto/core/base_backend.py", line 295, in __getitem__
return super().__getitem__(region_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'aws'
The text was updated successfully, but these errors were encountered:
it should work again, and you can continue to use scripts/scaffold.py for other methods.
The argument is used to retrieve the list of regions that this service is available in, using boto3. The problem here is that boto3 exposes an empty list - i.e., it thinks that shield is not available in any region.
Changing it to ec2 ensures that boto3 (and therefore Moto) has a list of regions where shield is available. (ec2 is available in more regions than shield, so it's not entirely correct, but it's a good enough solution.)
I tried the following command and selected shield, it creates one operation but gives an error.
python3 scripts/scaffold.py
The text was updated successfully, but these errors were encountered: