File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
static/files/dynamodb-opensearch-zetl/OpenSearchPipeline Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 11TOKEN=$( curl -s -X PUT " http://169.254.169.254/latest/api/token" -H " X-aws-ec2-metadata-token-ttl-seconds: 21600" )
2- INSTANCE_ROLE=$( curl -s http://169.254.169.254/latest/meta-data/iam/security-credentials/)
2+ INSTANCE_ROLE=$( curl -s -H " X-aws-ec2-metadata-token: $TOKEN " http://169.254.169.254/latest/meta-data/iam/security-credentials/)
33RESULTS=$( curl -s -H " X-aws-ec2-metadata-token: $TOKEN " http://169.254.169.254/latest/meta-data/iam/security-credentials/${INSTANCE_ROLE} )
44
55AccessKeyId=$( echo $RESULTS | jq -r ' .AccessKeyId' )
66SecretAccessKey=$( echo $RESULTS | jq -r ' .SecretAccessKey' )
7- Region=$( curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone | sed ' s/\(.*\)[a-z]/\1/' )
7+ Region=$( curl -s -H " X-aws-ec2-metadata-token: $TOKEN " http://169.254.169.254/latest/meta-data/placement/availability-zone | sed ' s/\(.*\)[a-z]/\1/' )
88Token=$( echo $RESULTS | jq -r ' .Token' )
99Role=$( aws sts get-caller-identity | jq -r ' .Arn | sub("sts";"iam") | sub("assumed-role";"role") | sub("/i-[a-zA-Z0-9]+$";"")' )
1010
You can’t perform that action at this time.
0 commit comments