Test with new role #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Test ssh connectivity through ssm | |
name: Test SSH Connectivity | |
on: | |
push: | |
branches: | |
- DEVOPS-2881-test-ssh-connectivity-ec2 | |
workflow_dispatch: | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: arn:aws:iam::657556092833:role/Miden-GithubActionsRole | |
aws-region: eu-west-1 | |
- name: Run command on EC2 instance | |
run: | | |
aws ssm send-command \ | |
--instance-ids i-0d50212756bccc552 \ | |
--document-name "AWS-RunShellScript" \ | |
--parameters '{"commands":["ls -lrt"]}' \ | |
--output text \ | |
--query "Command.CommandId" |