Parameters: PlaybookIAMRole: Type: String Resources: ScaleECSWithApproval: Type: "AWS::SSM::Document" Properties: DocumentType: Automation Name: Runbook-ECS-Scale-Up Content: schemaVersion: '0.3' assumeRole: !Ref PlaybookIAMRole parameters: ECSClusterName: type: String ECSServiceName: type: String ECSDesiredCount: type: Integer Timer: type: String default: PT10M NotificationTopicArn: type: String NotificationMessage: type: String ApproverArn: type: String mainSteps: - name: ExecuteApprovalGateWithTimer action: 'aws:executeAutomation' inputs: DocumentName: Approval-Gate RuntimeParameters: Timer: '{{Timer}}' NotificationTopicArn: '{{NotificationTopicArn}}' NotificationMessage: '{{NotificationMessage}}' ApproverArn: '{{ApproverArn}}' - name: UpdateECSServiceDesiredCount action: aws:executeAwsApi inputs: Service: ecs Api: UpdateService service: '{{ECSServiceName}}' forceNewDeployment: true desiredCount: '{{ECSDesiredCount}}' cluster: '{{ECSClusterName}}'