本地运行aws lambda credential 配置 (missing credential config error)
Posted IamThat
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了本地运行aws lambda credential 配置 (missing credential config error)相关的知识,希望对你有一定的参考价值。
参照这篇文章 http://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/loading-node-credentials-shared.html
You can keep your AWS credentials data in a shared file used by SDKs and the command line interface. The SDK for JavaScript automatically searches the shared credentials file for credentials when loading. Where you keep the shared credentials file depends on your operating system:
-
Linux users:
~/.aws/credentials
-
Windows users:
C:\Users\USER_NAME\.aws\credentials
If you do not already have a shared credentials file, you can create one in the designated directory. Add the following text to the credentials file, replacing <YOUR_ACCESS_KEY_ID>
and <YOUR_SECRET_ACCESS_KEY>
values:
[default] aws_access_key_id =
<YOUR_ACCESS_KEY_ID>
aws_secret_access_key =<YOUR_SECRET_ACCESS_KEY>
新建credential 文件 并将acess key 等填入 就可以本地运行 lambda
以上是关于本地运行aws lambda credential 配置 (missing credential config error)的主要内容,如果未能解决你的问题,请参考以下文章
AWS CDK - 如何在本地运行 API 和 Lambda?
如何使用 NodeJS 在本地测试 AWS Lambda 处理程序?
从本地系统而不是S3上运行的node.js应用程序调用AWS Lambda