Skip to content

GetClusterSessionCredentials

Source: src/AWS/EMR/GetClusterSessionCredentials.ts

Runtime binding for elasticmapreduce:GetClusterSessionCredentials — mints temporary HTTP basic credentials for the bound cluster’s endpoints (runtime-role / fine-grained access control clusters). The returned Password is Redacted — unwrap with Redacted.value.

const getCredentials = yield* AWS.EMR.GetClusterSessionCredentials(cluster);
const { Credentials, ExpiresAt } = yield* getCredentials({
ExecutionRoleArn: runtimeRoleArn,
});
const password = Redacted.value(
Credentials!.UsernamePassword.Password! as Redacted.Redacted<string>,
);