# \[SOLVED\] Event with matched pattern

**URL:** <https://forum.serverless.com/t/solved-event-with-matched-pattern/15001>\
**Category:** Serverless Framework\
**Tags:** aws\
**Created:** [May 14, 2021, 9:01am UTC](https://forum.serverless.com/t/solved-event-with-matched-pattern/15001 "2021-05-14T09:01:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arsene](https://avatars.discourse-cdn.com/v4/letter/a/eb9ed0/32.png) [@Arsene](https://forum.serverless.com/u/Arsene)\
**Post date:** [May 14, 2021, 9:01am UTC](https://forum.serverless.com/t/solved-event-with-matched-pattern/15001/1 "2021-05-14T09:01:40Z")

</div>

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

```
custom:                                                                         
    accountId: !Ref AWS::AccountId   

functions:
    my-function:  
        handler: my_function.lambda_handler    
        memorySize: 256    
        timeout: 30                                              
        events:                            
            - eventBridge:   
                pattern:                   
                    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](https://www.serverless.com/framework/docs/providers/aws/events/event-bridge/#eventbridge-event)

---

<div class="post-metadata">

**Author:** ![Arsene](https://avatars.discourse-cdn.com/v4/letter/a/eb9ed0/32.png) [@Arsene](https://forum.serverless.com/u/Arsene)\
**Post date:** [May 14, 2021, 10:21am UTC](https://forum.serverless.com/t/solved-event-with-matched-pattern/15001/2 "2021-05-14T10:21:08Z")

</div>

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](https://stackoverflow.com/questions/64074827/serverless-configuration-warning-at-functions-app-events0-unsupported-funct/64546429#64546429)

---

<div class="post-metadata">

**Author:** ![kodiak](https://avatars.discourse-cdn.com/v4/letter/k/ebca7d/32.png) [@kodiak](https://forum.serverless.com/u/kodiak)\
**Post date:** [June 13, 2021, 1:03am UTC](https://forum.serverless.com/t/solved-event-with-matched-pattern/15001/3 "2021-06-13T01:03:07Z")

</div>

Hi, thanks for sharing the solution.

[Mini Militia](https://www.minimilitia.mobi/) [App Lock](https://www.applock.ooo/)
