在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 (...)
为什么无服务器无法选择我的凭据?
答案 0 :(得分:1)
您必须在powershell中设置环境变量,如此
$env:AWS_ACCESS_KEY_ID="AAAA"
$env:AWS_SECRET_ACCESS_KEY="CCCC"