Skip to content

Instantly share code, notes, and snippets.

@bil9000
Created January 12, 2022 03:14
Show Gist options
  • Save bil9000/21ebf790a969e26571f4de3104bdcfbe to your computer and use it in GitHub Desktop.
Save bil9000/21ebf790a969e26571f4de3104bdcfbe to your computer and use it in GitHub Desktop.
create oidc provider in boto3
import boto3
oidc_uri = "https://oidc.eks.us-west-2.amazonaws.com/id/STRING_GOES_HERE"
thumbprint = "THUMBRPRINT_GOES_HERE"
audience = "sts.amazonaws.com"
tag_key0 = "ApplicationShortName"
tag_value0 = "foo"
print(oidc_uri)
print("---")
print(thumbprint)
print("---")
print(audience)
client = boto3.client('iam')
response = client.create_open_id_connect_provider(
Url=oidc_uri,
ClientIDList=[
audience,
],
ThumbprintList=[
thumbprint,
],
Tags=[
{
'Key': tag_key0,
'Value': tag_value0
},
]
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment