Access aws resources via boto3 APIs using Oauth authentication without using any security credentials (Access keys. )

0

I want to run a cloud formation script without access keys by utilizing oauth. Like only the username and password, after given will execute the script that creates a role with necessary permissions to scan the account(get all bucket details). How to do? Consider two accounts production and mine. I can't do anything on production account except the username, password oauth thing and creating a role. I need instructions on how to achieve this and also the cloud formation script to automate the above task if possible.

1 個回答
0

I take it you want to run the CloudFormaton template from the command-line then. You can do this with either the CLI or one of the SDKs like Boto3.

There are a number of earlier steps to carry out. Firstly, if you want to authenticate using OAUTH, you need to configure and setup the AWS IAM Identity Center OpenID Connect (OIDC) Service. This will allow the CLI (or an application that you wrote to invoke your CloudFormation Template) register with the Identity Center, and fetch an access token on sucessful authentication.

You can read how to setup this here: AWS IAM Identity Center.

To learn how to use the CLI for instance, with the Identity Center - you can read this: https://docs.aws.amazon.com/singlesignon/latest/userguide/configure-user-session.html

To work with CloudFormation using the AWS CLI is documented here: Using the AWS Command Line Interface

AWS
專家
已回答 5 個月前
profile picture
專家
已審閱 5 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南