common_functions.sh does not use IMDSv2

Open Beginner friendly
#95 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
62/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
aws, shell
Domain
cloud, devops

Research direction

Start in load-balancing/elb-v2/common_functions.sh at the linked call around line 110 and inspect how the helper scripts query instance metadata. Add the IMDSv2 token retrieval before those calls, then verify that the helper scripts work for customers who have disabled IMDSv1.

Written by the indexing model from the issue text.

Description

For customers who turn off IMDSv1 the helper scripts will fail:

https://github.com/aws-samples/aws-codedeploy-samples/blob/fe237a2c7e73152f6d00758fbe5c149a9fa34e68/load-balancing/elb-v2/common_functions.sh#L110

Consider retrieving the IMDSv2 token before making calls like the one above.

Dominant language
Shell
Stars
639
Forks
777
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from aws-samples/aws-codedeploy-samples

All issues in aws-samples/aws-codedeploy-samples

Similar issues

More Shell/Bash issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.