Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Error while pushing image to ecr

Edited
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

2 answers

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 

0 votes
Norbert C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Mar 16, 2022

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events