Right now, it looks like the image being run is a constant AgentImageName = "amazon/amazon-ecs-agent:latest". It'd be useful if this could be changed with an environment variable or something so that it's simpler to test and use custom forks of the agent.
If we were to allow a custom image name, we'd need to:
ecs-init configuration is storedUpdateContainerAgentI created a quick implementation for this that uses the existing config file: /etc/ecs/ecs.config.
It does not address issued 2 & 3 above, but we're generally not using that functionality anyway. New instances are launched using AWS EC2 AutoScaling.
https://github.com/jhby1/amazon-ecs-init/commit/2bc68b7044e43f04fc97f70c05766879a0a2d182
I could potentially clean it up and submit a pull request if there is more interest.
this commit really helps keep us sane. Having the same versions of the agent and at a specific version make problem solving predictable. Image having versions in the autoscale group just having different versions because they were spinned up at a different moment in time.
Thanks for letting us know the use case, we will review this internally and give back to you when we have any updates.
Most helpful comment
I created a quick implementation for this that uses the existing config file: /etc/ecs/ecs.config.
It does not address issued 2 & 3 above, but we're generally not using that functionality anyway. New instances are launched using AWS EC2 AutoScaling.
https://github.com/jhby1/amazon-ecs-init/commit/2bc68b7044e43f04fc97f70c05766879a0a2d182
I could potentially clean it up and submit a pull request if there is more interest.