import{Lma as p,Mma as a}from"./cli-0.5.4-f2v2k9ae.mjs";import{Xma as i}from"./cli-0.5.4-aacw1src.mjs";var u=i((V)=>{var v=p(),T=a(),_="AWS_ACCESS_KEY_ID",N="AWS_SECRET_ACCESS_KEY",S="AWS_SESSION_TOKEN",C="AWS_CREDENTIAL_EXPIRATION",A="AWS_CREDENTIAL_SCOPE",I="AWS_ACCOUNT_ID",d=(e)=>async()=>{e?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");let r=process.env[_],s=process.env[N],E=process.env[S],o=process.env[C],n=process.env[A],t=process.env[I];if(r&&s){let c={accessKeyId:r,secretAccessKey:s,...E&&{sessionToken:E},...o&&{expiration:new Date(o)},...n&&{credentialScope:n},...t&&{accountId:t}};return v.setCredentialFeature(c,"CREDENTIALS_ENV_VARS","g"),c}throw new T.CredentialsProviderError("Unable to find environment variable credentials.",{logger:e?.logger})};V.ENV_ACCOUNT_ID=I;V.ENV_CREDENTIAL_SCOPE=A;V.ENV_EXPIRATION=C;V.ENV_KEY=_;V.ENV_SECRET=N;V.ENV_SESSION=S;V.fromEnv=d});
export{u as S4};
