Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

bootstrap-aws-installer: Switch to an IMDSv2-compatible URL.

Alex Vandiver12a5317b8c1c
diff --git a/tools/setup/bootstrap-aws-installer b/tools/setup/bootstrap-aws-installer
index 4b141a51a88..80eb6e10e5b 100644
--- a/tools/setup/bootstrap-aws-installer
+++ b/tools/setup/bootstrap-aws-installer
@@ -8,7 +8,7 @@
#BRANCH=
#SSH_SECRET_ID=
-if ! curl -fLs -m 5 http://169.254.169.254/latest/dynamic/instance-identity/document | grep instanceId; then
+if ! curl -fLs -m 5 -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 10" >/dev/null; then
echo "This should be run on AWS instances, not locally."
exit 1
fi