Difference between revisions of "AWS Instance Metadata Service (IMDS)"

From wikieduonline
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 8: Line 8:
  
 
* [[Datadog AWS Integration Billing]]: If your EC2 instances are configured to require the use of Instance Metadata Service Version 2 (IMDSv2), then you must set the parameter ec2_prefer_imdsv2 to true in your Datadog agent configuration to avoid double-billing.
 
* [[Datadog AWS Integration Billing]]: If your EC2 instances are configured to require the use of Instance Metadata Service Version 2 (IMDSv2), then you must set the parameter ec2_prefer_imdsv2 to true in your Datadog agent configuration to avoid double-billing.
 +
 +
  TOKEN=`[[curl -X PUT]] "http://169.254.169.254/latest/api/token" [[-H]] "X-aws-ec2-metadata-token-ttl-seconds: 21600"` \ && [[curl -H]] "X-aws-ec2-metadata-token: $TOKEN" -v http://169.254.169.254/latest/[[user-data]]
  
 
== Related ==
 
== Related ==
Line 17: Line 19:
 
* [[Datadog]]: <code>[[DD_EC2_PREFER_IMDSV2]]</code>
 
* [[Datadog]]: <code>[[DD_EC2_PREFER_IMDSV2]]</code>
 
* [[IMDS initiate session]]
 
* [[IMDS initiate session]]
 +
* <code>[[Failed to refresh cached credentials, no EC2 IMDS role found]]</code>
  
 
== See also ==
 
== See also ==

Latest revision as of 11:04, 26 February 2024


If you use Auto Scaling groups and you need to require the use of IMDSv2 on all new instances, your Auto Scaling groups must use launch templates.

  • Datadog AWS Integration Billing: If your EC2 instances are configured to require the use of Instance Metadata Service Version 2 (IMDSv2), then you must set the parameter ec2_prefer_imdsv2 to true in your Datadog agent configuration to avoid double-billing.
 TOKEN=`curl -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 21600"` \ && curl -H "X-aws-ec2-metadata-token: $TOKEN" -v http://169.254.169.254/latest/user-data

Related[edit]

See also[edit]

Advertising: