Right now I am testing to see if I am able to write
touch test.txt
simply to another ec2 instance. I have looked into both ssh and ssm but I do not understand where to begin the code. Any ideas to remotely send commands?
Right now I am testing to see if I am able to write
touch test.txt
simply to another ec2 instance. I have looked into both ssh and ssm but I do not understand where to begin the code. Any ideas to remotely send commands?
If you want to send a command remotely you can make use of the AWS run command functionality of SSM.
To do this you will need to ensure that you’re both running SSM agent and have a valid IAM role setup on the remote instance. The getting started section should help that.
Finally you can call the remote instance using the send-command function. Either create your own document or use the existing ‘AWS-RunShellScript’ document.