简体   繁体   English

调用 UpdateFunctionCode 操作 Lambda AWS 时发生错误 (MissingAuthenticationTokenException)

[英]An error occurred (MissingAuthenticationTokenException) when calling the UpdateFunctionCode operation Lambda AWS

I have a function in my Lambda named my-s3-function .我的 Lambda 中有一个 function 名为my-s3-function I need to add this dependency to my Lambda Node.JS.我需要将此依赖项添加到我的 Lambda Node.JS 中。 I have followed this part to update the script with dependency included (though, I didn't follow the step wherein I need to zip the folder using zip -r function.zip. but instead I zip the folder by right-clicking it on my PC). I have followed this part to update the script with dependency included (though, I didn't follow the step wherein I need to zip the folder using zip -r function.zip. but instead I zip the folder by right-clicking it on my个人电脑)。

The zip file's structured like this inside: zip 文件内部结构如下:

|node_modules
    |<folders>
    |<folders>
    |<folders>
    ... // the list goes on
|index.js
|package_lock.json

Upon typing the code aws lambda update-function-code --function-name my-s3-function --zip-file fileb://function.zip to the terminal, I get the following response:在终端输入代码aws lambda update-function-code --function-name my-s3-function --zip-file fileb://function.zip后,我得到以下响应:

An error occurred (MissingAuthenticationTokenException) when calling the UpdateFunctionCode operation: Missing Authentication Token

What should I do to resolve this?我应该怎么做才能解决这个问题?

Based on the comments, this got resolved by configuring the credentials as described in the documentation.根据评论,通过配置文档中描述的凭据解决了这个问题。

Try first with exporting the credentials as described Environment variables to configure the AWS CLI .首先尝试按照描述的环境变量导出凭证以配置 AWS CLI Once you are sure your credentials are correct then you can follow this Configuration and credential file一旦你确定你的凭证是正确的,那么你可以按照这个配置和凭证文件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 调用CreateStack操作时发生错误(AccessDenied): - An error occurred (AccessDenied) when calling the CreateStack operation: AWS Lambda调用外部API时显示错误 - aws lambda calling external API showing error when it is working 使用`requestjs`从Node Js调用AWS lambda端点时总是出现502错误 - Always get 502 error when calling AWS lambda endpoint from Node Js using `requestjs` 从 AWS lambda 运行的 nodejs 中的“错误:没有为操作设置输入”代码 - "Error: No input was set for operation" code in nodejs running from AWS lambda AWS:调用getCredentialsForIdentity()时出错 - AWS: Error when calling getCredentialsForIdentity() AWS Lambda Cryptic Node.js 错误:发生未知应用程序错误 - AWS Lambda Cryptic Node.js error: Unknown application error occurred AWS Lambda 超时(NodeJS - 调用 Google Calendar API 时) - AWS Lambda Timeout (NodeJS - when calling Google Calendar API) 部署AWS lambda部署包时出错 - Error when deploying AWS lambda deployment package 响应数据很大时,AWS Lambda NodeJs响应错误 - AWS Lambda NodeJs response error when response data is large 返回 hasura 变量时出错 - Auth Webhook - AWS Lambda - ERROR when returning hasura variables - Auth Webhook - AWS Lambda
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM