ec2-github-runner icon indicating copy to clipboard operation
ec2-github-runner copied to clipboard

Instance role when added not working

Open maheshevizio opened this issue 2 years ago • 3 comments

I have added the additional permissions in the role as documented but it keeps throwing this error

Run machulav/ec2-github-runner@v2 (https://github.com/ad-tech/pocs/actions/runs/4020315401/jobs/6908102164#step:4:23) GitHub Registration Token is received 23 Error: AWS EC2 instance starting error 24 Error: InvalidParameterValue: Value (GithubActionRunner) for parameter iamInstanceProfile.name is invalid. Invalid IAM Instance Profile name 25 Error: Value (GithubActionRunner) for parameter iamInstanceProfile.name is invalid. Invalid IAM Instance Profile name

maheshevizio avatar Jan 27 '23 00:01 maheshevizio

The runner creation works without instance-role

maheshevizio avatar Jan 27 '23 00:01 maheshevizio

It seems like it is actually expecting an InstanceProfile, not a role. You can use the CLI to create an InstanceProfile for a given role. Then in your start job, use the instance profile name (not the ARN) and it should work!

rernst76 avatar Mar 23 '23 03:03 rernst76