Deploy to AWS EC2 via GitHub Actions Using SSM Instead of SSH Keys
A developer has published an open-source GitHub Action, ankurk91/aws-ssm-run-command-action, that enables EC2 deployments without exposing port 22 or storing long-lived SSH keys in repository secrets. The solution leverages AWS Systems Manager Run Command, which works through an outbound connection from the SSM Agent on the instance, requiring no inbound ports or public IP address. Authentication is handled via short-lived IAM credentials through OIDC, and all commands are automatically logged in CloudTrail and SSM command history. A private S3 bucket is used to store full command output, bypassing SSM's roughly 24 KB inline output limit that caused truncated logs in earlier tools. The author noted that existing marketplace actions either failed to check command success, swallowed remote exit codes, or had been abandoned, prompting the creation of this new action.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in