cdkdatabrewcicd

package module
v0.1.39 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

README

cdk-databrew-cicd

This construct creates a CodePipeline pipeline where users can push a DataBrew recipe into the CodeCommit repository and the recipe will be pushed to a pre-production AWS account and a production AWS account by order automatically.

License Build Release Python pip npm version pypi evrsion Maven nuget

Table of Contents

Serverless Architecture

image Romi B. and Gaurav W., 2021

Introduction

The architecture was introduced by Romi Boimer and Gaurav Wadhawan and was posted on the AWS Blog as Set up CI/CD pipelines for AWS Glue DataBrew using AWS Developer Tools. I converted the architecture into a CDK construct for 4 programming languages. Before applying the AWS construct, make sure you've set up a proper IAM role for the pre-production and production AWS accounts. You could achieve it either by creating manually or creating through a custom construct in this library.

import { IamRole } from 'cdk-databrew-cicd';

new IamRole(this, 'AccountIamRole', {
    environment: 'preproduction', // or 'production'
    accountID: 'ACCOUNT_ID',
    // roleName: 'OPTIONAL'
});

Example

Typescript

You could also refer to here.

$ cdk --init language typescript
$ yarn add cdk-databrew-cicd
import * as cdk from '@aws-cdk/core';
import { DataBrewCodePipeline } from 'cdk-databrew-cicd';

class TypescriptStack extends cdk.Stack {
  constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) {
    super(scope, id, props);

    const preproductionAccountId = 'PREPRODUCTION_ACCOUNT_ID';
    const productionAccountId = 'PRODUCTION_ACCOUNT_ID';

    const dataBrewPipeline = new DataBrewCodePipeline(this, 'DataBrewCicdPipeline', {
      preproductionIamRoleArn: `arn:${cdk.Aws.PARTITION}:iam::${preproductionAccountId}:role/preproduction-Databrew-Cicd-Role`,
      productionIamRoleArn: `arn:${cdk.Aws.PARTITION}:iam::${productionAccountId}:role/production-Databrew-Cicd-Role`,
      // bucketName: 'OPTIONAL',
      // repoName: 'OPTIONAL',
      // branchName: 'OPTIONAL',
      // pipelineName: 'OPTIONAL'
    });

    new cdk.CfnOutput(this, 'OPreproductionLambdaArn', { value: dataBrewPipeline.preproductionFunctionArn });
    new cdk.CfnOutput(this, 'OProductionLambdaArn', { value: dataBrewPipeline.productionFunctionArn });
    new cdk.CfnOutput(this, 'OCodeCommitRepoArn', { value: dataBrewPipeline.codeCommitRepoArn });
    new cdk.CfnOutput(this, 'OCodePipelineArn', { value: dataBrewPipeline.codePipelineArn });
  }
}

const app = new cdk.App();
new TypescriptStack(app, 'TypescriptStack', {
  stackName: 'DataBrew-CICD'
});

Python

You could also refer to here.

# upgrading related Python packages
$ python -m ensurepip --upgrade
$ python -m pip install --upgrade pip
$ python -m pip install --upgrade virtualenv
# initialize a CDK Python project
$ cdk init --language python
# make packages installed locally instead of globally
$ source .venv/bin/activate
$ cat <<EOL > requirements.txt
aws-cdk.core
cdk-databrew-cicd
EOL
$ python -m pip install -r requirements.txt
from aws_cdk import core as cdk
from cdk_databrew_cicd import DataBrewCodePipeline

class PythonStack(cdk.Stack):

    def __init__(self, scope: cdk.Construct, construct_id: str, **kwargs) -> None:
        super().__init__(scope, construct_id, **kwargs)

        preproduction_account_id = "PREPRODUCTION_ACCOUNT_ID"
        production_account_id = "PRODUCTION_ACCOUNT_ID"

        databrew_pipeline = DataBrewCodePipeline(self,
        "DataBrewCicdPipeline",
        preproduction_iam_role_arn=f"arn:{cdk.Aws.PARTITION}:iam::{preproduction_account_id}:role/preproduction-Databrew-Cicd-Role",
        production_iam_role_arn=f"arn:{cdk.Aws.PARTITION}:iam::{production_account_id}:role/preproduction-Databrew-Cicd-Role",
            # bucket_name="OPTIONAL",
            # repo_name="OPTIONAL",
            # repo_name="OPTIONAL",
            # branch_namne="OPTIONAL",
            # pipeline_name="OPTIONAL"
            )

        cdk.CfnOutput(self, 'OPreproductionLambdaArn', value=databrew_pipeline.preproduction_function_arn)
        cdk.CfnOutput(self, 'OProductionLambdaArn', value=databrew_pipeline.production_function_arn)
        cdk.CfnOutput(self, 'OCodeCommitRepoArn', value=databrew_pipeline.code_commit_repo_arn)
        cdk.CfnOutput(self, 'OCodePipelineArn', value=databrew_pipeline.code_pipeline_arn)
$ deactivate

Java

You could also refer to here.

$ cdk init --language java
$ mvn package
.
.
<properties>
      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
      <cdk.version>1.107.0</cdk.version>
      <constrcut.verion>0.1.4</constrcut.verion>
      <junit.version>5.7.1</junit.version>
</properties>
 .
 .
 <dependencies>
     <!-- AWS Cloud Development Kit -->
      <dependency>
            <groupId>software.amazon.awscdk</groupId>
            <artifactId>core</artifactId>
            <version>${cdk.version}</version>
      </dependency>
      <dependency>
        <groupId>io.github.hsiehshujeng</groupId>
        <artifactId>cdk-databrew-cicd</artifactId>
        <version>${constrcut.verion}</version>
        </dependency>
     .
     .
     .
 </dependencies>
package com.myorg;

import software.amazon.awscdk.core.CfnOutput;
import software.amazon.awscdk.core.CfnOutputProps;
import software.amazon.awscdk.core.Construct;
import software.amazon.awscdk.core.Stack;
import software.amazon.awscdk.core.StackProps;
import io.github.hsiehshujeng.cdk.databrew.cicd.DataBrewCodePipeline;
import io.github.hsiehshujeng.cdk.databrew.cicd.DataBrewCodePipelineProps;

public class JavaStack extends Stack {
    public JavaStack(final Construct scope, final String id) {
        this(scope, id, null);
    }

    public JavaStack(final Construct scope, final String id, final StackProps props) {
        super(scope, id, props);
        String preproductionAccountId = "PREPRODUCTION_ACCOUNT_ID";
        String productionAccountId = "PRODUCTION_ACCOUNT_ID";
        DataBrewCodePipeline databrewPipeline = new DataBrewCodePipeline(this, "DataBrewCicdPipeline",
                DataBrewCodePipelineProps.builder().preproductionIamRoleArn(preproductionAccountId)
                        .productionIamRoleArn(productionAccountId)
                        // .bucketName("OPTIONAL")
                        // .branchName("OPTIONAL")
                        // .pipelineName("OPTIONAL")
                        .build());

        new CfnOutput(this, "OPreproductionLambdaArn",
                CfnOutputProps.builder()
                    .value(databrewPipeline.getPreproductionFunctionArn())
                    .build());
        new CfnOutput(this, "OProductionLambdaArn",
                CfnOutputProps.builder()
                    .value(databrewPipeline.getProductionFunctionArn())
                    .build());
        new CfnOutput(this, "OCodeCommitRepoArn",
                CfnOutputProps.builder()
                    .value(databrewPipeline.getCodeCommitRepoArn())
                    .build());
        new CfnOutput(this, "OCodePipelineArn",
                CfnOutputProps.builder()
                    .value(databrewPipeline.getCodePipelineArn())
                    .build());
    }
}

C#

You could also refer to here.

$ cdk init --language csharp
$ dotnet add src/Csharp package Databrew.Cicd --version 0.1.4
using Amazon.CDK;
using ScottHsieh.Cdk;

namespace Csharp
{
    public class CsharpStack : Stack
    {
        internal CsharpStack(Construct scope, string id, IStackProps props = null) : base(scope, id, props)
        {
            var preproductionAccountId = "PREPRODUCTION_ACCOUNT_ID";
            var productionAccountId = "PRODUCTION_ACCOUNT_ID";

            var dataBrewPipeline = new DataBrewCodePipeline(this, "DataBrewCicdPipeline", new DataBrewCodePipelineProps
            {
                PreproductionIamRoleArn = $"arn:{Aws.PARTITION}:iam::{preproductionAccountId}:role/preproduction-Databrew-Cicd-Role",
                ProductionIamRoleArn = $"arn:{Aws.PARTITION}:iam::{productionAccountId}:role/preproduction-Databrew-Cicd-Role",
                // BucketName = "OPTIONAL",
                // RepoName = "OPTIONAL",
                // BranchName = "OPTIONAL",
                // PipelineName = "OPTIONAL"
            });
            new CfnOutput(this, "OPreproductionLambdaArn", new CfnOutputProps
            {
                Value = dataBrewPipeline.PreproductionFunctionArn
            });
            new CfnOutput(this, "OProductionLambdaArn", new CfnOutputProps
            {
                Value = dataBrewPipeline.ProductionFunctionArn
            });
            new CfnOutput(this, "OCodeCommitRepoArn", new CfnOutputProps
            {
                Value = dataBrewPipeline.CodeCommitRepoArn
            });
            new CfnOutput(this, "OCodePipelineArn", new CfnOutputProps
            {
                Value = dataBrewPipeline.CodeCommitRepoArn
            });
        }
    }
}

