簡體   English   中英

將簡單的 node.js 應用程序部署到 AWS Lambda 無服務器失敗並出現 GeneralServiceException

[英]Deployment of simple node js application to AWS Lambda Serverless Failing with GeneralServiceException

我正在嘗試使用 aws cli 將一個簡單的 NodeJS 應用程序部署到 aws lambda 無服務器。 在部署過程中,應用程序拋出 GeneralService Exception 並顯示以下錯誤消息。

Deploying aws-demo to stage dev (us-east-1)
Warning: Not authorized to perform: lambda:GetFunction for at least one of the lambda functions. Deployment will not be skipped even if service files did not change.

× Stack aws-demo-dev failed to deploy (155s)
Environment: win32, node 14.15.5, framework 3.26.0, plugin 6.2.2, SDK 4.3.2
Credentials: Local, "default" profile                                                                                                                          
Docs:        docs.serverless.com
Support:     forum.serverless.com
Bugs:        github.com/serverless/serverless/issues

Error:
CREATE_FAILED: HelloLambdaFunction (AWS::Lambda::Function)
Resource handler returned message: "null (Service: Lambda, Status Code: 403, Request ID: 0f60ffeb-add5-4571-856f-72a390ce5be9)" (RequestToken: beefe9c6-32d2-5d7f-f483-d97a6e76b73c, HandlerErrorCode: GeneralServiceException)

下面是應用的 serverless.yml 文件配置:

service: aws-demo
frameworkVersion: '3'

provider:
  name: aws
  runtime: nodejs12.x
  memorySize: 512
  stage: dev
  timeout: 15
  region: us-east-1

functions:
  hello:
    handler: handler.hello
    events:
      - http: ANY /{proxy+}
      - http: ANY /

升級您的 AWS 用戶憑證:) 如果已經完成則覆蓋。 使用覆蓋命令

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM