1개 답변
- 최신
- 최다 투표
- 가장 많은 댓글
0
Hi Drago,
You should be able to do this using AWS Systems Manager / SSM Automation. The runbook can have the following basic steps:
- Describe the Instance. (To get details of the Instance) - Use the aws:executeAwsApi action.
- Confirm the instance is managed by SSM and its connection status is "Online". - Use the aws:assertAwsResourceProperty action
- Call / Invoke the AWS-RunPowerScript Run Command document to run a PowerShell Script that Renames the Computer. You can use the Rename-Computer PowerShell cmdlet - Use the aws:runCommand action.
- Tag the instance. - Use the aws:executeAwsApi action.
- Restart the Instance. - Use the aws:changeInstanceState action.
Reference: [+] Authoring Automation runbooks - https://docs.aws.amazon.com/systems-manager/latest/userguide/automation-authoring-runbooks.html
답변함 2년 전
not sure how to start on this. I have no SSM experience. I know my ec2 instances are windows servers and have the SSM agent installed