I have a service running in AWS Fargate and from time to time I have to run maintenance scripts, create users in a batch, fix data that doesn't have interfaces yet.<p>What I do right now is to create a new container with an special command that runs an script, but is more common that something is just wrong, and all the process from test, update, test again could take solid 20min.<p>I'm always thinking if it's a good idea to start an ssh server and open a session where I can run the commands in a shell and test faster.<p>How do you solve a problem like this? This are what I'm thinking as solutions but feels like a security risk, but I can't see any other options.<p>1. Embed an interactive shell directly in the application.
2. Have an ssh server session open, to connect when needed.<p>Any ideas?
If you are already using AWS perhaps you can take a look at AWS Lambda, that enable you to run one-off batch jobs without having to containerize any application.