import * as AWS from 'aws-sdk'; import { AccountConfig, ServiceContext } from 'handel-extension-api'; import { HandlebarsEcsTemplateAutoScaling, HandlebarsEcsTemplateContainer } from '../../common/ecs-shared-config-types'; import { EcsServiceConfig } from './config-types'; /** * This function creates an account-wide Lambda for ECS cluster auto-scaling if it doesn't already exist. * * This Lambda looks at every cluster in the account and logs two CloudWatch metrics for each every minute: * * ClusterNeedsScalingUp * * ClusterNeedsScalingDown * * These metrics are used by Handel ECS clusters to scale up and down the instances. * * The code for the auto-scaling Lambda can be found in the "cluster-scaling-lambda" directory inside * the ECS service deployer directory. */ export declare function createAutoScalingLambdaIfNotExists(accountConfig: AccountConfig): Promise; /** * This function creates an account-wide Lambda for draining terminating ECS cluster instances if it doesn't already exist. * * The code for the draining Lambda can be found in the "cluster-draining-lambda" directory inside * the ECS service deployer directory. */ export declare function createDrainingLambdaIfNotExists(accountConfig: AccountConfig): Promise; /** * This function calculates the required instance count for the ECS cluster based on the requested tasks. * * This function is used for both 'min' and 'max' auto-scaling group calculations. */ export declare function getMemoryForInstanceType(ownServiceContext: ServiceContext): Promise; export declare function getInstanceCountForCluster(instanceMemory: number, autoScaling: HandlebarsEcsTemplateAutoScaling, containerConfigs: HandlebarsEcsTemplateContainer[], calculationType: string, serviceName: string): Promise;