-
Notifications
You must be signed in to change notification settings - Fork 154
Description
The bug
when running the standalone_ubuntu_oss_install.sh on an ec2 instance the check fail and requires a
AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY despite running on an ec2 with the proper Role
To Reproduce
Steps to reproduce the behavior:
- clone to an ec2 instance
- run standalone_ubuntu_oss_install.sh
- See error
Expected behavior
the script needs to pass the ec2 test.
Your environment
- Version of the repo - master
- S3 backend implementation you are using -AWS
- Deploying stand-alone using the script
- NGINX OSS
- Authentication method-IAM
Additional context
I think it is since the check curl --output /dev/null --silent --head --fail --connect-timeout 2 "http://169.254.169.254"
refers to IMDSv1 and it needs to change to IMDSv2, i used the following:
TOKEN=
curl --silent --fail --connect-timeout 2 -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 21600" \ && curl --output /dev/null --silent --head --fail --connect-timeout 2 -H "X-aws-ec2-metadata-token: $TOKEN" -v http://169.254.169.254/latest/meta-data/