[英]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.