Conditions: MyCondition: Fn::Equals: - true - true Resources: # S3 Event without condition, using same bucket FunctionOne: Type: AWS::Serverless::Function Properties: CodeUri: s3://sam-demo-bucket/thumbnails.zip Handler: index.generate_thumbails Runtime: nodejs12.x Events: ImageBucket: Type: S3 Properties: Bucket: Ref: Images Events: s3:ObjectCreated:* # All Event Types MyAwesomeFunction: Type: AWS::Serverless::Function Condition: MyCondition Properties: CodeUri: s3://sam-demo-bucket/hello.zip Handler: hello.handler Runtime: python2.7 AutoPublishAlias: Live Events: EBSchedule: Type: Schedule Properties: Schedule: rate(1 minute) CWEvent: Type: CloudWatchEvent Properties: Pattern: detail: state: - terminated EBRule: Type: EventBridgeRule Properties: Pattern: detail: state: - launched CWLog: Type: CloudWatchLogs Properties: LogGroupName: MyLogGroup FilterPattern: My pattern IoTRule: Type: IoTRule Properties: Sql: SELECT * FROM 'topic/test' AwsIotSqlVersion: beta S3Trigger: Type: S3 Properties: Bucket: Ref: Images Events: s3:ObjectCreated:* NotificationTopic: Type: SNS Properties: Topic: Ref: Notifications SNSTopicWithSQSSubscription: Type: SNS Properties: Topic: Ref: Notifications SqsSubscription: QueueArn: !GetAtt Queue.Arn QueueUrl: !Ref Queue AnotherSNSWithSQSSubscription: Type: SNS Properties: Topic: Ref: Notifications SqsSubscription: true KinesisStream: Type: Kinesis Properties: Stream: arn:aws:kinesis:us-west-2:012345678901:stream/my-stream BatchSize: 100 StartingPosition: TRIM_HORIZON DDBStream: Type: DynamoDB Properties: Stream: arn:aws:dynamodb:us-west-2:012345678901:table/TestTable/stream/2015-05-11T21:21:33.291 BatchSize: 200 StartingPosition: LATEST Notifications: Condition: MyCondition Type: AWS::SNS::Topic Images: Type: AWS::S3::Bucket Queue: Condition: MyCondition Type: AWS::SQS::Queue