Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copilot init fails with MissingEndpoint: 'Endpoint' configuration is required for this service #5040

Open
nickpnmrv opened this issue Jul 4, 2023 · 3 comments

Comments

@nickpnmrv
Copy link

nickpnmrv commented Jul 4, 2023

I am following first tutorial on getting started with copilot -> https://docs.aws.amazon.com/AmazonECS/latest/developerguide/getting-started-aws-copilot-cli.html

At the copilot init step it fails with the following:

demo-app % copilot init
Welcome to the Copilot CLI! We're going to walk you through some questions
to help you get set up with a containerized application on AWS. An application is a collection of
containerized services that operate together.

Application name: demo
✘ ask app init: get application demo: get application demo: MissingEndpoint: 'Endpoint' configuration is required for this service

Just in case:

demo-app % copilot --version
copilot version: v1.28.0

How do I even debug it? This failure message is not really helpful

@Lou1415926
Copy link
Contributor

@nickpnmrv Umm seems like the AWS SDK is complaining that it cannot resolve the endpoint for SSM.

If you have aws-cli installed - are you able to run this command ⬇️ ?

aws ssm get-parameters --names /copilot/applications/demo

In addition, do you have ~/.aws/config and ~/.aws/credentials files?

@nickpnmrv
Copy link
Author

nickpnmrv commented Jul 6, 2023

@Lou1415926 both files are there containing aws credentials, here is what I get replaced all the secrets with ***:

demo-app % nano ~/.aws/credentials
aws_access_key_id = ***
aws_secret_access_key = ***

demo-app % nano ~/.aws/config
region = ***
[profile ***]
sso_session = macbook
sso_account_id = ***
sso_role_name = ***
region = eu-central-1
[sso-session macbook]
sso_start_url = ***
sso_region = eu-central-1
sso_registration_scopes = ***

aws ssm get-parameters --names /copilot/applications/demo returns:



Provided region_name 'IQoJb3J***psdddsfVjEKL//////////wEaDGV1LWNlbnR***yYWwtMSJIMEYCIQDZRd/sZxYIKKbEwhfn1rCfyJvzQdVZOLJYaqlUnppihgIhAIyUhG8jjSIzLT***kpk9PZmc6s+fPpDMK90QhsdWkmjmLoy/4p1qDs***etWT' doesn't match a supported format.

'doesn't match a supported format' is probably something that requires a fix?

@Lou1415926
Copy link
Contributor

@nickpnmrv I think your ./aws/credentials and ./aws/config files are probably misconfigured! For example - as far as I know - the credentials file is grouped by "profile":

# This would result in a parsing error.
aws_access_key_id = ***
aws_secret_access_key = ***

# This is fine.
[myprofile]
aws_access_key_id = ***
aws_secret_access_key = ***

The same applies to .aws/config.

In addition, I notice that you are using SSO. As of today, unfortunately you have to use legacy SSO in Copilot (see #4359). You can also take a look at this thread to configure a legacy SSO.

Once we upgrade our AWS SDK, or once aws/aws-sdk-go#4649 is resolved, you will be able to go back to the recommended SSO config. #4359 contains

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants