Skip to content

(aws-redshift-alpha): Fails to create cluster with logging bucket #19514

@RajivKurien

Description

@RajivKurien

What is the problem?

CloudFormation fails to create the Redshift stack, with logging bucket specified as per the documentation.

The error seen on CloudFormation is:

Resource handler returned message: "null" (HandlerErrorcode: InternalFailure)

Reproduction Steps

from aws_cdk import (
    Stack,
    aws_redshift_alpha as redshift_alpha,
    aws_ec2 as ec2,
    aws_s3 as s3,
    aws_iam as iam,
)
from constructs import Construct


class RedshiftStack(Stack):

    def __init__(self, scope: Construct, id: str, **kwargs):
        super().__init__(scope, id, **kwargs)

        self.vpc = ec2.Vpc(
            scope,
            "Vpc",
            subnet_configuration=[ec2.SubnetConfiguration(
                name="private_isolated",
                subnet_type=ec2.SubnetType.PRIVATE_ISOLATED,
            )],
            nat_gateways=None,
            nat_gateway_subnets=None,
            nat_gateway_provider=None,
            )

        self.vpc.add_gateway_endpoint(id="S3",service=ec2.GatewayVpcEndpointAwsService.S3)

        redshift_role = iam.Role(
            self, 'Redshift_Role',
            assumed_by=iam.ServicePrincipal("redshift.amazonaws.com"),
        )

        logging_bucket = s3.Bucket(self, "Redshift-Logs")

        logging_bucket.grant_read_write(redshift_role)

        cluster = redshift_alpha.Cluster(
            self, "Redshift",
            master_user=redshift_alpha.Login(master_username="admin"),
            vpc=self.vpc,
            logging_bucket=logging_bucket,
            roles=[redshift_role],  
            vpc_subnets=ec2.SubnetSelection(
                subnet_type=ec2.SubnetType.PRIVATE_ISOLATED)
        )

What did you expect to happen?

A Redshift cluster created, with logs sent to the specified logging bucket.

What actually happened?

The error seen on CloudFormation is:

Resource handler returned message: "null" (HandlerErrorcode: InternalFailure)

CDK CLI Version

2.17.0

Framework Version

No response

Node.js Version

16.14.0

OS

Mac

Language

Python

Language Version

3.10.2

Other information

Alpha version:
aws-cdk.aws-redshift-alpha 2.17.0a0

When the cluster is created, with logging_bucket details omitted, the cluster is successfully created. By default no logs are sent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-redshiftRelated to Amazon RedshiftbugThis issue is a bug.effort/smallSmall work item – less than a day of effortgood first issueRelated to contributions. See CONTRIBUTING.mdp2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions