1.1.11 • Published 2 months ago

@sylvesterllc/aws-constructs v1.1.11

Weekly downloads
-
License
ISC
Repository
github
Last release
2 months ago

Bishop CDK Construct Library

Bishop Constructs

Bishop Constructs is a construct library for creating new AWS Infrastructure in a standardize reusable manner.

Publish package to GitHub Packages

Available Constructors

And more...

Installation

  1. Install the npm package:

    npm install @davissylvester/bishop-cdk-constructs --save

    • ensure you have a .npmrc that uses the @sylvesterllc npm registry

Microservice Construct

The Microservice construct provides and easy way to get started with a basic Microservice.

Infrastructure

- API Gateway (Rest API)
- Lambda 
- Dynamodb
- Lambda Authorizer 
  - TokenAuthorizer

Access

All lambdas are created with Read/Write Access to DynamoDB tables

Usage

import { MicroService, MicroserviceProps } from '@davissylvester/bishop-cdk-constructs';

new MicroService(this, 'microservice-test', microServiceProps);

MicroserviceProps

const microServiceProps: MicroserviceProps = {
     GLOBALS: {
         name: `sample-test-app`,
         environments: "dev",
         stackRuntime: Runtime.NODEJS_18_X,          
     },
     API: {
         Name: `sample-test-app`,
         Description: 'This is my new API'
     },
     RESOURCES: {
         AUTHORIZER: {
           name: `jwt-authorizer`,
           codePath: './lambda-functions/authorizer/index.ts',
           handler: 'handler',
           apiPathRoot: '',
           route: '',
       }, 
         LAMBDA: [
             {
                 name: `hello-world`,
                 codePath: './lambda-functions/hello-world/index.ts',
                 handler: 'main',
                 method: 'get',
                 apiPathRoot: 'hello-world',
                 route: '/hello-world'
             },
             {
                 name: `hellow-world2`,
                 codePath: './lambda-functions/hello-world/index.ts',
                 handler: 'main',
                 method: 'get',
                 apiPathRoot: '/hello-world/2',
                 route: '/hello-world/2'
             },
             {
               name: `hello-world3`,
               codePath: './lambda-functions/hello-world/index.ts',
               handler: 'main',
               method: 'get',
               apiPathRoot: '/hello-world/2',
               route: '/hello-world/2/{id}',
               secure: true
           },
         ],
         DYNAMO: {
             TABLES: [
                 {
                     tableName: `sample-audit-history`,
                     primaryKey: {
                         name: 'id',
                         type: AttributeType.STRING,
                     },
                     billingMode: BillingMode.PAY_PER_REQUEST,
                     indexes: [
                         {
                             indexName: 'createdTS',
                             partitionKey: {
                                 name: 'createdTS',
                                 type: AttributeType.NUMBER
                             },
                             projectionType: ProjectionType.ALL
                         },
                         {
                             indexName: 'username',
                             partitionKey: {
                                 name: 'username',
                                 type: AttributeType.STRING
                             },
                             projectionType: ProjectionType.ALL
                         },
                     ]
                 },
             ],
         },
 
     }
 }; 

Best Practice

When using this library it is a good practice to start with a new CDK project

  • npm install -g typescript aws-cdk
  • mkdir my-new-project
  • cd my-new-project
  • cdk init app --language typescript
  • npm i @davissylvester/bishop-cdk-constructs
  • mkdir lambda-functions (holds all your lambda code)

Demo Project

  • Clone the repository
    • git clone https://github.com/davissylvester/bishop-cdk-constructs-demo.git
    • npm i
    • cdk bootstrap
    • cdk deploy

Release Version : 1.0.28

1.1.11

2 months ago

1.1.10

8 months ago

1.1.9

8 months ago

1.1.8

9 months ago

1.1.6

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.107

1 year ago

1.0.109

1 year ago

1.0.108

1 year ago

1.0.120

1 year ago

1.0.110

1 year ago

1.0.112

1 year ago

1.0.111

1 year ago

1.0.118

1 year ago

1.0.117

1 year ago

1.0.119

1 year ago

1.0.114

1 year ago

1.0.113

1 year ago

1.0.116

1 year ago

1.0.115

1 year ago

1.0.101

1 year ago

1.0.100

1 year ago

1.0.106

1 year ago

1.0.103

1 year ago

1.0.102

1 year ago

1.0.105

1 year ago

1.0.104

1 year ago

1.0.99

1 year ago

1.0.98

1 year ago

1.0.95

1 year ago

1.0.97

1 year ago

1.0.94

1 year ago

1.0.93

1 year ago

1.0.92

1 year ago

1.0.91

1 year ago

1.0.90

1 year ago

1.0.66

2 years ago

1.0.65

2 years ago

1.0.64

2 years ago

1.0.63

2 years ago

1.0.69

2 years ago

1.0.68

2 years ago

1.0.67

2 years ago

1.0.29

2 years ago

1.0.73

2 years ago

1.0.72

2 years ago

1.0.71

2 years ago

1.0.70

2 years ago

1.0.77

2 years ago

1.0.76

2 years ago

1.0.32

2 years ago

1.0.75

2 years ago

1.0.31

2 years ago

1.0.74

2 years ago

1.0.30

2 years ago

1.0.37

2 years ago

1.0.36

2 years ago

1.0.35

2 years ago

1.0.78

2 years ago

1.0.34

2 years ago

1.0.39

2 years ago

1.0.38

2 years ago

1.0.80

2 years ago

1.0.84

2 years ago

1.0.40

2 years ago

1.0.83

2 years ago

1.0.82

2 years ago

1.0.81

2 years ago

1.0.44

2 years ago

1.0.87

2 years ago

1.0.43

2 years ago

1.0.86

2 years ago

1.0.42

2 years ago

1.0.85

2 years ago

1.0.41

2 years ago

1.0.48

2 years ago

1.0.47

2 years ago

1.0.46

2 years ago

1.0.45

2 years ago

1.0.49

2 years ago

1.0.51

2 years ago

1.0.50

2 years ago

1.0.55

2 years ago

1.0.54

2 years ago

1.0.53

2 years ago

1.0.52

2 years ago

1.0.57

2 years ago

1.0.56

2 years ago

1.0.19

2 years ago

1.0.18

2 years ago

1.0.17

2 years ago

1.0.16

2 years ago

1.0.22

2 years ago

1.0.21

2 years ago

1.0.20

2 years ago

1.0.26

2 years ago

1.0.25

2 years ago

1.0.24

2 years ago

1.0.23

2 years ago

1.0.28

2 years ago

1.0.27

2 years ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago