question

warhost avatar image
warhost asked

ASK CLI init not working - Associated AWS Profile null

I have the problem that the ask init command doesn't seem to work properly when setting up the ask cli. After installing, I ran ask init, logged in, and got "Profile [default] initialized successfully.", however if I then try to clone a skill, I am getting "No AWS credential setup for profile: [default]". Running ask init again shows Null for the associated profile. Doing the authentication again (trying with sudo) doesn't resolve the problem. It remains null.

Any ideas?

ask clismapi
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

warhost avatar image
warhost answered

I think the instructions for setting up the ask cli are simply wrong, since I don't think its possible without installing and setting up aws-cli first. I did create the credentials file manually, however that did not change anything. Installing aws-cli first, configuring it and then installing ask cli did work.

10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

warhost avatar image
warhost answered

In case it's relevant: I am using zsh on macOS.

10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

KAIYIN@AMAZON.COM avatar image
KAIYIN@AMAZON.COM answered

What is the AWS credential you have for your AWS account? Make sure you finish the steps here: https://developer.amazon.com/docs/smapi/set-up-credentials-for-an-amazon-web-services-account.html.

10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

AwesomeAaron@AMZN avatar image
AwesomeAaron@AMZN answered

there are two possible causes:

1. when you do ask init, second step is asking to chose one AWS profile that in your ~/.aws/credentials. if you choose 'skip AWS credentials for ask-cli'. then the ask profile will not have any aws setup.

2. you might not have ~/.aws/credentials, which you can create manually. Here is the reference

10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

newuser-03ef7ae8-a1e5-49f3-b358-63ba748141a3 avatar image
newuser-03ef7ae8-a1e5-49f3-b358-63ba748141a3 answered

I have this problem too :o

10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

martindsouza avatar image
martindsouza answered

I'm having the same issue. After running the ask init --no-browser the ~/.ask/cli_config is:

{
  "profiles": {
    "default": {
      "aws_profile": "default"
    }
  }
}

Note: I'm running this in a docker container and not sure why it's working on the host (MacOS) system but not docker. (node-alpine).

As per suggestions above, I have also installed the aws cli and configured it then re-ran ask init with same result (tokens aren't there)

4 comments
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

newuser-5e2cb139-7727-4f9a-a369-c685ca009b3e avatar image
newuser-5e2cb139-7727-4f9a-a369-c685ca009b3e answered

My ask new command wasn't working just hung after say it had created the skill. Found 2 problems.

Hook script either run under (windows) powershell or bash. Files with the .ps1 extension need to be set to open with "Windows Power Shell".

The second problem was with Java script files .js. They need to set to open with node.

Been using this computer for a while things get changed from defaults over time.

10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.