如何使用有效的 AWS 配置文件配置 Alexa ask-cli? [英] How to configure Alexa ask-cli with a valid AWS profile?

查看:20
本文介绍了如何使用有效的 AWS 配置文件配置 Alexa ask-cli?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用 developer.amazon.com 和 aws.amazon.com 的漂亮浏览器 GUI 之后,事情变得很严重,现在我想使用 ask-cli 来初始化 Alexa 技能及其 lambda 函数.

After playing around with the nice browser GUIs of developer.amazon.com and aws.amazon.com things getting serious and now I want to use ask-cli to initialize Alexa skills and their lambda functions.

当我想询问 init 时,它告诉我,我应该选择一个配置文件还是创建一个新的配置文件.两者都跳转到浏览器并使用 OAuth 来验证我的 ask 安装.

When I want to ask init, it tells me, I should select a profile or create a new one. Both jump to the browser and use OAuth to authenticate my ask installation.

~ ask init
? Please create a new profile or overwrite the existing profile.
 (Use arrow keys)
  ──────────────
❯ Create new profile
  ──────────────
  Profile              Associated AWS Profile
  [default]                 ** NULL **
  [aws_profile]             ** NULL **

但 AWS 配置文件不会关联我的 AWS 配置文件.

But the AWS Profile will not associate my AWS Profile.

如果我不将配置文件与 AWS 连接,我的 LamdaFunction 将不会加载/部署.

My LamdaFunction will not load/deploy, if I don't connect the profile with AWS.

No AWS credential setup for profile: [default]. 
Lambda clone skipped. CLI lambda functionalities can be enabled 
by running `ask init` again to add 'aws_profile' to ASK cli_config

如何正确连接我的 ask-cli?

How could I connect my ask-cli correctly?

推荐答案

您需要先在本地计算机上下载并安装 aws CLI.您可以从以下链接下载 aws CLI.

You need to first download and install aws CLI on your local machine. You can download aws CLI from below link.

http://docs.aws.amazon.com/cli/最新/用户指南/installing.html

如果您使用的是根帐户用户,则必须生成访问 ID 和密钥,否则必须创建具有 lambda 执行权限的新 IAM 用户.

If you are working with your root account user then you have to generate your access ID and secret key else you have to create new IAM user with lambda execute permission.

您可以从以下链接生成 root 用户访问 ID 和密钥.https://console.aws.amazon.com/iam/home

You can generate root user access ID and secret key from below link. https://console.aws.amazon.com/iam/home

然后点击管理安全凭证,如下图所示,忽略警告后,您可以处理并点击访问密钥 ID 和密钥链接并生成新的并复制它们.

Then click on Manage Security credential as shown in below image and after ignoring the warnings you can process and click Access Key ID and secret key link and generate new one and copy them.

运行 aws configure 命令来配置您的 aws 帐户,它会询问您生成的访问 ID 和密钥,并将设置您的 aws 帐户.

Run aws configure command to configure your aws account and it will ask for Access ID and secret key that you generated and will setup your aws account.

aws 配置

aws 配置后,您可以再次运行 ask init 命令来配置帐户.

After aws configure, you can run again ask init command again to configure account.

询问初始化

这篇关于如何使用有效的 AWS 配置文件配置 Alexa ask-cli?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