简体   繁体   English

AWS Lambda 创建 Function - 请求失败,状态代码为 403

[英]AWS Lambda Create Function - Request failed with status code 403

Trying to create a new AWS Lambda Function with the root account for the first time using management console.尝试使用管理控制台首次使用根帐户创建新的 AWS Lambda Function。 I am receiving the error "Request failed with status code 403" no matter how many different options I tried.无论我尝试了多少种不同的选项,我都会收到错误消息“请求失败,状态代码为 403”

I've already tried changing my region, creating the function with default role(basic lambda permissions), new role, existing role and with the options "Author from Scratch", "Use a blueprint", "Serverless app repository" but still getting the same error.我已经尝试更改我的区域,创建具有默认角色(基本 lambda 权限)、新角色、现有角色以及选项“Author from Scratch”、“Use a blueprint”、“Serverless app repository”的 function,但仍然得到同样的错误。

How can i troubleshoot and solve this problem?我该如何排除和解决这个问题?

在此处输入图像描述

Faced with same issue, but "Personal Health Dashbord" is clear for me, nothing strange here.面临同样的问题,但“个人健康仪表板”对我来说很清楚,这里没什么奇怪的。

Just about month ago i created it successfully.大约一个月前,我成功创建了它。 Also, my free tier plan was expired, but may be it the reason?另外,我的免费套餐已过期,但可能是原因吗?

在此处输入图片说明

Also, can't delete old functions :此外,不能删除旧功能:

在此处输入图片说明

So this is essentially a role based issue and definitely seems to be a bug in the lambda console.所以这本质上是一个基于角色的问题,而且肯定是 lambda 控制台中的一个错误。 What worked for me is to first go to the IAM console , create a role , attach a policy with 'AdministratorAccess',and in 'Trust Relationships' tab add 'lambda.amazonaws.com' as a trusted entity.对我有用的是首先转到 IAM 控制台,创建一个角色,使用“AdministratorAccess”附加策略,然后在“信任关系”选项卡中添加“lambda.amazonaws.com”作为受信任的实体。 After this , while creating a lambda function, use this existing role ( instead of creating a new one), and it it should work.在此之后,在创建 lambda 函数时,使用此现有角色(而不是创建新角色),它应该可以工作。

Go to IAM roles.转到 IAM 角色。 Your role already there In Lambda function configuration first try to use an existing role and chooes the role name with your function name.您的角色已经存在 在 Lambda 函数配置中,首先尝试使用现有角色并使用您的函数名称选择角色名称。 see if thats works.看看那是否有效。

Else since its free teir delete all IAM roles and try again否则,因为它的免费 teir 删除所有 IAM 角色并重试

Based on the comments.根据评论。

The issue was resolved by checking Event Logs AWS Personal Health Dashboard , which indicated that permissions on the account were temporary limited by AWS due to Risk IAM quarantine and some suspicious activity.该问题已通过检查Event Logs AWS Personal Health Dashboard 解决,这表明由于Risk IAM quarantine和一些可疑活动,账户的权限被 AWS 临时限制。

In my case it turned out to be because my session had expired.就我而言,结果是因为我的会话已过期。 I closed and then reopened, and the error disappeared.我关闭然后重新打开,错误消失了。

If nothing is working then just wait 24 hours and try again .如果没有任何效果,那么只需等待24 小时,然后再试一次 It worked for me.它对我有用。

I have had similar error when tried to call the lambda from the test interface: 'An error occurred when creating the trigger: Request failed with status code 403'尝试从测试接口调用 lambda 时,我遇到了类似的错误:“创建触发器时发生错误:请求失败,状态代码为 403”

the problem was that I was logged out because I was not active in the AWS console and when I re-logged then it was ok.问题是我被注销了,因为我没有在 AWS 控制台中处于活动状态,当我重新登录时就可以了。

是的,这是由违反 AWS 安全规则或策略的隔离消息,例如:在公共存储库中发布关键 AWS 数据。

403 是访问被拒绝,有时如果您的 MFA 已过期,那么您可以刷新并重试或检查策略是否已更改。

One of the problem that I saw was if you try to create behind corporate firewall, and if cdn is blocked for example below URL.. get the erro https://abcdn.console.awsstatic.com/cafcd473033d51cd552a86e38ae4bbe1b0c88d6c5eab3a9b82e08864508bd0e4/hello-world-packages/nodejs16.x.zip我看到的问题之一是,如果您尝试在公司防火墙后面创建,并且如果CDN被阻止,例如URL/nodejs16.x.zip

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

相关问题 AWS Amplify 发布请求失败并显示“状态代码 403 at node_modules/axios” - AWS Amplify post request fails with "status code 403 at node_modules/axios" Cloud9 上的 AWS copilot InvalidClientTokenId:请求中包含的安全令牌无效(状态代码:403) - AWS copilot on Cloud9 InvalidClientTokenId: The security token included in the request is invalid (status code: 403) AWS 放大 REST API Lambda Function 403 {“消息”:“拒绝访问”} - AWS Amplify REST API Lambda Function 403 {"message":"Access Denied"} 对 AWS lambda 函数的 curl 请求没有收到 json - curl request to AWS lambda function receives no json AWS Axios 请求中的 NodeMailer Lambda function - NodeMailer inside of Axios request on a AWS Lambda function 通过 http 请求调用 AWS Lambda function - Invoke a AWS Lambda function by a http request 无法在 AWS 控制台创建 Lambda Function - Cannot Create a Lambda Function on AWS Console 无法使用 CDK 创建 AWS Lambda function - Could not create an AWS Lambda function using CDK Status=403 Code="AuthorizationFailure" Message="此请求无权执行此操作" - Status=403 Code="AuthorizationFailure" Message="This request is not authorized to perform this operation" AWS CDK:如何在没有代码的情况下创建 lambda - AWS CDK: How to create lambda without code
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM