service: service

configValidationMode: error

provider:
  name: aws
  runtime: nodejs16.x
  versionFunctions: false

functions:
  snsMinimal:
    handler: core.snsMinimal
    events:
      - sns: ${self:service}-minimal

  snsMultipleFilteredLeft:
    handler: core.snsMultipleFilteredLeft
    events:
      - sns:
          topicName: ${self:service}-filtered
          displayName: 'Integration Test: ${self:service}-filtered'
          filterPolicy:
            side:
              - left
  snsMultipleFilteredRight:
    handler: core.snsMultipleFilteredRight
    events:
      - sns:
          topicName: ${self:service}-filtered
          displayName: 'Integration Test: ${self:service}-filtered'
          filterPolicy:
            side:
              - right

  snsExisting:
    handler: core.snsExisting
    events:
      - sns:
          arn:
            Fn::Join:
              - ':'
              - - 'arn:aws:sns'
                - Ref: 'AWS::Region'
                - Ref: 'AWS::AccountId'
                - ${self:service}-existing
          topicName: ${self:service}-existing
