stacks: [media-service]
regions: [eu-west-1]
templates:
  lambda:
    type: aws-lambda
    parameters:
      bucket: atom-maker-dist
      prefixStack: false
deployments:
  media-atom-maker-ami-update:
      type: ami-cloudformation-parameter
      app: media-atom-maker
      parameters:
        amiTags:
          Recipe: editorial-tools-jammy-java11
          AmigoStage: PROD
  media-atom-maker:
    type: autoscaling
    parameters:
      bucket: atom-maker-dist
    dependencies:
      - media-atom-maker-ami-update

  media-atom-expirer:
    template: lambda
    parameters:
      functionNames: [media-atom-maker-expirer-]
      fileName: media-atom-expirer.zip
  media-atom-scheduler:
    template: lambda
    parameters:
      functionNames: [media-atom-maker-scheduler-]
      fileName: media-atom-scheduler.zip
  pluto-message-ingestion:
    template: lambda
    parameters:
      functionNames: [pluto-message-ingestion-]
      fileName: pluto-message-ingestion.zip

  media-atom-pipeline-cloudformation:
    type: cloud-formation
    app: media-atom-pipeline
    parameters:
      cloudFormationStackName: media-atom-pipeline
      prependStackToCloudFormationStackName: false
      templatePath: media-atom-pipeline.yaml

  media-atom-pipeline-lambdas:
    template: lambda
    contentDirectory: media-atom-upload-actions
    parameters:
      fileName: media-atom-uploader.zip
      functionNames:
        - "media-atom-pipeline-GetChunkFromS3-"
        - "media-atom-pipeline-UploadChunkToYouTube-"
        - "media-atom-pipeline-MultipartCopyChunkInS3-"
        - "media-atom-pipeline-SendToPluto-"
        - "media-atom-pipeline-SendToTranscoder-"
        - "media-atom-pipeline-GetTranscodingProgress-"
        - "media-atom-pipeline-AddAssetToAtom-"
        - "media-atom-pipeline-AddUploadDataToCache-"
        - "media-atom-pipeline-CompleteMultipartCopy-"
    dependencies:
      - media-atom-pipeline-cloudformation
