UNPKG

@aws/cloudfront-hosting-toolkit

Version:

CloudFront Hosting Toolkit offers the convenience of a managed frontend hosting service while retaining full control over the hosting and deployment infrastructure to make it your own.

9 lines (8 loc) 336 B
import { TokenProviderError } from "@smithy/property-provider"; export const fromStatic = ({ token, logger }) => async () => { logger?.debug("@aws-sdk/token-providers - fromStatic"); if (!token || !token.token) { throw new TokenProviderError(`Please pass a valid token to fromStatic`, false); } return token; };