sso provider - Amazon SDK for PHP
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).

sso provider

Aws\Credentials\CredentialProvider::sso is the single sign-on credential provider. This provider is also known as the Amazon IAM Identity Center credential provider.

use Aws\Credentials\CredentialProvider; use Aws\S3\S3Client; $credentials = CredentialProvider::sso('profile default'); $s3 = new Aws\S3\S3Client([ 'version' => 'latest', 'region' => 'us-west-2', 'credentials' => $credentials ]);

If you use a named profile, substitute the name of your profile for ‘default’ in the previous example. To learn more about setting up named profiles, see Shared config and credentials files in the Amazon SDKs and Tools Reference Guide. Alternatively, you can use the AWS_PROFILE environment variable to specify which profile's settings to use.

To understand more how the IAM Identity Center provider works, see Understand IAM Identity Center authentication in the Amazon SDKs and Tools Reference Guide.