So after some time I’m finally getting a chance to return to working on my ECS scaledown. Up until now we’ve repeatedly disabled the scaling which is a bummer; we’ve also had to disable the scaling on the primary application task count because they don’t expose realistic metrics to manage that. I think if I do some research to see what others have done I’ll probably find a simple answer. Might be scedhule based scaling though which isn’t the worst thing in the world.

Anyway, on to teh questions of scaling ECS nodes themselves.

I believe I left off a bit annoyed at Lambda triggering. I had originally planned to operate against a queue which ingested the scaling messages. Thinking over the situation it’s a bit fair that isn’t the case as even a single node takes a while to setup and manage. First up is modifying the application to consume an SNS topic for messages for the initial ingestion. I think I’ll stick with the queue for delayed deliverying on actual termination.

Deploying Lambda

Right! Where I actually left of was frustrated AWS doesn’t have a simple Lambda deployment pipeline. If they require linking against specific libraries then the system should simply perform the linking for you :-/. Especially since it’s likely to break over time. If managing lambdas becomes a pain though then maybe I’ll just have a services box or ECS cluster. Enough of the rant and FUD though. Onto bigger things.

Turns out a find node_modules |grep "node$" states I don’t have any Node linked binaries within the application. Easy enough to package then.

Hmm, creating a zip from the tar type command didn’t work :-(. Sad times. StackOverflow to the rescue! It produced an artifact which is 4.8M. I wonder if that can be dropped. #over-otpimizing.

Minus some slow throughput becuase there is a cellular deadspot on the train between Martinez and Richmond, the upload went well. I appreicate there is an immediate prompt to test the code. Hmm, that failed not in the way I expected. Trying to use a newer JS language features. I suppose I should really test under Node 6.10! I’ll have to look into how nvm works at some point, see if it makes more sense the rvm. Anyway, just overriding the path for right now :-). Hopefully Node 6.11 is close enough! Doh! Didn’t fail with any errors. Okay, I’m going to grab Node 6.10 then; or maybe later as I’m now in the tunnels of BART.

To be continued.