When there are no instances running, each task has a status of `No invocations to execute.` The problem is that each task only runs on instances that are already running when the maintenance window starts, which would seem to make the `AWS-StartEC2Instance` automation kind of pointless. Priority 30: `AUTOMATION` task using the `AWS-StopEC2Instance` documentĪll three tasks specify the resource group as the target, and `` as the `InstanceId` parameter. Priority 20: `RUN_COMMAND` task using the `AWS-RunShellScript` document Priority 10: `AUTOMATION` task using the `AWS-StartEC2Instance` document I thought I had managed it, by creating a maintenance window with three tasks: When the weekly maintenance window rolls around, I would like SSM to start the instances, run the shell script on them, and then stop them. There is no reliable time when I know for sure that they would all be running. (Similar to a Cloud9 IDE environment, but not managed by Cloud9.) The maintenance window is scheduled for a time when they would all be stopped. They start automatically when their users need to interact with them, and stop automatically when idle for 30 minutes. I have a small resource group (5 instances), and there's a weekly script I would like to run on all 5 of them. "Resource": "arn:aws:states:::dynamodb:putItem", "Comment": "A description of my state machine", I should also add what I've done works, but just isn't pretty.īasically I set a variable using the pass functions with two different outputs based on a choice, what it feels like I should be able to do is something LIKE There's one piece of it which just feels a bit ugly to me, I've created this example but let me be clear that this is a "fake" example so explaining better ways of doing it via the API or whatever doesn't help much, I just want to achieve what I'm showing below but ideally in a neater way. I'm pretty new to Step Machines, I've created a relatively complex machine - which works quite well and is hooked up to API gateway.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |