Create a SAML identity provider in IAM - Amazon Identity and Access Management
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Create a SAML identity provider in IAM

An IAM SAML 2.0 identity provider is an entity in IAM that describes an external identity provider (IdP) service that supports the SAML 2.0 (Security Assertion Markup Language 2.0) standard. You use an IAM identity provider when you want to establish trust between a SAML-compatible IdP such as Shibboleth or Active Directory Federation Services and Amazon, so that users in your organization can access Amazon resources. IAM SAML identity providers are used as principals in an IAM trust policy.

For more information about this scenario, see SAML 2.0 federation.

You can create and manage an IAM identity provider in the Amazon Web Services Management Console or with Amazon CLI, Tools for Windows PowerShell, or Amazon API calls.

After you create a SAML provider, you must create one or more IAM roles. A role is an identity in Amazon that doesn't have its own credentials (as a user does). But in this context, a role is dynamically assigned to a federated user that is authenticated by your organization's IdP. The role permits your organization's IdP to request temporary security credentials for access to Amazon. The policies assigned to the role determine what the federated users are allowed to do in Amazon. To create a role for SAML federation, see Creating a role for a third-party Identity Provider (federation).

Finally, after you create the role, you complete the SAML trust by configuring your IdP with information about Amazon and the roles that you want your federated users to use. This is referred to as configuring relying party trust between your IdP and Amazon. To configure relying party trust, see Configure your SAML 2.0 IdP with relying party trust and adding claims.

Creating and managing an IAM SAML identity provider (console)

You can use the Amazon Web Services Management Console to create and delete IAM SAML identity providers.

To create an IAM SAML identity provider (console)
  1. Before you can create an IAM SAML identity provider, you need the SAML metadata document that you get from the IdP. This document includes the issuer's name, expiration information, and keys that can be used to validate the SAML authentication response (assertions) that are received from the IdP. To generate the metadata document, use the identity management software your organization uses as its IdP. For instructions on how to configure many of the available IdPs to work with Amazon, including how to generate the required SAML metadata document, see Integrate third-party SAML solution providers with Amazon.

    Important

    This metadata file includes the issuer name, expiration information, and keys that can be used to validate the SAML authentication response (assertions) received from the IdP. The metadata file must be encoded in UTF-8 format without a byte order mark (BOM). To remove the BOM, you can encode the file as UTF-8 using a text editing tool, such as Notepad++.

    The x.509 certificate included as part of the SAML metadata document must use a key size of at least 1024 bits. Also, the x.509 certificate must also be free of any repeated extensions. You can use extensions, but the extensions can only appear once in the certificate. If the x.509 certificate does not meet either condition, IdP creation fails and returns an "Unable to parse metadata" error.

    As defined by the SAML V2.0 Metadata Interoperability Profile Version 1.0, IAM neither evaluates nor takes action regarding the expiration of the metadata document’s X.509 certificate.

  2. Sign in to the Amazon Web Services Management Console and open the IAM console at https://console.amazonaws.cn/iam/.

  3. In the navigation pane, choose Identity providers and then choose Add provider.

  4. For Configure provider, choose SAML.

  5. Type a name for the identity provider.

  6. For Metadata document, choose Choose file, specify the SAML metadata document that you downloaded in Step 1.

  7. (Optional) For Add tags you can add key–value pairs to help you identify and organize your IdPs. You can also use tags to control access to Amazon resources. To learn more about tagging SAML identity providers, see Tagging IAM SAML identity providers.

    Choose Add tag. Enter values for each tag key-value pair.

  8. Verify the information that you have provided. When you are done, choose Add provider.

  9. Assign an IAM role to your identity provider to give external user identities managed by your identity provider permissions to access Amazon resources in your account. To learn more about creating roles for identity federation, see Creating a role for a third-party Identity Provider (federation).

    Note

    SAML IDPs used in a role trust policy must be in the same account that the role is in.

