As far as I can tell the
boto3 client for
ECS does not support the ability to trim down the response document.
I think if I wanted to speed up execution I would have a separate service to query and then cache the results. I would then query the cache instead of working directly with real time data. I'm not sure if your problem can deal with slightly stale data.
My questions for you:
- How long is your
AWS Lambdaexecution time right now?
- How certain are you that waiting for the
ECSservice descriptions is the slowest part of the current implementation?
- How often does your
- If you could have instant
ECSservice descriptions, how much would you really save?
- Is this really the best cost saving problem you could be working on?
I'm naive of why you want to speed up execution times. If you want to save on cost, I personally wouldn't bother. Engineering a robust solution to speed up execution time is likely going to cost more than what your
Lambda bill will be.
If it's to speed up a long pipeline of dependent tasks, I think I would try engineering some sort of caching service instead of working directly with AWS API responses.
Leave the first remark and get the conversation going!