无服务器部署无法获取AWS凭据

时间:2018-01-30 08:02:44

标签: serverless-framework serverless serverless-plugins

在PowerShell上,我定义了两个环境变量来定义AWS秘密和访问密钥:

$AWS_ACCESS_KEY_ID="AAAA"
$AWS_SECRET_ACCESS_KEY="CCCC"

PS C:\Users\Obaid\serverless\helloJava> serverless deploy
Serverless: Packaging service...

Serverless Error ---------------------------------------

ServerlessError: AWS provider credentials not found.
Learn how to set up AWS provider credentials in our docs (...)

为什么无服务器无法选择我的凭据?

1 个答案:

答案 0 :(得分:1)

您必须在powershell中设置环境变量,如此

$env:AWS_ACCESS_KEY_ID="AAAA"
$env:AWS_SECRET_ACCESS_KEY="CCCC"