From AWS System Manager Document to Linux EC2 PowerShell Script
Let me start from what I'm trying to accomplished. Basically, I need to map partitions in Linux with EBS volumes. I first tried "df" command which works great. Through the following article, I found a way to retrieve corresponding volumes attached to the EC2 instance. https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-windows-volumes.html Next, it is just a matter to marry both of them and output them as json. After many web searches and pages, I decided to install PowerShell Core to utilize its ConvertTo-Json function. All went great and I would like to create a new AWS System Manager Command Document so I can fire up an api call to execute the script. I first tried AWS System Manager's RunPowerShellScript document which claims to be able to execute PowerShell script on Linux. However, it somehow failed. I checked the requirements, update SSM Agent to no avail. Eventually, we submitted support ticket and waiting for the reply. While waiting fo...