aws-api-gateway - 'functions.app.events[0]'上的无服务器配置警告: unsupported function event

标签 aws-api-gateway serverless-framework

我正在尝试通过serverless.com部署AWS API
当我做:

sls --stage=dev --aws-profile=myprofile deploy --force
我收到以下警告:
Configuration warning at 'functions.app.events[0]': unsupported function event
我的serverless.yml包含以下部分:
functions:
  app:
    handler: src/index.handler
    memorySize: 3008
    events:
      - httpApi:
        method: '*'
        path: '*'
        authorizer:
          name: serviceAuthorizer
          scopes: # Optional
            - user.id
            - user.email
事件部分有什么问题?

最佳答案

我有类似的问题。问题在于缩进。尝试解决它:

- httpApi:
    method: '*'
    path: '*'

关于aws-api-gateway - 'functions.app.events[0]'上的无服务器配置警告: unsupported function event,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64074827/

相关文章:

amazon-web-services - 在 AWS CloudFormation 和 Serverless 中组织堆栈和共享资源

amazon-web-services - AWS Lambda 函数 context.identity.cognito_identity_id 返回 null

node.js - 使用无服务器框架时从 AWS Lambda 函数连接 AWS ElasticSearch 实例时出错

amazon-web-services - 如何为 http api 网关启用执行日志

amazon-web-services - 无服务器 - Cloudformation - Lambda 事件创建错误

aws-lambda - 消息: "Internal server error" when try to access aws gateway api

amazon-web-services - 如何使用 Lambda 访问 AWS API Gateway 请求的 HTTP header ?

amazon-web-services - 如何将 "aws_apigatewayv2_route"与 "aws_apigatewayv2_integration"链接起来?

node.js - 无法在nodejs中导入模块 'handler' aws lambda函数

node.js - 亚马逊 SNS 中的徽章计数选项