Yandex Cloud
Search
Contact UsGet started
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • AI for business
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
Yandex Compute Cloud
  • Yandex Container Solution
    • Resource relationships
      • Overview
      • Metadata folders
      • Keys processed in public images
      • Transferring data to a VM instance
      • Accessing metadata
      • Identity document
    • Graphics processing units (GPUs)
    • Images
    • Dedicated host
    • Reserved instance pools
    • Encryption
    • Backups
    • Quotas and limits
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Release notes

In this article:

  • Accessing metadata from outside the VM instance
  • Accessing metadata from inside the VM instance
  1. Concepts
  2. VM instance metadata
  3. Accessing metadata

Access to VM instance metadata

Written by
Yandex Cloud
Updated at March 7, 2025
  • Accessing metadata from outside the VM instance
  • Accessing metadata from inside the VM instance

The metadata service allows you to read metadata from both outside and inside VM instances.

Accessing metadata from outside the VM instanceAccessing metadata from outside the VM instance

You can access VM instance metadata from the outside using the following Yandex Cloud tools: the management console, CLI, Terraform, and API.

This method provides access to all metadata folders as well as some keys in them:

  • In the computeMetadata folder, only the keys in /instance/attributes/* are readable.
  • The user-data folder is fully readable.

Accessing metadata from inside the VM instanceAccessing metadata from inside the VM instance

You can directly access the VM metadata from within the VM. This method provides access to all the metadata folders as well as all the keys inside them.

You can get direct access (without authentication) to metadata from inside the VM through a special metadata service. The metadata service inside the VM instance is available at http://169.254.169.254.

All authenticated VM users can access the metadata service without any restrictions. You cannot restrict an individual VM user's access to metadata.

You can test the metadata service using cURL by first connecting to the VM via the ssh protocol:

curl \
  --header Metadata-Flavor:Google \
  169.254.169.254

The metadata service will respond with a list of available metadata versions, for example:

1.0
2007-01-19
2007-03-01
...
2023-02-15
2023-05-10
latest

We recommend always using the latest metadata version.

For more information on getting metadata from inside the VM instance, see Examples of requests to the metadata service from inside the VM instance.

See alsoSee also

  • Getting VM instance metadata
  • VM metadata
  • Metadata folders
  • Keys processed in public images Yandex Cloud
  • Transferring metadata to VM instances
  • Identity document

Was the article helpful?

Previous
Transferring data to a VM instance
Next
Identity document
© 2025 Direct Cursus Technology L.L.C.