kislyuk / aegea

Amazon Web Services Operator Interface
Apache License 2.0
68 stars 17 forks source link

trying to build an ECR image: "unspecified location" when calling CreateBucket (???) #42

Closed jamestwebber closed 5 years ago

jamestwebber commented 5 years ago

Not sure why it's trying to create a bucket in the first place, but I'm now getting this error when I try to aegea-build-image-for-mission.

``` aegea-build-image-for-mission --image-type docker --mission-dir /Users/james.webber/projects/utilities aligner aligner Traceback (most recent call last): File "/Users/james.webber/anaconda3/envs/utilities/bin/aegea", line 23, in aegea.main() File "/Users/james.webber/anaconda3/envs/utilities/lib/python3.6/site-packages/aegea/__init__.py", line 78, in main result = parsed_args.entry_point(parsed_args) File "/Users/james.webber/anaconda3/envs/utilities/lib/python3.6/site-packages/aegea/build_docker_image.py", line 110, in build_docker_image job = submit(submit_args) File "/Users/james.webber/anaconda3/envs/utilities/lib/python3.6/site-packages/aegea/batch.py", line 353, in submit command, environment = get_command_and_env(args) File "/Users/james.webber/anaconda3/envs/utilities/lib/python3.6/site-packages/aegea/batch.py", line 273, in get_command_and_env bucket = ensure_s3_bucket("aegea-batch-jobs-{}".format(ARN.get_account_id())) File "/Users/james.webber/anaconda3/envs/utilities/lib/python3.6/site-packages/aegea/util/aws/__init__.py", line 148, in ensure_s3_bucket bucket.create() File "/Users/james.webber/anaconda3/envs/utilities/lib/python3.6/site-packages/boto3/resources/factory.py", line 520, in do_action response = action(self, *args, **kwargs) File "/Users/james.webber/anaconda3/envs/utilities/lib/python3.6/site-packages/boto3/resources/action.py", line 83, in __call__ response = getattr(parent.meta.client, operation_name)(**params) File "/Users/james.webber/anaconda3/envs/utilities/lib/python3.6/site-packages/botocore/client.py", line 320, in _api_call return self._make_api_call(operation_name, kwargs) File "/Users/james.webber/anaconda3/envs/utilities/lib/python3.6/site-packages/botocore/client.py", line 623, in _make_api_call raise error_class(parsed_response, operation_name) botocore.exceptions.ClientError: An error occurred (IllegalLocationConstraintException) when calling the CreateBucket operation: The unspecified location constraint is incompatible for the region specific endpoint this request was sent to. Traceback (most recent call last): File "/Users/james.webber/anaconda3/envs/utilities/bin/aegea-build-image-for-mission", line 42, in env=dict(os.environ, AEGEA_CONFIG_FILE=os.path.join(mission_wd, "config.yml")) File "/Users/james.webber/anaconda3/envs/utilities/lib/python3.6/subprocess.py", line 291, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['aegea', 'build_docker_image', 'aligner', '--tags', 'AegeaMission=aligner']' returned non-zero exit status 1. ```

This is with aegea 2.2.4 and the config.yml found here (the same command used to work, as I far as I can remember): https://github.com/czbiohub/utilities/tree/master/aligner

jamestwebber commented 5 years ago

I guess this is due to the region somehow, it works in us-east-1 but not in west. Maybe an issue with awscli?

kislyuk commented 5 years ago

@jamestwebber sorry about neglecting this. I believe this was fixed in https://github.com/kislyuk/aegea/commit/697e4100b0933950b61061f8a9496317f95b91b8#diff-13992386e56bf5dd5d8397169585a638, which was first released in v2.2.9. Please let me know if you're still encountering this issue.