Some Efforts after Stack Creation

CodeCommit

  1. Create HTTPS Git credentials for AWS CodeCommit with an IAM user that you're going to use. image

  2. Run through the steps noted on the README.md of the CodeCommit repository after finishing establishing the stack via CDK. The returned message with success should be looked like the following (assume you have installed git-remote-codecommit):

    $ git clone codecommit://scott.codecommit@DataBrew-Recipes-Repo
    Cloning into 'DataBrew-Recipes-Repo'...
    remote: Counting objects: 6, done.
    Unpacking objects: 100% (6/6), 2.03 KiB | 138.00 KiB/s, done.
    
  3. Add a DataBrew recipe into the local repositroy (directory) and commit the change. (either directly on the main branch or merging another branch into the main branch)

Glue DataBrew

  1. Download any recipe either generated out by following Getting started with AWS Glue DataBrew or made by yourself as JSON file. image

  2. Move the recipe from the download directory to the local directory for the CodeCommit repository.

    $ mv ${DOWNLOAD_DIRECTORY}/chess-project-recipe.json ${CODECOMMIT_LOCAL_DIRECTORY}/
    
  3. Commit the change to a branch with a name you prefer.

    $ cd ${{CODECOMMIT_LOCAL_DIRECTORY}}
    $ git checkout -b add-recipe main
    $ git add .
    $ git commit -m "first recipe"
    $ git push --set-upstream origin add-recipe
    
  4. Merge the branch into the main branch. Just go to the AWS CodeCommit web console to do the merge as its process is purely the same as you've already done thousands of times on Github but only with different UIs.

How Successful Commits Look Like

  1. In the infrastructure account, the status of the CodePipeline DataBrew pipeline should be similar as the following: image
  2. In the pre-production account with the same region as where the CICD pipeline is deployed at the infrastructue account, you'll see this. image
  3. In the production account with the same region as where the CICD pipeline is deployed at the infrastructue account, you'll see this. image

Documentation

Overview

A construct for AWS Glue DataBrew wtih CICD

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CodePipelineIamRole_IsConstruct

func CodePipelineIamRole_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`.

func DataBrewCodePipeline_IsConstruct

func DataBrewCodePipeline_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`.

func FirstCommitHandler_IsConstruct

func FirstCommitHandler_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`.

func IamRole_IsConstruct

func IamRole_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`.

func InfraIamRole_IsConstruct

func InfraIamRole_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`.

func NewCodePipelineIamRole_Override

func NewCodePipelineIamRole_Override(c CodePipelineIamRole, scope constructs.Construct, name *string, props *CodePipelineIamRoleProps)

func NewDataBrewCodePipeline_Override

func NewDataBrewCodePipeline_Override(d DataBrewCodePipeline, scope constructs.Construct, name *string, props *DataBrewCodePipelineProps)

func NewFirstCommitHandler_Override

func NewFirstCommitHandler_Override(f FirstCommitHandler, scope constructs.Construct, name *string, props *FirstCommitHandlerProps)

func NewIamRole_Override

func NewIamRole_Override(i IamRole, scope constructs.Construct, name *string, props *IamRoleProps)

func NewInfraIamRole_Override

func NewInfraIamRole_Override(i InfraIamRole, scope constructs.Construct, name *string, props *InfraIamRoleProps)

func NewPreProductionLambda_Override

func NewPreProductionLambda_Override(p PreProductionLambda, scope constructs.Construct, name *string, props *PreProductionLambdaProps)

func NewProductionLambda_Override

func NewProductionLambda_Override(p ProductionLambda, scope constructs.Construct, name *string, props *ProductionLambdaProps)

func PreProductionLambda_IsConstruct

func PreProductionLambda_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`.

func ProductionLambda_IsConstruct

