Creates an IAM entity to describe an identity provider (IdP) that supports OpenID Connect (OIDC).
The OIDC provider that you create with this operation can be used as a principal in a
role's trust policy. Such a policy establishes a trust relationship between Amazon Web Services and
the OIDC provider.
If you are using an OIDC identity provider from Google, Facebook, or Amazon Cognito, you don't
need to create a separate IAM identity provider. These OIDC identity providers are
already built-in to Amazon Web Services and are available for your use. Instead, you can move directly
to creating new roles using your identity provider. To learn more, see Creating
a role for web identity or OpenID connect federation in the IAM
User Guide.
When you create the IAM OIDC provider, you specify the following:
The URL of the OIDC identity provider (IdP) to trust
A list of client IDs (also known as audiences) that identify the application
or applications allowed to authenticate using the OIDC provider
A list of tags that are attached to the specified IAM OIDC provider
A list of thumbprints of one or more server certificates that the IdP
uses
You get all of this information from the OIDC IdP you want to use to access
Amazon Web Services.
Amazon Web Services secures communication with some OIDC identity providers (IdPs) through our
library of trusted root certificate authorities (CAs) instead of using a certificate
thumbprint to verify your IdP server certificate. These OIDC IdPs include Auth0, GitHub,
Google, and those that use an Amazon S3 bucket to host a JSON Web Key Set (JWKS) endpoint. In
these cases, your legacy thumbprint remains in your configuration, but is no longer used
for validation.
The trust for the OIDC provider is derived from the IAM provider that this
operation creates. Therefore, it is best to limit access to the CreateOpenIDConnectProvider operation to highly privileged
users.
Example
Use a bare-bones client and the command you need to make an API call.
The request was rejected because multiple requests to change this object were submitted
simultaneously. Wait a few minutes and submit your request again.
The request was rejected because it attempted to create resources beyond the current
Amazon Web Services account limits. The error message describes the limit exceeded.
Base exception class for all service exceptions from IAM service.
Example
To create an instance profile
// The following example defines a new OIDC provider in IAM with a client ID of my-application-id and pointing at the server with a URL of https://server.example.com. constinput = { "ClientIDList": [ "my-application-id" ], "ThumbprintList": [ "3768084dfb3d2b68b7897bf5f565da8efEXAMPLE" ], "Url":"https://server.example.com" }; constcommand = newCreateOpenIDConnectProviderCommand(input); constresponse = awaitclient.send(command); /* response == { "OpenIDConnectProviderArn": "arn:aws:iam::123456789012:oidc-provider/server.example.com" } */ // example id: 4e4a6bff-cc97-4406-922e-0ab4a82cdb63
Creates an IAM entity to describe an identity provider (IdP) that supports OpenID Connect (OIDC).
The OIDC provider that you create with this operation can be used as a principal in a role's trust policy. Such a policy establishes a trust relationship between Amazon Web Services and the OIDC provider.
If you are using an OIDC identity provider from Google, Facebook, or Amazon Cognito, you don't need to create a separate IAM identity provider. These OIDC identity providers are already built-in to Amazon Web Services and are available for your use. Instead, you can move directly to creating new roles using your identity provider. To learn more, see Creating a role for web identity or OpenID connect federation in the IAM User Guide.
When you create the IAM OIDC provider, you specify the following:
The URL of the OIDC identity provider (IdP) to trust
A list of client IDs (also known as audiences) that identify the application or applications allowed to authenticate using the OIDC provider
A list of tags that are attached to the specified IAM OIDC provider
A list of thumbprints of one or more server certificates that the IdP uses
You get all of this information from the OIDC IdP you want to use to access Amazon Web Services.
Amazon Web Services secures communication with some OIDC identity providers (IdPs) through our library of trusted root certificate authorities (CAs) instead of using a certificate thumbprint to verify your IdP server certificate. These OIDC IdPs include Auth0, GitHub, Google, and those that use an Amazon S3 bucket to host a JSON Web Key Set (JWKS) endpoint. In these cases, your legacy thumbprint remains in your configuration, but is no longer used for validation.
The trust for the OIDC provider is derived from the IAM provider that this operation creates. Therefore, it is best to limit access to the CreateOpenIDConnectProvider operation to highly privileged users.
Example
Use a bare-bones client and the command you need to make an API call.
Param
CreateOpenIDConnectProviderCommandInput
Returns
CreateOpenIDConnectProviderCommandOutput
See
input
shape.response
shape.config
shape.Throws
ConcurrentModificationException (client fault)
The request was rejected because multiple requests to change this object were submitted simultaneously. Wait a few minutes and submit your request again.
Throws
EntityAlreadyExistsException (client fault)
The request was rejected because it attempted to create a resource that already exists.
Throws
InvalidInputException (client fault)
The request was rejected because an invalid or out-of-range value was supplied for an input parameter.
Throws
LimitExceededException (client fault)
The request was rejected because it attempted to create resources beyond the current Amazon Web Services account limits. The error message describes the limit exceeded.
Throws
ServiceFailureException (server fault)
The request processing has failed because of an unknown error, exception or failure.
Throws
IAMServiceException
Base exception class for all service exceptions from IAM service.
Example
To create an instance profile