2017-04-19 42 views

答えて

0
import boto3 

ecs_client = boto3.client('ecs') 
logger = logging.getLogger() 

def lambda_handler(event, context): 
    response = ecs_client.run_task(
     cluster='your-cluster', 
     taskDefinition='your-task-name', 
     count=1, 
     launchType='EC2', # or fargate 
    ) 

    logger.info(response) 

    response = { 
     "isBase64Encoded": "false", 
     "statusCode": 200, 
     "headers": { "COntent-Type": "application/json"}, 
     "body": "hello"  
    } 

    return response 
関連する問題