0

Currently working on an environment requirement where we are to push the same file out to multiple EC2 instances running Windows on a scheduled interval. As it stands now, I see a few options and have tried each:

Windows Task Manager: run a basic task on a set schedule invoking the S3 Sync CLI tool

Cons I can see here include: setting up the task on each EC2 instance (there are many).

Lambda: scheduled lambda job that utilizes SSM to run commands on each server in a resource group

Cons: introducing another layer required to execute this task.

Run Command: using an AWS-RunRemoteScript document, run the script (stored in S3) bucket on target instances.

Cons: I'm not positive you can automate these commands on a schedule without adding another layer.

What is the most scalable path forward? Thanks in advance for your help.

4

1 回答 1

3

使用 AWS Systems Manager 的 Run Command 功能与 AWS Systems Manager 的维护时段功能或使用 CloudWatch Events 来安排 Run Command 的执行在这里应该很有用。

如果您还适当地标记了实例,则可以使用 Run Command 的标记定位功能来确保所有实例都运行该命令(包括将来启动的新实例,只要它们被标记)。

/垫子

于 2019-10-17T03:01:50.697 回答