To delete a SAML provider (console)
  1. Sign in to the Amazon Web Services Management Console and open the IAM console at https://console.amazonaws.cn/iam/.

  2. In the navigation pane, choose Identity providers.

  3. Select the radio button next to the identity provider that you want to delete.

  4. Choose Delete. A new window opens.

  5. Confirm that you want to delete the provider by typing the word delete in the field. Then, choose Delete.

Creating and managing an IAM SAML Identity Provider (Amazon CLI)

You can use the Amazon CLI to create and manage SAML providers.

Before you can create an IAM identity provider, you need the SAML metadata document that you get from the IdP. This document includes the issuer's name, expiration information, and keys that can be used to validate the SAML authentication response (assertions) that are received from the IdP. To generate the metadata document, use the identity management software your organization uses as its IdP. For instructions on how to configure many of the available IdPs to work with Amazon, including how to generate the required SAML metadata document, see Integrate third-party SAML solution providers with Amazon.

Important

This metadata file includes the issuer name, expiration information, and keys that can be used to validate the SAML authentication response (assertions) received from the IdP. The metadata file must be encoded in UTF-8 format without a byte order mark (BOM). To remove the BOM, you can encode the file as UTF-8 using a text editing tool, such as Notepad++.

The x.509 certificate included as part of the SAML metadata document must use a key size of at least 1024 bits. Also, the x.509 certificate must also be free of any repeated extensions. You can use extensions, but the extensions can only appear once in the certificate. If the x.509 certificate does not meet either condition, IdP creation fails and returns an "Unable to parse metadata" error.

As defined by the SAML V2.0 Metadata Interoperability Profile Version 1.0, IAM neither evaluates nor takes action regarding the expiration of the metadata document’s X.509 certificate.

To create an IAM identity provider and upload a metadata document (Amazon CLI)
To upload a new metadata document for an IAM identity provider (Amazon CLI)
To tag an existing IAM identity provider (Amazon CLI)
To list tags for existing IAM identity provider (Amazon CLI)
To remove tags on an existing IAM identity provider (Amazon CLI)
To delete an IAM SAML identity provider (Amazon CLI)
  1. (Optional) To list information for all providers, such as the ARN, creation date, and expiration, run the following command:

  2. (Optional) To get information about a specific provider, such as the ARN, creation date, and expiration, run the following command:

  3. To delete an IAM identity provider, run the following command:

Creating and managing an IAM SAML identity provider (Amazon API)

You can use the Amazon API to create and manage SAML providers.

Before you can create an IAM identity provider, you need the SAML metadata document that you get from the IdP. This document includes the issuer's name, expiration information, and keys that can be used to validate the SAML authentication response (assertions) that are received from the IdP. To generate the metadata document, use the identity management software your organization uses as its IdP. For instructions on how to configure many of the available IdPs to work with Amazon, including how to generate the required SAML metadata document, see Integrate third-party SAML solution providers with Amazon.

Important

The metadata file must be encoded in UTF-8 format without a byte order mark (BOM). Also, the X.509 certificate that is included as part of the SAML metadata document must use a key size of at least 1024 bits. If the key size is smaller, the IdP creation fails with an "Unable to parse metadata" error. To remove the BOM, you can encode the file as UTF-8 using a text editing tool, such as Notepad++.

To create an IAM identity provider and upload a metadata document (Amazon API)
To upload a new metadata document for an IAM identity provider (Amazon API)
To tag an existing IAM identity provider (Amazon API)
To list tags for an existing IAM identity provider (Amazon API)
To remove tags on an existing IAM identity provider (Amazon API)
To delete an IAM identity provider (Amazon API)
  1. (Optional) To list information for all IdPs, such as the ARN, creation date, and expiration, call the following operation:

  2. (Optional) To get information about a specific provider, such as the ARN, creation date, and expiration, call the following operation:

  3. To delete an IdP, call the following operation: