-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(redshift): add initial L2 Redshift construct #5730
Conversation
- adds documentation
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for the contribution @bweigel ! I don't have time for a full review at this exact moment, but one thing stood out for me.
Pull request has been modified.
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
@skinny85 I think I am done for now and will wait back for some feedback. One thing I need to mention is that I could not achieve a high enough coverage for the automatically generated So for now I have lowered the coverage requirements for this file. |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
This probably means your current proposal does not cover the entire surface area of Redshift (which is roughly what |
Any update here? 😬 |
I haven't forgotten you, just been super swamped. I will try my best to get to the review this week! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great @bweigel ! First batch of comments (second should be coming soon, but GitHub is a little flaky, and I don't want to lose the comments I've already written).
* | ||
* @default - A role is automatically created for you | ||
*/ | ||
readonly iamRoles?: IRole[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- What's the meaning of passing multiple roles here? I'm genuinely asking (I've only ever seen a single role passed to resources that need it).
- We usually skip the service name prefix. So this should just be
roles
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- What's the meaning of passing multiple roles here? I'm genuinely asking (I've only ever seen a single role passed to resources that need it).
I thought it would model the way how Redshift does roles (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-redshift-cluster.html#cfn-redshift-cluster-iamroles). You can add up to 10 roles and use them when doing queries.
The alternative would be some kind of method that allows you to attach additional roles.
What is your take on that?
Thinking about your question it could also be reasonable to just @default
to no role at all. However I think it be a nicer dev experience if one was provided from the start. 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I don't understand how Redshift works. Can you explain:
- What does it mean to have more than one role associated with a cluster?
- What doe it mean to have 0 roles associated with the cluster?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Roles are a means for Redshift to access other AWS services (like S3, Glue or DynamoDB) when using the UNLOAD
or COPY
commands (https://docs.aws.amazon.com/redshift/latest/mgmt/authorizing-redshift-service.html). During UNLOAD
or COPY
you can pass an IAM role associated with the cluster for authorization like this:
copy catdemo
from 's3://awssampledbuswest2/tickit/category_pipe.txt'
iam_role 'arn:aws:iam::<aws-account-id>:role/<role-name>'
region 'us-west-2';
from https://docs.aws.amazon.com/redshift/latest/dg/r_COPY.html
- You could have two roles attached to the cluster. One allowing access to S3, one allowing access to DynamoDB for example.
- Redshift cannot access other AWS services
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Second batch of comments :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your patience @bweigel !
I still don't see a reason we should have family
on ClusterParameterGroupProps
if there is a single value allowed there... but I won't hold the PR any longer, as it's really great otherwise, and you've shown a lot of perseverance already 🙂. I'll just remove it as a follow-up ;).
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
@bweigel can you rebase / merge with latest master? The way to handle Jest changed in the meantime (we no longer use aws-cdk/packages/@aws-cdk/assert/jest.config.js Lines 6 to 7 in 0567a23
Right now, the build is failing with:
Maybe add one more test to get that coverage through that (tiny) hump...? Also, while you're at it, please please remove the |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
I did all of the changes I mentioned in #5730 (comment) , but now our PR build is broken 😭. |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
I lost track of this for a while. |
No worries, thank you for the contribution 🙂 |
Initial commit to support Redshift as an L2 construct. This introduces the
RedshiftCluster
construct. It is by and large copy-pasted from@aws-cdk/aws-rds
and adheres to the same functionality.Purposeful Design Desicions
AWS::Redshift::ClusterSecurityGroup
orAWS::Redshift::ClusterSecurityGroupIngress
)Checklist
This PR closes #5711
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license