(aws-redshift-alpha): Fails to create cluster with logging bucket
See original GitHub issueWhat 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.
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:6 (1 by maintainers)
Top Results From Across the Web
aws-cdk/aws-redshift-alpha module
Depending on your use case, you can make the cluster publicly accessible with the publiclyAccessible property. Adding a logging bucket for database audit ......
Read more >Database audit logging - Amazon Redshift
Monitor the database for security and troubleshooting purposes, called database auditing, with Amazon Redshift logs of connections and activities.
Read more >EnableLogging - Amazon Redshift - AWS Documentation
Starts logging information, such as queries and connection attempts, for the specified Amazon Redshift cluster. Request Parameters.
Read more >Turn on audit logging in Amazon Redshift
To turn on audit logging in an Amazon Redshift provisioned cluster using the console, do the following: Open the Amazon Redshift console. In ......
Read more >Troubleshoot UNLOAD issues in Amazon Redshift
Verify that the IAM role assigned to the Amazon Redshift cluster is using the correct trust relationship. 403 Access Denied error. If you ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yes, it looks like when
logging_bucket
is specified, the prefix is also required.Specifying the logging key prefix fixed the null error: