Skip to content

Use IMDSv2 token flow in instance bootstrap scripts - #74656

Open
cat5inthecradle wants to merge 1 commit into
stagingfrom
imds-token-bootstrap
Open

Use IMDSv2 token flow in instance bootstrap scripts#74656
cat5inthecradle wants to merge 1 commit into
stagingfrom
imds-token-bootstrap

Conversation

@cat5inthecradle

@cat5inthecradle cat5inthecradle commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Updates the last few tokenless instance-metadata calls (curl http://169.254.169.254/...) in our CloudFormation bootstrap scripts to the IMDSv2 session-token pattern — the same flow we already use elsewhere:

The AWS SDKs and Ohai/Chef also negotiate the token flow automatically, so this just brings the remaining hand-rolled curls in line with AWS's current recommended request pattern ahead of standardizing our instance config on IMDSv2.

No behavior change: token-authenticated requests work under either metadata-service configuration.

Testing: templates ERB-compile cleanly; exercised on the next adhoc/stack update as part of normal instance bootstrap (script failure would surface as a failed CloudFormation resource signal).

🤖 Generated with Claude Code

Update the remaining instance-metadata curl calls (frontend UserData,
AMI-builder UserData, and the Chef bootstrap script used by daemon and
console instances) to the session-token (IMDSv2) request pattern,
matching what the AWS SDKs, Ohai, and our Drone config already use.

No behavior change: token-authenticated requests work under either
metadata service configuration.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@cat5inthecradle
cat5inthecradle requested a review from a team as a code owner August 14, 2026 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant