INFO: Using default authentication with AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY
INFO: Executing the aws-ecr-push-image pipe...
Traceback (most recent call last):
File "/usr/bin/pipe.py", line 225, in <module>
pipe.run()
File "/usr/bin/pipe.py", line 197, in run
registry = self.docker_login(docker_client)
File "/usr/bin/pipe.py", line 135, in docker_login
client = self.get_client()
File "/usr/bin/pipe.py", line 125, in get_client
return boto3.client(self.boto3_client_name, region_name=self.region)
File "/usr/local/lib/python3.9/site-packages/boto3/__init__.py", line 93, in client
return _get_default_session().client(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/boto3/session.py", line 270, in client
return self._session.create_client(
File "/usr/local/lib/python3.9/site-packages/botocore/session.py", line 841, in create_client
client = client_creator.create_client(
File "/usr/local/lib/python3.9/site-packages/botocore/client.py", line 91, in create_client
client_args = self._get_client_args(
File "/usr/local/lib/python3.9/site-packages/botocore/client.py", line 360, in _get_client_args
return args_creator.get_client_args(
File "/usr/local/lib/python3.9/site-packages/botocore/args.py", line 99, in get_client_args
endpoint = endpoint_creator.create_endpoint(
File "/usr/local/lib/python3.9/site-packages/botocore/endpoint.py", line 286, in create_endpoint
raise ValueError("Invalid endpoint: %s" % endpoint_url)
ValueError: Invalid endpoint: https://api.ecr..amazonaws.com
Hi Avanesyan95 - i fixed this by making sure my region was set correctly - using AWS_DEFAULT_REGION gave me this error. Passing a new repository variable AWS_REGION into my pipe saw it come to life.
In my case, AWS_REGION was 'eu-west-2'.
- pipe: atlassian/aws-ecr-push-image:2.0.0
variables:
AWS_DEFAULT_REGION: $AWS_REGION
AWS_OIDC_ROLE_ARN: 'arn:aws:iam::accountnumber:role/role-arn-for oidc'
IMAGE_NAME: myimage
TAGS: 'mytag'
**I'm using OIDC, so you can simply swap out that line for you ACCESS TOKEN and SECRET lines
HI @Avanesyan95
Thank you for contacting Atlassian Community, my name is Norbert and I'm a Bitbucket Cloud Support Engineer, it's nice to meet with you! Welcome to the Atlassian Community!
Based on my observation the build is failing with the following error message:
ValueError: Invalid endpoint: https://api.ecr..amazonaws.com
Can you double-check whether if you're providing the correct endpoint with your configuration? Based on the error message, you provided a faulty one
Please let us know how it goes.
Best Regards,
Norbert
Atlassian Bitbucket Cloud Support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.