Skip to main content

neulabs-cdk-constructs

Project description

Neulabs CDK Constructs

NPM PyPI PyPI License

The neulabs-cdk-constructs library contains CDK-based constructs and stacks to allow the creation of cloud infrastructure on AWS.

The purpose of the library is to expose modules that can facilitate the creation and maintenance of the infrastructure as code.

Inside you will find generic stacks that allow the creation of services by simply instantiating a class, or constructs that implement logic to facilitate the developer and many other aspects.

We decided to develop it in Typescript, using projen for repository management, and the JSII library to be able to compile the neulabs-cdk-constructs package into multiple languages.

Usage

Package Installation (npm):

yarn add neulabs-cdk-constructs
# or
npm install neulabs-cdk-constructs

Package Installation (python):

pip install neulabs-cdk-constructs

Examples

Stack for integration between AWS and New Relic.

File app.py

import aws_cdk as cdk

from neulabs_cdk_constructs.stacks.monitoring.newrelic import EndpointUrlLogs
from neulabs_cdk_constructs.stacks.monitoring.newrelic import EndpointUrlMetrics
from neulabs_cdk_constructs.stacks.monitoring.newrelic import NewRelicStack

app = cdk.App()

environment = cdk.Environment(
    account=os.getenv('CDK_DEFAULT_ACCOUNT'),
    region=os.getenv('CDK_DEFAULT_REGION'),
)

stage = os.getenv('ENVIRONMENT', 'develop')
new_relic_account_id = os.getenv('NEW_RELIC_ACCOUNT_ID')
new_relic_license_key = os.getenv('NEW_RELIC_LICENSE_KEY')

new_relic_stack = NewRelicStack(
    app,
    'NewRelicStack',
    env=environment,
    stage=stage,
    new_relic_bucket_name=f'neulabs-newrelic-{stage}',
    new_relic_account_id=new_relic_account_id,
    new_relic_license_key=new_relic_license_key,
    new_relic_api_url_metrics=EndpointUrlMetrics.EU_METRICS,
    new_relic_api_url_logs=EndpointUrlLogs.EU_LOGS,
)

Contributors

License

See the LICENSE file for more information.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

neulabs-cdk-constructs-0.2.3.tar.gz (373.3 kB view hashes)

Uploaded Source

Built Distribution

neulabs_cdk_constructs-0.2.3-py3-none-any.whl (376.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page