Articles → AWS → Security Token Service (STS) In AWS
Security Token Service (STS) In AWS
Purpose
Scenario
- Provide full access to the user manually
- Use STS
How To Create Temporary Credentials Using STS?
- Create a user
- Create a role
- Change the trust relationship of the role
- Generate temporary credentials using the Use-STSRole command in PowerShell
- Execute the command to get the list of buckets
Create A User
Click to Enlarge
Create A Role
Click to Enlarge
Change The Trust Relationship Of The Role
Click to Enlarge
Click to Enlarge
Click to Enlarge
Generate Temporary Credentials Using The "Use-Stsrole" Command In Powershell
Set-AWSCredential -AccessKey <Access Key> -SecretKey <Secret Key>
$creds = (Use-STSRole -RoleArn "arn:aws:iam::462618770999:role/myrole" -RoleSessionName="TempS3Access").Credentials
Click to Enlarge
Execute The Command To Get The List Of Buckets
Get-S3Bucket -Credential $creds
Click to Enlarge