---
title: "Mitigating the Risks of Instance Metadata in AWS EKS"
source: "https://www.tigera.io/blog/mitigating-the-risks-of-instance-metadata-in-aws-eks/"
description: "How can you remediate the AWS Instance Metadata vulnerability? The recommended workaround is to deploy Calico Network Policy."
---

[Technical Blog](https://www.tigera.io/category/technical-blog/)

# Mitigating the Risks of Instance Metadata in AWS EKS

By [John Armstrong](https://www.tigera.io/blog/author/john-armstrong/) on Sep 01, 2020 • 3 min read

Compromising a pod in a [Kubernetes](http://kubernetes.io/) cluster can have disastrous consequences on resources in an [AWS Elastic Kubernetes Service (EKS)](http://aws.amazon.com/eks/) account if access to the [Instance Metadata service](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html) is not explicitly blocked. The Instance Metadata service is an AWS API listening on a link-local IP address. Only accessible from EC2 instances, it enables the retrieval of metadata that is used to configure or manage an instance. Although you can only access instance metadata and user data from within the instance itself, the data is not protected by authentication or cryptographic methods.

## AWS Instance Metadata vulnerability

A recent blog described a scenario where an attacker compromised a pod in an EKS cluster by exploiting a vulnerability in the web application it was running, thus enabling the attacker to enumerate resources in the cluster and in the associated AWS account. This scenario was simulated by running a pod and attaching to a shell inside it.

By querying the Instance Metadata service from the compromised pod, the attacker was able to access the service and retrieve temporary credentials for the identity and access management (IAM) role assigned to the EC2 instances acting as Kubernetes worker nodes. At that point, the attacker was able to pursue multiple exploits, including mapping the network by listing and describing VPCs, subnets, and security groups *exposed across the entire AWS account!*

How can you remediate this vulnerability? The recommended workaround is to deploy [Calico Network Policy](http://docs.projectcalico.org/security/calico-network-policy), which will enable you to enforce network policy to deny egress traffic access to the Instance Metadata service.

For more details on the AWS Instance Metadata vulnerability as well as the complete workaround, [check out this blog.](http://blog.christophetd.fr/privilege-escalation-in-aws-elastic-kubernetes-service-eks-by-compromising-the-instance-role-of-worker-nodes/)

## Calico for network security

For EKS customers, Tigera offers two CNI solutions: [Calico](https://www.tigera.io/), and [Calico Enterprise](https://www.tigera.io/tigera-products/calico-commercial-editions/). Calico provides network security for hosted Kubernetes services on Amazon EKS, while Calico Enterprise builds on top of open source Calico to provide additional functionality and capabilities for Kubernetes networks on AWS and Amazon EKS.

Calico Enterprise can help you meet security and regulatory requirements with [Zero-Trust Network Security](https://www.tigera.io/tigera-products/zero-trust/), including least privilege access controls, as well as an [Intrusion Detection System (IDS)](https://www.tigera.io/tigera-products/zero-trust/) that provides multiple layers of threat defense. Plus, it integrates with your existing AWS tools including [CloudWatch](http://aws.amazon.com/cloudwatch/) and [Security Hub](http://aws.amazon.com/security-hub/?aws-security-hub-blogs.sort-by=item.additionalFields.createdDate&aws-security-hub-blogs.sort-order=desc) so you can leverage existing processes and workflows in your EKS or Kubernetes infrastructure.

————————————————-

**[Free Online Training](https://www.tigera.io/events/)**

Access Live and On-Demand Kubernetes Training

[**Calico Enterprise – Free Trial**](https://www.calicocloud.io/home)

Network Security, Monitoring, and Troubleshooting

for Microservices Running on Kubernetes

[Open Source](https://www.tigera.io/tags/open-source/)[Products](https://www.tigera.io/tags/products/)[Kubernetes Vulnerabilities](https://www.tigera.io/tags/kubernetes-vulnerabilities/)

## Related posts

[![Meet Mylo: An AI-native way to work with Calico](https://www.tigera.io/app/uploads/2026/09/Meet-Mylo-An-AI-native-way-to-work-with-Calico.png)](https://www.tigera.io/blog/meet-mylo-an-ai-native-way-to-work-with-calico/)

#### [Meet Mylo: An AI-native way to work with Calico](https://www.tigera.io/blog/meet-mylo-an-ai-native-way-to-work-with-calico/)

By [Phil DiCorpo](https://www.tigera.io/blog/author/phil-dicorpo/)
on Sep 3, 2026

A library of Calico tools and skills — delivered through the Calico MCP Server What if your hardest network question took ten minutes instead of ten days? Anyone who has operated Kubernetes networking at scale...

[Read more](https://www.tigera.io/blog/meet-mylo-an-ai-native-way-to-work-with-calico/)

[![The Safest Place to Run an AI Agent Is On a Cluster That Doesn’t Trust It](https://www.tigera.io/app/uploads/2026/08/The-Safest-Place-to-Run-an-AI-Agent-Is-On-a-Cluster-That-Doesnt-Trust-It.png)](https://www.tigera.io/blog/the-safest-place-to-run-an-ai-agent-is-on-a-cluster-that-doesnt-trust-it/)

#### [The Safest Place to Run an AI Agent Is On a Cluster That Doesn’t Trust It](https://www.tigera.io/blog/the-safest-place-to-run-an-ai-agent-is-on-a-cluster-that-doesnt-trust-it/)

By [Alister Baroi](https://www.tigera.io/blog/author/alister-baroi/)
on Aug 27, 2026

Every organization running AI agents has already made a hosting decision. Most made it by accident. The sales team switched on the agent built into their CRM. Engineering is piloting a coding agent in a...

[Read more](https://www.tigera.io/blog/the-safest-place-to-run-an-ai-agent-is-on-a-cluster-that-doesnt-trust-it/)

[![AI Red Team Agents Automate Attacks on your AI Agents. Runtime Policies Automate their Defense.](https://www.tigera.io/app/uploads/2026/08/AI-Red-Team-Agents-Automate-Attacks-on-your-AI-Agents.-Runtime-Policies-Automate-their-Defense.png)](https://www.tigera.io/blog/ai-red-team-agents-automate-attacks-on-your-ai-agents-runtime-policies-automate-their-defense/)

#### [AI Red Team Agents Automate Attacks on your AI Agents. Runtime Policies Automate their Defense.](https://www.tigera.io/blog/ai-red-team-agents-automate-attacks-on-your-ai-agents-runtime-policies-automate-their-defense/)

By [Alister Baroi](https://www.tigera.io/blog/author/alister-baroi/)
on Aug 24, 2026

The AI red teaming market grew up fast this year. OpenAI bought Promptfoo, Cisco and Microsoft shipped automated attack suites, and a seed-stage startup publicly compromised 50 of 55 live customer service bots. These platforms...

[Read more](https://www.tigera.io/blog/ai-red-team-agents-automate-attacks-on-your-ai-agents-runtime-policies-automate-their-defense/)

<!-- plugin=object-cache-pro client=phpredis metric#hits=3190 metric#misses=33 metric#hit-ratio=99.0 metric#bytes=1554620 metric#prefetches=0 metric#store-reads=174 metric#store-writes=13 metric#store-hits=168 metric#store-misses=22 metric#sql-queries=30 metric#ms-total=459.01 metric#ms-cache=32.16 metric#ms-cache-avg=0.1729 metric#ms-cache-ratio=7.0 sample#redis-hits=50701718 sample#redis-misses=14605099 sample#redis-hit-ratio=77.6 sample#redis-ops-per-sec=92 sample#redis-evicted-keys=0 sample#redis-used-memory=107306144 sample#redis-used-memory-rss=98852864 sample#redis-memory-fragmentation-ratio=0.9 sample#redis-connected-clients=1 sample#redis-tracking-clients=0 sample#redis-rejected-connections=0 sample#redis-keys=69152 -->
