generators/aws-containers/aws-client.js
function getDockerLogin() {
    return spinner(
        new Promise((resolve, reject) =>
            _getAuthorizationToken().then(authToken =>
                sts
                    .getCallerIdentity({})
                    .promise()
                    .then(data => {
                        const decoded = utils.decodeBase64(authToken.authorizationToken);
                        const splitResult = decoded.split(':');
                        resolve({
                            username: splitResult[0],
                            password: splitResult[1],
                            accountId: data.Account
                        });
                    })
                    .catch(() => reject(new Error("Couldn't retrieve the user informations")))
            )
        )
    );
}
function getDockerLogin() {
    return spinner(
        new Promise((resolve, reject) =>
            _getAuthorizationToken().then(authToken =>
                sts
                    .getCallerIdentity({})
                    .promise()
                    .then(data => {
                        const decoded = utils.decodeBase64(authToken.authorizationToken);
                        const splitResult = decoded.split(':');
                        resolve({
                            username: splitResult[0],
                            password: splitResult[1],
                            accountId: data.Account
                        });
                    })
                    .catch(() => reject(new Error("Couldn't retrieve the user informations")))
            )
        )
    );
}
function getDockerLogin ( ) { return spinner ( new Promise ( ( resolve , reject ) => _getAuthorizationToken ( ) . then ( authToken => sts . getCallerIdentity ( { } ) . promise ( ) . then ( data => { const decoded = utils . decodeBase64 ( authToken . authorizationToken ) ; const splitResult = decoded . split ( ':' ) ; resolve ( { username : splitResult [ 0 ] , password : splitResult [ 1 ] , accountId : data . Account } ) ; } ) . catch ( ( ) => reject ( new Error ( "Couldn't retrieve the user informations" ) ) ) ) ) ) ; }
Retrieve decoded information to authenticate to Docker with AWS credentials.
@returns {Promise} Returns a promise that resolves when the informations are retrieved.
Retrieve decoded information to authenticate to Docker with AWS credentials .