Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions packages/@aws-cdk/aws-redshift-alpha/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,22 @@ A default database named `default_db` will be created in the cluster. To change
By default, the cluster will not be publicly accessible.
Depending on your use case, you can make the cluster publicly accessible with the `publiclyAccessible` property.

By default, the node type is `RA3_LARGE`. You can specify a different node type by setting the `nodeType` property.

```ts
import * as ec2 from 'aws-cdk-lib/aws-ec2';

declare const vpc: ec2.IVpc;

const cluster = new Cluster(this, 'Redshift', {
masterUser: {
masterUsername: 'admin',
},
vpc,
nodeType: NodeType.RA3_XLPLUS,
});
```

## Adding a logging bucket for database audit logging to S3

Amazon Redshift logs information about connections and user activities in your database. These logs help you to monitor the database for security and troubleshooting purposes, a process called database auditing. To send these logs to an S3 bucket, specify the `loggingProperties` when creating a new cluster.
Expand Down
4 changes: 2 additions & 2 deletions packages/@aws-cdk/aws-redshift-alpha/lib/cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ export interface ClusterProps {
/**
* The node type to be provisioned for the cluster.
*
* @default `NodeType.DC2_LARGE`
* @default `NodeType.RA3_LARGE`
*/
readonly nodeType?: NodeType;

Expand Down Expand Up @@ -650,7 +650,7 @@ export class Cluster extends ClusterBase {
);
}

const nodeType = props.nodeType || NodeType.DC2_LARGE;
const nodeType = props.nodeType || NodeType.RA3_LARGE;

if (props.multiAz) {
if (!nodeType.startsWith('ra3')) {
Expand Down
8 changes: 4 additions & 4 deletions packages/@aws-cdk/aws-redshift-alpha/test/cluster.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ test('check that instantiation works', () => {
AutomatedSnapshotRetentionPeriod: 1,
Encrypted: true,
NumberOfNodes: 2,
NodeType: 'dc2.large',
NodeType: 'ra3.large',
DBName: 'default_db',
PubliclyAccessible: false,
ClusterSubnetGroupName: { Ref: 'RedshiftSubnetsDFE70E0A' },
Expand Down Expand Up @@ -661,7 +661,7 @@ test.each([
AutomatedSnapshotRetentionPeriod: 1,
Encrypted: true,
NumberOfNodes: 2,
NodeType: 'dc2.large',
NodeType: 'ra3.large',
DBName: 'default_db',
PubliclyAccessible: false,
ClusterSubnetGroupName: { Ref: 'RedshiftSubnetsDFE70E0A' },
Expand Down Expand Up @@ -693,7 +693,7 @@ test('resize type not set', () => {
AutomatedSnapshotRetentionPeriod: 1,
Encrypted: true,
NumberOfNodes: 2,
NodeType: 'dc2.large',
NodeType: 'ra3.large',
DBName: 'default_db',
PubliclyAccessible: false,
ClusterSubnetGroupName: { Ref: 'RedshiftSubnetsDFE70E0A' },
Expand Down Expand Up @@ -725,7 +725,7 @@ test('elastic ip address', () => {
AutomatedSnapshotRetentionPeriod: 1,
Encrypted: true,
NumberOfNodes: 2,
NodeType: 'dc2.large',
NodeType: 'ra3.large',
DBName: 'default_db',
PubliclyAccessible: false,
ClusterSubnetGroupName: { Ref: 'RedshiftSubnetsDFE70E0A' },
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading