

# IAM policy examples for AWS Context

This section outlines example IAM identity-based policies for common AWS Context roles. By default, an IAM user or role has no permissions to work with AWS Context. An administrator grants access by attaching IAM policies that allow specific actions on specific resources. For how AWS Context fits into identity and access management overall, including the identity setups it supports and how it propagates identity at retrieval time, see [Configure identity](configure-identity.md) and [Governing access](governing-access.md).

Follow the principle of least privilege: grant only the permissions a role needs. When a role configures a connection that pushes data into AWS Context, it also needs permission to pass the connection’s ingestion role (`iam:PassRole`) to the service. To learn how to create an identity-based policy, see [Creating IAM policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_create.html) in the *IAM User Guide*.

**Topics**
+ [Administrator policy](#security-iam-admin-policy)
+ [Ontology owner policy](#security-iam-ontology-owner-policy)
+ [Consumer policy](#security-iam-consumer-policy)
+ [Cross-account policy](#security-iam-cross-account-policy)

## Administrator policy
<a name="security-iam-admin-policy"></a>

An administrator policy grants full access to create and manage AWS Context resources, including Agent Contexts, connections, ontologies, and curation policies, so that an administrator can set up and operate the service.

## Ontology owner policy
<a name="security-iam-ontology-owner-policy"></a>

An ontology owner policy grants the permissions to create, publish, and maintain ontologies and to curate the resulting context, without granting broader service administration such as managing connections or deleting Agent Contexts.

## Consumer policy
<a name="security-iam-consumer-policy"></a>

A consumer policy grants an agent or application read-only retrieval access to search, traverse, and retrieve from an Agent Context at runtime, without the ability to modify the Agent Context or its configuration.

## Cross-account policy
<a name="security-iam-cross-account-policy"></a>

A cross-account policy grants a principal in one AWS account access to AWS Context resources owned by another account, for example when a central team owns a data catalog or an Agent Context that application teams in separate accounts consume. For the cross-account AWS Glue Data Catalog sharing workflow, see [Connecting data sources](connecting-data-sources.md).