moto
moto copied to clipboard
ECS run_task in fargate mode
Is there a way to mock ecs run_task in fargate mode? Currently, I only find EC2 mode. Thanks !
Thanks for opening.
Not today, but I am going to set this as a feature request.
Seconding this!
It's been a while since this request, just wondering if it's still on the roadmap? Thanks!
Hi @mracette, moto is really a community-driven project, so there's no roadmap as such. Features just get added by people who want to contribute/really need that specific feature. So if somebody feels like developing this - PR's are always welcome!
There's been quite some improvements to ECS since this was raised, including in #3584, and we do have internal tests that call run_task(launchType="FARGATE")
, so I'm going to assume that this now works as intended.
I'll close this, but do let us know if there are still issues with our current implementation.
@bblommers Unfortunately, it still doesn't work, I just faced the issue in 3.1.4 release.
The internal test calling run_task(launchType="FARGATE")
actually registers instance before, so simulates EC2 launch type, not the Fargate launch. If you drop client.register_container_instance
from the test, it will stop to work, as run_task
assumes EC2 run. I think I can contribute a fix for this case.
Hi @szczeles, thanks for letting us know. A PR would be very welcome - let me know if you need any help around this!