I did setup the ask-cli , but I did notice it is not using the regions settings from aws config. So API calls for ask lambda access us-east instead of eu-west.
Is this a bug or did I miss a configuration option.
I did setup the ask-cli , but I did notice it is not using the regions settings from aws config. So API calls for ask lambda access us-east instead of eu-west.
Is this a bug or did I miss a configuration option.
Hello,
Thank you for reporting this.
For region-specific endpoints, the CLI will deploy Lambda functions to the closest AWS region (us-east-1 for skillManifest.apis.custom.regions.NA.endpoint, eu-west-1 for skillManifest.apis.custom.regions.EU.endpoint). For the global default endpoint (skillManifest.apis.custom.endpoint) it currently deploys to us-east-1 by default. We're looking at changing this behavior to use the region setting in ~/.aws/config file. For now, you can change the endpoint to be an EU-specific endpoint (in both skill.json and .ask/config) before deploying to work around this.
Thanks again,
Peter
Sorry for wasting your time but could you specify how a region change in ~/.ask/cli_config should look?
This is my ~/.ask/cli_config
{
"profiles": {
"default": {
"aws_profile": "default",
"token": {
"access_token": "My_access_token",
"refresh_token": "My_refresh_token",
"token_type": "bearer",
"expires_in": 3600,
"expires_at": "2017-10-06T14:12:26.171Z"
},
"vendor_id": "My_vendor_id"
}
}
}
This is my skill.json, that i get when i call: ask api get-skill -s skill_id > skill.json
{
"skillManifest": {
"publishingInformation": {
"locales": {
"en-GB": {
"name": "My Skill"
}
},
"isAvailableWorldwide": true,
"category": "PUBLIC_TRANSPORTATION",
"distributionCountries": []
},
"apis": {
"custom": {
"endpoint": {
"uri": "arn:aws:lambda:eu-west-1:123456789:function:MySkill"
},
"interfaces": []
}
},
"manifestVersion": "1.0"
}
}
As you may have guessed, "ask api ..." works fine and uses the correct region. But when I call "ask lambda download -f MySkill" I get the error:
ResourceNotFoundException: Function not found: arn:aws:lambda:us-east-1:123456789:function:MySkill
So should I add a region field to my cli_config and how would it look exactly? Thanks for your time.
for me it works if I edit the following file:
~/.aws/credentials
(Linux, macOS, or Unix)
C:\Users\
(Windows)USERNAME
\.aws\credentials
[ask_cli_default] aws_access_key_id=YOUR_AWS_ACCESS_KEY aws_secret_access_key=YOUR_AWS_SECRET_KEY region=eu-west-1
This worked for me as well. I may have accidentally done the default region when running ask init.
Dear Amazon Team,
Given that multiple Alexa developers have this problem and Peter@AMZN already acknowledged this is a bug, can you please provide the steps to overcome this issue ? We are all trying to decipher what Peter might have meant with his cryptical message above, but with no luck.
Peter mentioned changing the endpoint to an EU specific endpoint in both skill.json and .ask/config. And here is what I did, but still no success.
I changed the contents of my skill's skill.json from
"apis": { "custom": { "endpoint": { "sourceDir": "lambda/custom" } } }
into
"apis": { "custom": { "regions": { "EU": { "endpoint": { "sourceDir": "lambda/custom" } } } } }
And I also changed the contents of my skill's /.ask/config file from:
"apis": { "custom": { "endpoint": {
"sourceDir": "lambda/custom" } } }
into:
"apis": { "custom": { "regions": {
"EU": {
"endpoint": {
"sourceDir": "lambda/custom" } } } } }
And now, when I try to use ASK CLI to deploy my skill, I get this error:
[Error]: Invalid skill information. Please check skill.json against `.ask/config`. The "merge" object inside the config file will overwrite the existing field in skill.json at runtime.
Any other suggestions ?
I also have this problem, the ask-cli doesn't seem to be using the region from the associated profile therefore I can't manage lambda functions using it.
"The trigger setting for the Lambda arn:... is invalid." problem for separately deployed Lambda. 3 Answers
Will an Alexa device in a region always hit the same region Lambda endpoint? 1 Answer
Ask CLI not creating lambda 3 Answers
ask-cli does not deploy to eu-west-1 or other regions as the default us-east-1 10 Answers