By using AWS re:Post, you agree to the Terms of Use

Can a SG be deployed using SSM/PS to all Ec2 instances?


Can an existing SG be deployed using SSM Powershell to all EC2 instances? If it is possible, then would like to then remove the same group after done using it. I found little information on how to accomplish this.

2 Answers

Take a look at this: Invoking other AWS services from a Systems Manager Automation runbook.

Instead of running a script, you have SSM run the modify-instance-attribute API call against a set of instances.

profile picture
answered 7 months ago
  • Thank you for the answer, kentrad.

    AWS-User-8719565, let us know if this answers your question. If this solved your issue, please remember to click on the "Accept" button to let the community know that your question is resolved. This helps everyone. Thank you in advance.

Accepted Answer

Thank you for your answer. I am really new to AWS, so it will take some time to figure out how to do it. Thanks again for your response Kentrad. It puts me in the right direction.

answered 7 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions