ecs endpoint error

bunmi kayode November 16, 2021

can anyone help me with this error. i'm new to bitbucket-pipeline. i was trying to  deploy to AWS ECS cluster 

File "/usr/local/lib/python3.7/site-packages/botocore/args.py", line 107, in get_client_args
client_cert=new_config.client_cert)
File "/usr/local/lib/python3.7/site-packages/botocore/endpoint.py", line 286, in create_endpoint
raise ValueError("Invalid endpoint: %s" % endpoint_url)
ValueError: Invalid endpoint: https://ecs..amazonaws.com

1 answer

0 votes
Norbert C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 19, 2021

Hi Bunmi,

Let me introduce myself, I'm Norbert and I'm a Bitbucket Cloud Support Engineer, it's nice to meet you! Also, please feel welcomed to the Atlassian Community, it's good to see you here :).

Based on my observation, you're having an invalid endpoint, as your endpoint contains a double dot after the ecs part: https://ecs..amazonaws.com

To resolve this issue, can I ask you to try to remove a . [dot] after the ecs part and let me know whether if that resolved your issue?

I'm looking forward to hear from you.

Have a great rest of your day!

Best Regards,

Norbert
Atlassian Bitbucket Cloud Support Engineer

Ryan Launchbury June 16, 2022

Hi Bunmi,

I am also getting this issue when using the 'AWS ECS deploy' (v1.6.2) pipeline pipe which is maintained by Atlassian, so it's not possible to change the endpoint.

Best,

Ryan

Norbert C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 20, 2022

Hi Ryan,

Could you show me what's the error message you get? I'd like to review it.

Thank you,

Norbert

Ryan Launchbury June 20, 2022

Hi Norbert,

Here's the output:

 

Status: Downloaded newer image for bitbucketpipelines/aws-ecs-deploy:1.6.2

INFO: Using default authentication with AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY.

INFO: Check for active task definition...

Traceback (most recent call last):

File "/usr/bin/main.py", line 243, in <module>

pipe.run()

File "/usr/bin/main.py", line 211, in run

if not self.list_task_definitions():

File "/usr/bin/main.py", line 164, in list_task_definitions

client = self.get_client()

File "/usr/bin/main.py", line 121, in get_client

return boto3.client('ecs', region_name=self.get_variable('AWS_DEFAULT_REGION'))

File "/usr/local/lib/python3.7/site-packages/boto3/__init__.py", line 92, in client

return _get_default_session().client(*args, **kwargs)

File "/usr/local/lib/python3.7/site-packages/boto3/session.py", line 309, in client

config=config,

File "/usr/local/lib/python3.7/site-packages/botocore/session.py", line 888, in create_client

client_config=config, api_version=api_version)

File "/usr/local/lib/python3.7/site-packages/botocore/client.py", line 104, in create_client

verify, credentials, scoped_config, client_config, endpoint_bridge)

File "/usr/local/lib/python3.7/site-packages/botocore/client.py", line 386, in _get_client_args

verify, credentials, scoped_config, client_config, endpoint_bridge)

File "/usr/local/lib/python3.7/site-packages/botocore/args.py", line 108, in get_client_args

proxies_config=new_config.proxies_config)

File "/usr/local/lib/python3.7/site-packages/botocore/endpoint.py", line 339, in create_endpoint

raise ValueError("Invalid endpoint: %s" % endpoint_url)

ValueError: Invalid endpoint: https://ecs..amazonaws.com
Norbert C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 13, 2022

Hi @Ryan Launchbury 

Please excuse me for the late reply. I suspect a default region hasn't been set in your build.

Can you try the following settings under your Pipes' settings?

AWS_DEFAULT_REGION: 'yourawsregion'

Please let me know if that helps.

Best Regards,

Norbert

Atlassian Bitbucket Cloud Support

Ryan Launchbury July 13, 2022

Hi Norbert,

Very shortly after posting my last comment there was an update that fixed the issue for me.

Best,
Ryan

Norbert C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 13, 2022

Hi Ryan,

Thank you for your reply. I'm glad to hear your issue is resolved.

Have a great day ahead and stay safe!

Best Regards,

Norbert

Atlassian Bitbucket Cloud Support

Dipendra Chaudhary February 11, 2024

Hi @bunmi kayode could you please let me know which version are you using? I'm facing similar error

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events