Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aws-cdk/region-info

Package Overview
Dependencies
Maintainers
2
Versions
531
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-cdk/region-info

AWS region information, such as service principal names

  • 2.167.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
108K
decreased by-49.98%
Maintainers
2
Weekly downloads
 
Created

What is @aws-cdk/region-info?

@aws-cdk/region-info is an AWS CDK library that provides information about AWS regions and services. It allows developers to programmatically access details about AWS regions, such as the services available in each region, region names, and partition information.

What are @aws-cdk/region-info's main functionalities?

Get Region Information

This feature allows you to get information about a specific AWS region. In this example, it retrieves the name of the 'us-east-1' region.

const regionInfo = require('@aws-cdk/region-info');
const region = regionInfo.RegionInfo.get('us-east-1');
console.log(region.name); // Output: US East (N. Virginia)

Check if a Service is Available in a Region

This feature allows you to check if a specific AWS service is available in a given region. In this example, it checks if the S3 service is available in the 'us-east-1' region.

const regionInfo = require('@aws-cdk/region-info');
const region = regionInfo.RegionInfo.get('us-east-1');
const isAvailable = region.servicePrincipal('s3') !== undefined;
console.log(isAvailable); // Output: true

Get Partition Information

This feature allows you to get the partition information for a specific region. In this example, it retrieves the partition for the 'us-east-1' region, which is 'aws'.

const regionInfo = require('@aws-cdk/region-info');
const partition = regionInfo.RegionInfo.get('us-east-1').partition;
console.log(partition); // Output: aws

Other packages similar to @aws-cdk/region-info

Keywords

FAQs

Package last updated on 13 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc