Parameters: IntValue: Type: Number Default: 100 One: Type: Number Default: 1 StartingPositionValue: Type: String Default: LATEST FunctionResponseTypesValue: Type: String Default: ReportBatchItemFailures Conditions: TrueCondition: Fn::Equals: - true - true FalseCondition: Fn::Equals: - true - false Resources: MyLambdaFunction: Type: AWS::Serverless::Function Properties: Handler: index.handler Runtime: nodejs14.x CodeUri: ${codeuri} MemorySize: 128 Events: KinesisStream: Type: Kinesis Properties: BatchSize: Ref: IntValue BisectBatchOnFunctionError: Fn::If: - FalseCondition - true - false Enabled: Fn::If: - TrueCondition - true - false FunctionResponseTypes: - Ref: FunctionResponseTypesValue MaximumBatchingWindowInSeconds: Ref: One MaximumRecordAgeInSeconds: Ref: IntValue MaximumRetryAttempts: Ref: One ParallelizationFactor: Ref: One StartingPosition: Ref: StartingPositionValue Stream: # Connect with the stream we have created in this template Fn::Join: - '' - - 'arn:' - Ref: AWS::Partition - ':kinesis:' - Ref: AWS::Region - ':' - Ref: AWS::AccountId - :stream/ - Ref: MyStream TumblingWindowInSeconds: Ref: IntValue MyStream: Type: AWS::Kinesis::Stream Properties: ShardCount: 1 Metadata: SamTransformTest: true