[SOLVED] Event with matched pattern

I need to use serverless.yml to connect EventBridge and Lambda services. Most of docs I found are schedule related. The doc here[1] contains the pattern style configuration. So I tested to tweak a bit with following setting

    accountId: !Ref AWS::AccountId   

        handler: my_function.lambda_handler    
        memorySize: 256    
        timeout: 30                                              
            - eventBridge:   
                    account: ${self:custom.accountId} 

However when deploying, serverless throws following warning. What should I change to support sending all events to that event bridge (This is just for testing i.e. to get it work first, so issues such performances - e.g. too many events - are not important)?

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

[1]. https://www.serverless.com/framework/docs/providers/aws/events/event-bridge/#eventbridge-event

I think I find the root cause. It’s indent space, where two more are needed. : (

[1]. aws api gateway - Serverless Configuration warning at 'functions.app.events[0]': unsupported function event - Stack Overflow

Hi, thanks for sharing the solution.

Mini Militia App Lock