test.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:tf_aws_ecs_instance_draining_on_scale_in 作者: terraform-community-modules 项目源码 文件源码
def lambda_handler(event, context):

    print(boto3.__version__)
    # TODO implement
    #1850bf7b-af0c-40c6-a480-00aeda2a2966

    session = boto3.session.Session()
    ecsClient = session.client(service_name='ecs')
    ecsResponse = ecsClient.update_container_instances_state(cluster='ecs-cd-Cluster-QPJZXE8U4HDM',containerInstances=['1850bf7b-af0c-40c6-a480-00aeda2a2966'],status='DRAINING')
    print ("Response = " , ecsResponse)

    return 'Hello from Lambda'
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号