Socket
Socket
Sign inDemoInstall

dvs-inbox-infra

Package Overview
Dependencies
7
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

dvs-inbox-infra


Version published
Weekly downloads
0
Maintainers
1
Created
Weekly downloads
 

Readme

Source

AWS CDK Construct for DVS Inbox!

This package provides a CDK Constrcut and related TS Types for creating DVS Inbox related resources.

Setup

import { App, Stack, StackProps } from "aws-cdk-lib";
import { Construct } from "constructs";
import { InboxConstruct, InboxProps } from "@a-cloud-guru/dvs-inbox-infra";

const app = new App();

class ExampleServiceStack extends Stack {
  constructor(scope: Construct, id: string, props: StackProps = {}) {
    super(scope, id, props);

    const inboxProps: InboxProps = {
      vpcId: "vpc-12345",
      subnetIds: ["subnet-12345", "subnet-67890"],
      kafka: {
        bootstrapServers: ["kafka1-broker-staging.vnerd.com:9092"],
        topicName: "dvs.foo.v1",
        schemaRegistryHost: "http://dvs-schema-registry-stage.vnerd.com:8081",
      }
    };

    const inboxConstruct = new InboxConstruct(
      this,
      'MyFooInbox', // Prefix for this Inbox. 
      inboxProps
    );

    console.log("Created inbox resources", inboxConstruct);
  }
}

new ExampleServiceStack(app, "MyExampleServiceStack", {
  env: {
    account: "123456789012",
    region: "us-east-1",
  },
  tags: {
    "cc_service": "cloud-dvs-integration-example",
    "cc_company_usage": "acg",
    "team": "principle-engineers",
    "info:env": "dev"
  }
});

Configuration

type InboxProps = {
  vpcId: string;
  subnetIds: string[];
  kafka: {
    bootstrapServers: string[];
    schemaRegistryHost: string;
    topicName: string;
  };
};

Output

This construct generates the following CfOutput variables. Please note these names exclude the random hash that cdk normally generates. This is to make it easier for these variables to be referenced in the tools like Serverless framework.

  • ${camelCasePrefix}TargetVpcId - VPC ID of where the construct is deployed
  • ${camelCasePrefix}DynamoDBTableName - Name of the DynamoDB table
  • ${camelCasePrefix}SecurityGroupId - ID of the Security Group generated for the nested resources
  • ${camelCasePrefix}ExecutionRoleArn - ARN of the Lambda's execution Role
  • ${camelCasePrefix}ConsumerFunctionArn - ARN of the consumer Function

camelCasePrefix is basde on the prefix parameter of the construct and stage tag (ie info:env), which are formatted in camleCase. (eg. MyFooInbox & dev -> myFooInboxDev)

FAQs

Last updated on 23 May 2022

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc