AMAZON-ECS-INIT(1)
π AMAZON-ECS-INIT(1) π
okay so bestie, you're reading the amazon-ecs-init page from the AMAZON-ELASTIC-CONTAINER-SERVICE manual, and honestly? it's a whole vibe. let's get into it π«Ά
β¨ NAME β¨
amazon-ecs-init β the Elastic Container Service container agent supervisor, aka the girl who keeps an eye on everything πΈ
β¨ SYNOPSIS β¨
amazon-ecs-init ACTION
π¦ DESCRIPTION π¦
so amazon-ecs-init handles the initialization and the supervision of the Amazon ECS container agent (that's http://github.com/aws/amazon-ecs-agent if you wanna go look at it π). and when we say "preparation steps" we mean it β it's out here configuring cgroups, iptables, and the required routes too. like, she does it all. main character energy fr fr π₯
π ACTIONS π
pre-startβ sets up the system and loads the ECS agent container image. the getting-ready portion of the evening β¨startβ starts the ECS agent container and then justβ¦ waits for it to stop. patient queen πpre-stopβ stops the ECS agent containerstopβ stops the ECS agent container (yes, same thing β that's what the page says, no cap)post-stopβ cleans the system up from the ECS agent configuration. the "okay everybody go home" moment π§Ήreload-cacheβ reloads the cached ECS agent container image π
π INIT SYSTEM USAGE π
official support situation: amazon-ecs-init is officially supported to run under systemd on Amazon Linux 2 and up, and under upstart on Amazon Linux 1. iykyk π
β 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
π¨ bestie, notice the difference: systemd usesstop, upstart usespre-stop. don't mix them up, okay? π
π§ TROUBLESHOOTING π§
when things go sideways (and sometimes they do π), the troubleshooting guidance lives 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
and that's the whole page, bestie ππ this was AMAZON-ECS-INIT(1) from the AMAZON-ELASTIC-CONTAINER-SERVICE manual β go forth and supervise those containers, you're gonna slay π¦β¨
π¦ where this page comes from
- opensuse-leap 16.0: amazon-ecs-init 1.108.0-160000.1.1 Β· Apache-2.0
- opensuse-leap 16.0: amazon-ecs-init 1.108.0-160000.1.1 Β· Apache-2.0
- Copyright 2014-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms