AMAZON-ECS-INIT(1)

NAME
amazon-ecs-init - Elastic Container Service container agent supervisor

SYNOPSIS
amazon-ecs-init ACTION

DESCRIPTION
amazon-ecs-init supports the initialization and supervision of the Amazon ECS container agent (http://github.com/aws/amazon-ecs-agent), including configuration of cgroups, iptables, and required routes among its preparation steps.

ACTIONS

pre-start
    Configure the system and load the ECS agent container image

start
    Start the ECS agent container and wait for it to stop

pre-stop
    Stop the ECS agent container

stop
    Stop the ECS agent container

post-stop
    Cleanup system from ECS agent configuration

reload-cache
    Reload the cached ECS agent container image

INIT SYSTEM USAGE
amazon-ecs-init is officially supported to run under systemd on Amazon Linux 2 and upstart on Amazon Linux 1.

  SYSTEMD
systemd units are expected to use the ACTIONS pre-start, start, stop, and post-stop to manage the lifecycle of the ECS agent. These ACTIONS must be used in the [Service] section with the appropriate Exec directives:

    # in ecs.service
    [Service]
    Type=simple
    ExecStartPre=/usr/libexec/amazon-ecs-init pre-start
    ExecStart=/usr/libexec/amazon-ecs-init start
    ExecStop=/usr/libexec/amazon-ecs-init stop
    ExecStopPost=/usr/libexec/amazon-ecs-init post-stop

  UPSTART
Upstart jobs are expected to use the ACTIONS pre-start, start, pre-stop, and post-stop to manage the lifecycle of the ECS agent. The directives in the upstart job must align with the above ACTIONS:

    # in ecs.conf
    pre-start exec /usr/libexec/amazon-ecs-init pre-start
    exec /usr/libexec/amazon-ecs-init start
    pre-stop exec /usr/libexec/amazon-ecs-init pre-stop
    post-stop exec /usr/libexec/amazon-ecs-init post-stop

TROUBLESHOOTING
Troubleshooting guidance is provided in the online Amazon ECS documentation, please visit https://docs.aws.amazon.com/AmazonECS/latest/developerguide/troubleshooting.html

COPYRIGHT
Copyright 2014-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.

LICENSE
Licensed under the Apache License, Version 2.0.

NOTES

Amazon ECS Agent - Documentation
    https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_agent.html

Amazon ECS Agent - Source Repository
    https://github.com/aws/amazon-ecs-agent

Amazon ECS Init - Source Repository
    https://github.com/aws/amazon-ecs-agent