"functions.app.events [0]"处的无服务器配置警告:不支持的功能事件 [英] Serverless Configuration warning at 'functions.app.events[0]': unsupported function event

查看:91
本文介绍了"functions.app.events [0]"处的无服务器配置警告:不支持的功能事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I'm trying to deploy an AWS API with serverless.com

当我这样做时:

sls --stage=dev --aws-profile=myprofile deploy --force

我收到以下警告:

Configuration warning at 'functions.app.events[0]': unsupported function event

我的serverless.yml包含以下部分:

My serverless.yml contains the section:

functions:
  app:
    handler: src/index.handler
    memorySize: 3008
    events:
      - httpApi:
        method: '*'
        path: '*'
        authorizer:
          name: serviceAuthorizer
          scopes: # Optional
            - user.id
            - user.email

事件"部分出了什么问题?

What is wrong with the events section?

推荐答案

我遇到了类似的问题.问题在于缩进.尝试修复它:

I had the similar issue. The problem was with indentation. Try to fix it:

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

这篇关于"functions.app.events [0]"处的无服务器配置警告:不支持的功能事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