AMAZON-ECS-INIT(1)

πŸ“¦ version 1.108.0, in opensuse-leap 16.0

πŸ’… 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 container
  • stop β€” 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 uses stop, upstart uses pre-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 2014-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.


πŸ“œ LICENSE πŸ“œ

Licensed under the Apache License, Version 2.0.


🌸 NOTES 🌸


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