func ProductionLambda_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`.

Types

type CodePipelineIamRole

type CodePipelineIamRole interface {
	constructs.Construct
	// The tree node.
	Node() constructs.Node
	// The representative of the IAM role for the CodePipeline CICD pipeline.
	Role() awsiam.Role
	// The ARN of the IAM role for the CodePipeline CICD pipeline.
	RoleArn() *string
	// Returns a string representation of this construct.
	ToString() *string
}

func NewCodePipelineIamRole

func NewCodePipelineIamRole(scope constructs.Construct, name *string, props *CodePipelineIamRoleProps) CodePipelineIamRole

type CodePipelineIamRoleProps

type CodePipelineIamRoleProps struct {
	// The ARN of the S3 bucket where you store your artifacts.
	BucketArn *string `field:"required" json:"bucketArn" yaml:"bucketArn"`
	// The ARN of the Lambda function for the pre-production account.
	PreproductionLambdaArn *string `field:"required" json:"preproductionLambdaArn" yaml:"preproductionLambdaArn"`
	// The ARN of the Lambda function for the production account.
	ProductionLambdaArn *string `field:"required" json:"productionLambdaArn" yaml:"productionLambdaArn"`
	// The role name for the CodePipeline CICD pipeline.
	RoleName *string `field:"optional" json:"roleName" yaml:"roleName"`
}

type DataBrewCodePipeline

type DataBrewCodePipeline interface {
	constructs.Construct
	// The name of the branch that will trigger the DataBrew CICD pipeline.
	BranchName() *string
	// The ARN of the S3 bucket for the CodePipeline DataBrew CICD pipeline.
	BucketArn() *string
	// The ARN of the CodeCommit repository.
	CodeCommitRepoArn() *string
	// The ARN of the DataBrew CICD pipeline.
	CodePipelineArn() *string
	// the (required) name of the Artifact at the first stage.
	FirstStageArtifactName() *string
	// The tree node.
	Node() constructs.Node
	// The ARN of the Lambda function for the pre-production account.
	PreproductionFunctionArn() *string
	// The ARN of the Lambda function for the production account.
	ProductionFunctionArn() *string
	// The name of the CodeCommit repositroy for the DataBrew CICD pipeline.
	RepoName() *string
	// Returns a string representation of this construct.
	ToString() *string
}

func NewDataBrewCodePipeline

func NewDataBrewCodePipeline(scope constructs.Construct, name *string, props *DataBrewCodePipelineProps) DataBrewCodePipeline

type DataBrewCodePipelineProps

type DataBrewCodePipelineProps struct {
	// The ARN of the IAM role in the pre-production account.
	PreproductionIamRoleArn *string `field:"required" json:"preproductionIamRoleArn" yaml:"preproductionIamRoleArn"`
	// The ARN of the IAM role in the production account.
	ProductionIamRoleArn *string `field:"required" json:"productionIamRoleArn" yaml:"productionIamRoleArn"`
	// The name of the branch that will trigger the DataBrew CICD pipeline.
	BranchName *string `field:"optional" json:"branchName" yaml:"branchName"`
	// The name of the S3 bucket for the CodePipeline DataBrew CICD pipeline.
	BucketName *string `field:"optional" json:"bucketName" yaml:"bucketName"`
	// the (required) name of the Artifact at the first stage.
	FirstStageArtifactName *string `field:"optional" json:"firstStageArtifactName" yaml:"firstStageArtifactName"`
	// The name of the CodePipeline Databrew CICD pipeline.
	PipelineName *string `field:"optional" json:"pipelineName" yaml:"pipelineName"`
	// The name of the CodeCommit repositroy for the DataBrew CICD pipeline.
	RepoName *string `field:"optional" json:"repoName" yaml:"repoName"`
}

type FirstCommitHandler

type FirstCommitHandler interface {
	constructs.Construct
	// The representative of Lambda function which deals with first commit via AWS CodeCommit.
	Function() awslambda.IFunction
	// The name of the Lambda function which deals with first commit via AWS CodeCommit.
	FunctionName() *string
	// The tree node.
	Node() constructs.Node
	// The name of the IAM role for the Lambda function which deals with first commit via AWS CodeCommit.
	RoleName() *string
	// Returns a string representation of this construct.
	ToString() *string
}

func NewFirstCommitHandler

func NewFirstCommitHandler(scope constructs.Construct, name *string, props *FirstCommitHandlerProps) FirstCommitHandler

type FirstCommitHandlerProps

type FirstCommitHandlerProps struct {
	// The branch name used in the CodeCommit repo.
	BranchName *string `field:"required" json:"branchName" yaml:"branchName"`
	// The ARN of the CodeCommit repository.
	CodeCommitRepoArn *string `field:"required" json:"codeCommitRepoArn" yaml:"codeCommitRepoArn"`
	// The name of the CodeCommit repo.
	RepoName *string `field:"required" json:"repoName" yaml:"repoName"`
	// The name of the Lambda function which deals with first commit via AWS CodeCommit.
	FunctionName *string `field:"optional" json:"functionName" yaml:"functionName"`
	// The name of the IAM role for the Lambda function which deals with first commit via AWS CodeCommit.
	RoleName *string `field:"optional" json:"roleName" yaml:"roleName"`
}

type IamRole

type IamRole interface {
	constructs.Construct
	// The tree node.
	Node() constructs.Node
	// The ARN of the IAM role for pre-production or production.
	RoleArn() *string
	// Returns a string representation of this construct.
	ToString() *string
}

IAM Role.

Defines an IAM role for pre-production and production AWS accounts.

func NewIamRole

func NewIamRole(scope constructs.Construct, name *string, props *IamRoleProps) IamRole

type IamRoleProps

type IamRoleProps struct {
	// The ID of your infrastructure account.
	AccountID *string `field:"required" json:"accountID" yaml:"accountID"`
	// 'preproduction' or 'production'.
	Environment *string `field:"required" json:"environment" yaml:"environment"`
	// The role name.
	RoleName *string `field:"optional" json:"roleName" yaml:"roleName"`
}

type InfraIamRole

type InfraIamRole interface {
	constructs.Construct
	// The tree node.
	Node() constructs.Node
	// The ARN of the IAM role for the infrastructure account.
	RoleArn() *string
	// Returns a string representation of this construct.
	ToString() *string
}

func NewInfraIamRole

func NewInfraIamRole(scope constructs.Construct, name *string, props *InfraIamRoleProps) InfraIamRole

type InfraIamRoleProps

type InfraIamRoleProps struct {
	// The role name for the infrastructure account.
	RoleName *string `field:"optional" json:"roleName" yaml:"roleName"`
}

type PreProductionLambda

type PreProductionLambda interface {
	constructs.Construct
	// The representative of Lambda function for the pre-production account.
	Function() awslambda.IFunction
	// The Lambda funciton name for the pre-production account.
	FunctionName() *string
	// The tree node.
	Node() constructs.Node
	// The name of the IAM role for the pre-produciton Lambda function.
	RoleName() *string
	// Returns a string representation of this construct.
	ToString() *string
}

func NewPreProductionLambda

func NewPreProductionLambda(scope constructs.Construct, name *string, props *PreProductionLambdaProps) PreProductionLambda

type PreProductionLambdaProps

type PreProductionLambdaProps struct {
	// The ARN of the S3 bucket for the DataBrew CICD pipeline.
	BucketArn *string `field:"required" json:"bucketArn" yaml:"bucketArn"`
	// The ARN of the IAM role in the pre-production account.
	PreproductionIamRoleArn *string `field:"required" json:"preproductionIamRoleArn" yaml:"preproductionIamRoleArn"`
	// The Lambda funciton name for the pre-production account.
	FunctionName *string `field:"optional" json:"functionName" yaml:"functionName"`
	// The name of the IAM role for the pre-produciton Lambda function.
	RoleName *string `field:"optional" json:"roleName" yaml:"roleName"`
}

type ProductionLambda

type ProductionLambda interface {
	constructs.Construct
	// The representative of Lambda function for the production account.
	Function() awslambda.IFunction
	// The Lambda funciton name for the production account.
	FunctionName() *string
	// The tree node.
	Node() constructs.Node
	// The name of the IAM role for the produciton Lambda function.
	RoleName() *string
	// Returns a string representation of this construct.
	ToString() *string
}

func NewProductionLambda

func NewProductionLambda(scope constructs.Construct, name *string, props *ProductionLambdaProps) ProductionLambda

type ProductionLambdaProps

type ProductionLambdaProps struct {
	// The ARN of the S3 bucket for the DataBrew CICD pipeline.
	BucketArn *string `field:"required" json:"bucketArn" yaml:"bucketArn"`
	// The ARN of the IAM role in the production account.
	ProductionIamRoleArn *string `field:"required" json:"productionIamRoleArn" yaml:"productionIamRoleArn"`
	// The Lambda funciton name for the production account.
	FunctionName *string `field:"optional" json:"functionName" yaml:"functionName"`
	// The name of the IAM role for the produciton Lambda function.
	RoleName *string `field:"optional" json:"roleName" yaml:"roleName"`
}

Directories

Path Synopsis
Package jsii contains the functionaility needed for jsii packages to initialize their dependencies and themselves.
Package jsii contains the functionaility needed for jsii packages to initialize their dependencies and themselves.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL