INNER CODE UNIT · TypeScript
getBaseStage
amplify-education/serverless-domain-manager · src/globals.ts:67
public static getBaseStage () {
return Globals.options.stage || Globals.serverless.service.provider.stage;
}
/**
* Detects frameworks (osls v4) that removed the bundled AWS SDK v2 module and
* expose getAwsSdkV3Config() instead. On those frameworks the v2 surfaces
* (providers.aws.sdk / getCredentials()) are throwing removal stubs
* (AWS_SDK_V2_SURFACE_REMOVED), and AWS SDK v3 clients resolve endpoints and
* credentials natively.
* @param awsProvider provider to probe; defaults to the active aws provider
*/
public static hasSdkV3Config (awsProvider: any = Globals.serverless?.providers?.aws): boolean {
return typeof awsProvider?.getAwsSdkV3Config === "function";
}
public static getServiceEndpoint (service: string) {
const awsProvider = Globals.serverless.providers.aws;