AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Description: An AWS Serverless Specification template describing your function.
Resources:
  videoDuration:
    Type: 'AWS::Serverless::Function'
    Properties:
      CodeUri: .
      Description: ''
      MemorySize: 128
      Timeout: 600
      Handler: lambda_function.lambda_handler
      Runtime: python3.9
      Architectures:
        - x86_64
      EventInvokeConfig:
        MaximumEventAgeInSeconds: 21600
        MaximumRetryAttempts: 2
      EphemeralStorage:
        Size: 512
      Events:
        Schedule1:
          Type: Schedule
          Properties:
            Schedule: cron(0 18 * * ? *)
      Environment:
        Variables:
          db_database: the_ear_prod_db_a
          db_host: the-ear-prod-db-a.cluster-coaufliysybm.af-south-1.rds.amazonaws.com
          db_password: EqmvM1bL0FYJyX
          db_user: admin
      Layers:
        - 'arn:aws:lambda:af-south-1:055752874982:layer:packages:2'
      Role: 'arn:aws:iam::055752874982:role/service-role/videoDuration-role-ezd8bp5t'
      RuntimeManagementConfig:
        UpdateRuntimeOn: Auto
      SnapStart:
        ApplyOn: None
      PackageType: Zip
      VpcConfig:
        SecurityGroupIds:
          - sg-0b1438e5765fd1440
        SubnetIds:
          - subnet-0d3f1cc6598f5d416
          - subnet-02d6fd15bd0519011
