我知道我可以创建一个实例的 AMI 并启动多个相同的服务器,但如果我需要对脚本进行更改,我需要逐一编辑它们或创建另一个 AMI。有没有办法让我的 ec2 实例使用主实例中的脚本或解决此问题的任何其他解决方案。
最佳答案
最近发布的 EC2 运行命令可能正是您所需要的:
Run Command is a feature that enables you to securely manage the configuration of your Amazon EC2 instances. Run Command provides a simple way of automating common administrative tasks like executing Shell scripts and commands on Linux, running PowerShell commands on Windows, installing software or patches, and more. Run Command allows you to execute these commands across multiple instances and provides visibility into the results, making it easy to manage configuration change across fleets of instances.
https://aws.amazon.com/ec2/run-command/
https://aws.amazon.com/blogs/aws/new-ec2-run-command-remote-instance-management-at-scale/
关于amazon-web-services - 让多个ec2实例执行远程脚本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34403350/