src/Credentials/CredentialProvider.php
public static function env()
    {
        return function () {
            // Use credentials from environment variables, if available
            $key = getenv(self::ENV_KEY);
            $secret = getenv(self::ENV_SECRET);
            if ($key && $secret) {
                return Promise\promise_for(
                    new Credentials($key, $secret, getenv(self::ENV_SESSION) ?: NULL)
                );
            }

            return self::reject('Could not find environment variable '
                . 'credentials in ' . self::ENV_KEY . '/' . self::ENV_SECRET);
        };
    }
public static function env()
    {
        return function () {
            // Use credentials from environment variables, if available
            $key = getenv(self::ENV_KEY);
            $secret = getenv(self::ENV_SECRET);
            if ($key && $secret) {
                return Promise\promise_for(
                    new Credentials($key, $secret, getenv(self::ENV_SESSION) ?: NULL)
                );
            }

            return self::reject('Could not find environment variable '
                . 'credentials in ' . self::ENV_KEY . '/' . self::ENV_SECRET);
        };
    }
public static function env ( ) { return function ( ) { // Use credentials from environment variables, if available $ key = getenv ( self :: ENV_KEY ) ; $ secret = getenv ( self :: ENV_SECRET ) ; if ( $ key && $ secret ) { return Promise \ promise_for ( new Credentials ( $ key , $ secret , getenv ( self :: ENV_SESSION ) ? : NULL ) ) ; } return self :: reject ( 'Could not find environment variable ' . 'credentials in ' . self :: ENV_KEY . '/' . self :: ENV_SECRET ) ; } ; }
Provider that creates credentials from environment variables
AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_SESSION_TOKEN.

@return callable
Provider that creates credentials from environment variables AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY and AWS_SESSION_TOKEN .