7

I am running EC2 as self hosted runner. I have exported AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY to the EC2, and I can see that they are set with printenv command.

Reason for doing this is that I dont want to save AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY in github secret.

Is there any way I can access and use the environment variables (AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY) in my github action workflow?

shashank patel
  • 137
  • 2
  • 6
  • 1
    Please show what your current workflow yaml looks like and what you've tried – rethab Jan 27 '22 at 12:43
  • I added an official answer in this other thread with a test I made using a EC2 instance for self-hosted runner: https://stackoverflow.com/questions/71179099/self-hosted-environment-variables-not-available-to-github-actions/71212906#71212906 – GuiFalourd Feb 21 '22 at 20:56

0 Answers0