Run of SSM-agent depends on network communication.
But, startup fails because it does not depend on network-online.target at systemd startup.
For example, startup fails in the following cases.
- The case when you build ami, ssm-agent has been installed and is enabled on systemd
- Startup EC2 using created AMI
- Then I got an error.
connect: network is unreachable 169.254.169.254
Shoud be add dependency of network-online.target.
Here is my changes.
#33