import boto3
import json
def lambda_handler(event, context):
springClusterName = event['springCluster']
springServiceName = event['springService']
nginxClusterName = event['nginxCluster']
nginxServiceName = event['nginxService']
client = boto3.client('ecs')
response1 = client.update_service(
cluster=springClusterName,
service=springServiceName,
desiredCount = 5)
response2 = client.update_service(
cluster=nginxClusterName,
service=nginxServiceName,
desiredCount = 5)
response = response1 + response2
print(response)
cron(0 0 20 2/6 ? *)