Bad Gateway Error- Power Automate SFTP AWS S3 Buckets

If you are trying to using Power Automate and following "I Am Lu" s Tutorial and you get a Bad Gateway error in your power automate. The Key was not made correctly. I am not sure if it is because I am on a Mac and Lu is on a Windows but if you want the flow to connect to AWS then run the below command in your terminal to get the correct SSH Key.

ssh-keygen -m PEM

The key should start with:

-----BEGIN RSA PRIVATE KEY-----

 

not 

 

-----BEGIN OPENSSH PRIVATE KEY-----

 

Thank Lu for the awesome tutorial https://www.youtube.com/watch?v=VW6gqVsvOeQ to get the flow to work. :)