From 7574a5ca52900f0ddca5d9c67315cbd87dc2d342 Mon Sep 17 00:00:00 2001 From: Wouter Devriendt Date: Fri, 1 Nov 2024 15:31:19 -0700 Subject: [PATCH] add role to allow lambda to write to cloudwatch --- .github/workflows/run_tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_tests.yaml b/.github/workflows/run_tests.yaml index d16e1dc..aa43eee 100644 --- a/.github/workflows/run_tests.yaml +++ b/.github/workflows/run_tests.yaml @@ -63,7 +63,7 @@ jobs: # Pulled from instance metadata endpoint for EC2 # see https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-data-retrieval.html category=$1 - curl -fsSL "http://169.254.169.254/latest/meta-data/${category}" + curl -H "X-aws-ec2-metadata-token: $(curl -s -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 30")" -fsSL "http://169.254.169.254/latest/meta-data/${category}" } echo "ami-id: $(get_ec2_metadata ami-id)" echo "instance-id: $(get_ec2_metadata instance-id)"