Menu
Amazon Glacier
Developer Guide (API Version 2012-06-01)

Overview of Managing Access Permissions to Your Amazon Glacier Resources

Every AWS resource is owned by an AWS account, and permissions to create or access a resource are governed by permissions policies. An account administrator can attach permissions policies to IAM identities (that is, users, groups, and roles) and some services (such as Amazon Glacier) also support attaching permissions policies to resources.

Note

An account administrator (or administrator user) is a user with administrator privileges. For more information, see IAM Best Practices in the IAM User Guide.

When granting permissions, you decide who is getting the permissions, the resources they get permissions for, and the specific actions that you want to allow on those resources.

Amazon Glacier Resources and Operations

In Amazon Glacier, the primary resource is a vault. Amazon Glacier supports policies only at the vault level. That is, in an IAM policy, the Resource value that you specify can be a specific vault or a set of vaults in a specific AWS Region. Amazon Glacier doesn't support archive-level permissions.

For all Amazon Glacier actions, Resource specifies the vault on which you want to grant the permissions. These resources have unique Amazon Resource Names (ARNs) associated with them as shown in the following table, and you can use a wildcard character (*) in the ARN to match any vault name.

Resource Type ARN Format
Vaults arn:aws:glacier:region:account-id:vaults/vault-name
Vaults with names starting with "example" arn:aws:glacier:region:account-id:vaults/example*
All vaults in a region arn:aws:glacier:region:account-id:vaults/*

Amazon Glacier provides a set of operations to work with the Amazon Glacier resources. For information on the available operations, see API Reference for Amazon Glacier.

Understanding Resource Ownership

A resource owner is the AWS account that created the resource. That is, the resource owner is the AWS account of the principal entity (the root account, an IAM user, or an IAM role) that authenticates the request that creates the resource. The following examples illustrate how this works:

  • If you use the root account credentials of your AWS account to create an Amazon Glacier vault, your AWS account is the owner of the resource (in Amazon Glacier, the resource is the Amazon Glacier vault).

  • If you create an IAM user in your AWS account and grant permissions to create an Amazon Glacier vault to that user, the user can create an Amazon Glacier vault. However, your AWS account, to which the user belongs, owns the Amazon Glacier vault resource.

  • If you create an IAM role in your AWS account with permissions to create an Amazon Glacier vault, anyone who can assume the role can create an Amazon Glacier vault. Your AWS account, to which the role belongs, owns the Amazon Glacier vault resource.

Managing Access to Resources

A permissions policy describes who has access to what. The following section explains the available options for creating permissions policies.

Note

This section discusses using IAM in the context of Amazon Glacier. It doesn't provide detailed information about the IAM service. For complete IAM documentation, see What Is IAM? in the IAM User Guide. For information about IAM policy syntax and descriptions, see AWS IAM Policy Reference in the IAM User Guide.

Policies attached to an IAM identity are referred to as identity-based policies (IAM polices) and policies attached to a resource are referred to as resource-based policies. Amazon Glacier supports both identity-based (IAM policies) and resource-based policies.

Identity-Based Policies (IAM policies)

You can attach policies to IAM identities. For example you can do the following:

  • Attach a permissions policy to a user or a group in your account – An account administrator can use a permissions policy that is associated with a particular user to grant permissions for that user to create an Amazon Glacier vault.

  • Attach a permissions policy to a role (grant cross-account permissions) – You can attach an identity-based permissions policy to an IAM role to grant cross-account permissions. For example, the administrator in Account A can create a role to grant cross-account permissions to another AWS account (for example, Account B) or an AWS service as follows:

    1. Account A administrator creates an IAM role and attaches a permissions policy to the role that grants permissions on resources in Account A.

    2. Account A administrator attaches a trust policy to the role identifying Account B as the principal who can assume the role.

    3. Account B administrator can then delegate permissions to assume the role to any users in Account B. Doing this allows users in Account B to create or access resources in Account A. The principal in the trust policy can also be an AWS service principal if you want to grant an AWS service permissions to assume the role.

    For more information about using IAM to delegate permissions, see Access Management in the IAM User Guide.

The following is an example policy that grants permissions for three Amazon Glacier vault-related actions (glacier:CreateVault, glacier:DescribeVault and glacier:ListVaults) on a resource, using the Amazon Resource Name (ARN) that identifies all of the vaults in the us-west-2 AWS Region. ARNs uniquely identify AWS resources. For more information about ARNs used with Amazon Glacier, see Amazon Glacier Resources and Operations.

Copy
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "glacier:CreateVault", "glacier:DescribeVault", "glacier:ListVaults" ], "Resource": "arn:aws:glacier:us-west-2:123456789012:vaults/*" } ] }

The policy grants permissions to create, list, and obtain descriptions of vaults in the us-west-2 region. The wildcard character (*) at the end of the ARN means that this statement can match any vault name.

Important

When you grant permissions to create a vault using the glacier:CreateVault operation, you must specify a wildcard character (*) because you don't know the vault name until after you create the vault.

For more information about using identity-based policies with Amazon Glacier, see Using Identity-Based Policies for Amazon Glacier (IAM Policies). For more information about users, groups, roles, and permissions, see Identities (Users, Groups, and Roles) in the IAM User Guide.

 

Resource-Based Policies (Amazon Glacier Vault Policies)

Each Amazon Glacier vault can have resource-based permissions policies associated with it. For Amazon Glacier, a Amazon Glacier vault is the primary resource and resource-based policies are referred to as vault policies.

You use Amazon Glacier vault policies to manage permissions in the following ways:

  • Manage user permissions in your account in a single vault policy, instead of individual user policies.

  • Manage cross-account permissions as an alternative to using IAM roles.

An Amazon Glacier vault can have one vault access policy and one Vault Lock policy associated with it. An Amazon Glacier vault access policy is a resource-based policy that you can use to manage permissions to your vault. A Vault Lock policy is a vault access policy that can be locked. After you lock a Vault Lock policy, the policy cannot be changed. You can use a Vault Lock policy to enforce compliance controls.

You can use vault policies to grant permissions to all users, or you can limit access to a vault to a few AWS accounts by attaching a policy directly to a vault resource. For example, you can use an Amazon Glacier vault policy to grant read-only permissions to all AWS accounts or to grant permissions to upload archives to a few AWS accounts.

Vault policies make it easy to grant cross-account access when you need to share your vault with other AWS accounts. For example, you can grant read-only access on a vault to a business partner with a different AWS account by simply including that account and allowed actions in the vault policy. You can grant cross-account access to multiple users in this fashion and have a single location to view all users with cross-account access in the vault access policy. For an example of a vault policy for cross-account access, see Example 1: Grant Cross-Account Permissions for Specific Amazon Glacier Actions.

The following is an example of a Amazon Glacier vault policy (a resource-based policy). The example policy grants all AWS accounts permissions to perform the glacier:InitiateJob and glacier:GetJobOutput actions. This policy allows any AWS account to retrieve data from the specified vault.

Copy
{ "Version":"2012-10-17", "Statement":[ { "Sid": "add-read-only-perm", "Principal": "*", "Effect": "Allow", "Action": [ "glacier:InitiateJob", "glacier:GetJobOutput" ], "Resource": [ "arn:aws:glacier:us-west-2:123456789012:vaults/examplevault" ] } ] }

For more information about using vault policies with Amazon Glacier, see Using Resource-Based Policies for Amazon Glacier (Vault Policies). For additional information about IAM roles (identity-based policies) as opposed to resource-based policies, see How IAM Roles Differ from Resource-based Policies in the IAM User Guide.

Specifying Policy Elements: Actions, Effects, Resources, and Principals

For each type of Amazon Glacier resource, the service defines a set of API operations (see API Reference for Amazon Glacier). To grant permissions for these API operations Amazon Glacier defines a set of actions that you can specify in a policy. Note that, performing an API operation can require permissions for more than one action. When granting permissions for specific actions, you also identify the resource on which the actions are allowed or denied.

The following are the most basic policy elements:

  • Resource – In a policy, you use an Amazon Resource Name (ARN) to identify the resource to which the policy applies. For more information, see Amazon Glacier Resources and Operations.

  • Actions – You use action keywords to identify resource operations that you want to allow or deny.

    For example, the glacier:CreateVault permission allows the user permissions to perform the Amazon Glacier Create Vault operation.

  • Effect – You specify the effect when the user requests the specific action—this can be either allow or deny. If you don't explicitly grant access to (allow) a resource, access is implicitly denied. You can also explicitly deny access to a resource, which you might do to make sure that a user cannot access it, even if a different policy grants access.

  • Principal – In identity-based policies (IAM policies), the user that the policy is attached to is the implicit principal. For resource-based policies, you specify the user, account, service, or other entity that you want to receive permissions (applies to resource-based policies only).

To learn more about the IAM policy syntax, and descriptions, see AWS IAM Policy Reference in the IAM User Guide.

For a table showing all of the Amazon Glacier API actions and the resources that they apply to, see Amazon Glacier API Permissions: Actions, Resources, and Conditions Reference.

Specifying Conditions in a Policy

When you grant permissions, you can use the IAM policy language to specify the conditions when a policy should take effect. For example, you might want a policy to be applied only after a specific date. For more information about specifying conditions in a policy language, see Condition in the IAM User Guide.

AWS provides a set of predefined condition keys, called AWS-wide condition keys, for all AWS services that support IAM for access control. AWS-wide condition keys use the prefix aws. Amazon Glacier supports all AWS-wide condition keys in vault access and Vault Lock policies. For example, you can use the aws:MultiFactorAuthPresent condition key to require multi-factor authentication (MFA) when requesting an action. For more information and a list of the AWS-wide condition keys, see Available Keys for Conditions in the IAM User Guide.

Note

Condition keys are case-sensitive.

In addition, Amazon Glacier also provides its own condition keys that you can include in Condition elements in an IAM permissions policy. Amazon Glacier–specific condition keys are applicable only when granting Amazon Glacier–specific permissions. Amazon Glacier condition key names have the prefix glacier:. The following table shows the Amazon Glacier condition keys that apply to Amazon Glacier resources.

Amazon Glacier Condition Key Description Value Type
glacier:ArchiveAgeInDays Used to evaluate how long an archive has been stored in the vault, in days. Integer
glacier:ResourceTag/TagKey Allows you to use a tag in your policy. For information about resource tagging, see Managing Access Control with Tagging. String

For examples of using the Amazon Glacier–specific condition keys, see Amazon Glacier Access Control with Vault Lock Policies.

Related Topics