File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,9 @@ rm -rf $RPM_BUILD_ROOT
7575/etc/udev/rules.d/60-cdrom_id.rules
7676
7777%changelog
78+ * Thu Jan 18 2024 Keith Gable <gablk@amazon.com> - 2.2.0-1
79+ - Corrected issue where an ec2-metadata error was written to stdout
80+
7881* Mon Jun 5 2023 Guillaume Delacour <delacoug@amazon.com> - 2.2.0-1
7982- Add `--quiet` option to `ec2-metadata --help` output
8083- Add `-R`/`--region` option to `ec2-metadata` to discover the EC2 instance's region
Original file line number Diff line number Diff line change 88
99function print_help()
1010{
11- echo " ec2-metadata v0.1.3
11+ echo " ec2-metadata v0.1.4
1212Use to retrieve EC2 instance metadata from within a running EC2 instance.
1313e.g. to retrieve instance id: ec2-metadata -i
1414 to retrieve ami id: ec2-metadata -a
@@ -53,7 +53,7 @@ function set_imds_token()
5353 if [ -z " ${IMDS_TOKEN} " ]; then
5454 IMDS_TOKEN=$( curl -s -f -X PUT -H " X-aws-ec2-metadata-token-ttl-seconds: 900" ${METADATA_BASEURL} /${METADATA_TOKEN_PATH} )
5555 if [ " ${?} " -gt 0 ] || [ -z " ${IMDS_TOKEN} " ]; then
56- echo ' [ERROR] Could not get IMDSv2 token. Instance Metadata might have been disabled or this is not an EC2 instance.'
56+ echo ' [ERROR] Could not get IMDSv2 token. Instance Metadata might have been disabled or this is not an EC2 instance.' >&2
5757 exit 1
5858 fi
5959 fi
You can’t perform that action at this time.
0 commit comments