Closed mittster closed 2 years ago
H! Thank you for raising the issue. I checked the docs but couldn't see any sort of bulk delete operation we could use instead. However, it is currently threading with 10 threads, maybe you can try increasing the thread count manually?
I checked them too, couldn't find anything on topic. The error that I am getting is "Too many requests" so even more threads won't help. I tried with multiple accounts but apparently aws operation speed limit system is also IP based so that didn't make a noticeable difference
Since there will be no luck with batch requests, I'll explore if there is a way to make and configure aws gateway resource and method in a single operation instead of multiple calls. The web browser interface offers an option to import swagger API. Haven't found an option to export the configured gateway so far..
Hi @mittster ! Did you have any progress on this? Thanks 😄
Unfortunately no. I did manage to import the configuration but it wasn't any faster.
Hello sir, very nice module :)
I am trying to make it nicer by speeding up closing and opening of gateways. Current implementation uses:
apis = awsclient.get_rest_apis()["items"]
// to get the ids to close and, lists max 20awsclient.delete_rest_api(restApiId=api["id"])
// to actually close itWhich works fine, unless you have to close 600 gateways which easily takes half an hour and you have to recursively call
get_rest_apis()
, because it lists only 20The same problem happens with opening gateways. Opening gateways for 10 domains takes around 30s. I am attaching the relevant code from the project:
Is it possible to perform opening and closing tasks in batch?