aws-has-region
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

AWS has region

Check wether or not the aws-sdk has a configured region, without loading any clients into memory.

Installation

npm install --save aws-has-region

Usage

import awsHasRegion, { errorText } from 'aws-has-region'

if (!(await awsHasRegion())) {
  console.error(errorText)
  process.exit(1)
}

// ...

API

awsHasRegion()

  • returns Promise<boolean>

Returns true if the AWS SDK region config is set, otherwise false.

errorText

  • type: string

A error message that can be printed if the region is not set.

Readme

Keywords

none

Package Sidebar

Install

npm i aws-has-region

Weekly Downloads

15

Version

2.0.1

License

MIT

Unpacked Size

2.78 kB

Total Files

6

Last publish

Collaborators

  • linusu