timestream/template.yaml [20:66]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Description: 
        |
        Prefix of a MQTT topic to publish debugging information.'

Resources:
  ############################################################################################
  # Payload transformation Lambda function to be called from AWS IoT Core. This function will refer to 
  # layer "DecoderLayer" to include the necessary decoding libraries 
  ############################################################################################

  WriteLoRaWANDataToTimestreamFunction:
    Type: AWS::Serverless::Function
    Name: !Sub '${AWS::StackName}-WriteLoRaWANDataToTimestreamFunction'
    Properties:
      CodeUri: src-lambda-write-to-timestream
      Handler: app.lambda_handler
      Runtime: python3.7
      Timeout: 10
      Environment:
        Variables:
          DB_NAME: !Ref TimestreamDatabase
          TABLE_NAME_TELEMETRY: !Select [ "1", !Split [ "|" , !Ref TimestreamTableTelemetry]]
          TABLE_NAME_METADATA: !Select [ "1", !Split [ "|" , !Ref TimestreamTableMetadata]]
      Policies:
         -  Statement:
            - Sid: Pol1
              Effect: Allow
              Action:
                - timestream:WriteRecords
              Resource: !GetAtt TimestreamTableTelemetry.Arn
            - Sid: Pol2
              Effect: Allow
              Action:
                - timestream:WriteRecords
              Resource: !GetAtt TimestreamTableMetadata.Arn
            - Sid: Pol3
              Effect: Allow
              Action:
                - timestream:DescribeEndpoints
              Resource: "*"

  WriteLoRaWANDataToTimestreamFunctionPermission:
    Type: AWS::Lambda::Permission
    Properties:
      FunctionName: !GetAtt WriteLoRaWANDataToTimestreamFunction.Arn
      Action: lambda:InvokeFunction
      Principal: iot.amazonaws.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



timestream_for_transform_binary_payload/template.yaml [25:71]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Description: 
        |
        Prefix of a MQTT topic to publish debugging information.'

Resources:
  ############################################################################################
  # Payload transformation Lambda function to be called from AWS IoT Core. This function will refer to 
  # layer "DecoderLayer" to include the necessary decoding libraries 
  ############################################################################################

  WriteLoRaWANDataToTimestreamFunction:
    Type: AWS::Serverless::Function
    Name: !Sub '${AWS::StackName}-WriteLoRaWANDataToTimestreamFunction'
    Properties:
      CodeUri: src-lambda-write-to-timestream
      Handler: app.lambda_handler
      Runtime: python3.7
      Timeout: 10
      Environment:
        Variables:
          DB_NAME: !Ref TimestreamDatabase
          TABLE_NAME_TELEMETRY: !Select [ "1", !Split [ "|" , !Ref TimestreamTableTelemetry]]
          TABLE_NAME_METADATA: !Select [ "1", !Split [ "|" , !Ref TimestreamTableMetadata]]
      Policies:
         -  Statement:
            - Sid: Pol1
              Effect: Allow
              Action:
                - timestream:WriteRecords
              Resource: !GetAtt TimestreamTableTelemetry.Arn
            - Sid: Pol2
              Effect: Allow
              Action:
                - timestream:WriteRecords
              Resource: !GetAtt TimestreamTableMetadata.Arn
            - Sid: Pol3
              Effect: Allow
              Action:
                - timestream:DescribeEndpoints
              Resource: "*"

  WriteLoRaWANDataToTimestreamFunctionPermission:
    Type: AWS::Lambda::Permission
    Properties:
      FunctionName: !GetAtt WriteLoRaWANDataToTimestreamFunction.Arn
      Action: lambda:InvokeFunction
      Principal: iot.amazonaws.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



