Skip to content

GetEnvironmentCredentials

Source: src/AWS/DataZone/GetEnvironmentCredentials.ts

Runtime binding for datazone:GetEnvironmentCredentials.

Fetches the short-lived AWS credentials of the bound environment’s provisioned user role. The secretAccessKey and sessionToken are Redacted — unwrap with Redacted.value only at the point of use. The domain and environment ids are injected from the binding. Provide the implementation with Effect.provide(AWS.DataZone.GetEnvironmentCredentialsHttp).

// init — bind the operation to the environment
const getEnvironmentCredentials = yield* AWS.DataZone.GetEnvironmentCredentials(environment);
// runtime
const creds = yield* getEnvironmentCredentials();
const secret = Redacted.value(creds.secretAccessKey!);