Microsoft powershell is now available (alpha state ?) for use on linux machines. On the Windows Power Shell Blog installation for Ubuntu 14.04 and 16.04 as well as CentOS are described. The question was how PowerShell installs on an Amazon EC2 instance with Amazon linux as operating system.
It turned out that the description given by Microsoft for CentOs can be used for Amazon linux:
# Enter superuser modesudo su# Register the Microsoft RedHat repositorycurl https://packages.microsoft.com/config/rhel/7/prod.repo > /etc/yum.repos.d/microsoft.repo# Exit superuser modeexit# Install PowerShellsudo yum install -y powershell# Start PowerShell