-
Notifications
You must be signed in to change notification settings - Fork 4.4k
feat(kinesisfirehose): add support for backing up source records to S3 #15725
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
Merged
Merged
Changes from all commits
Commits
Show all changes
218 commits
Select commit
Hold shift + click to select a range
8401fb4
feat(aws-kinesisfirehose): DeliveryStream API and basic S3 destination
madeline-k dca12f2
fix typo in aws-kinesisfirehose-destinations README
madeline-k 6fceebf
remove unnecessary deps
madeline-k 58b3fe1
feat(aws-kinesisfirehose): specific metrics functions for DeliveryStream
madeline-k 55cb8d6
feat(aws-kinesisfirehose): Add support for server-side encryption on …
madeline-k cfc1427
feat(aws-kinesisfirehose): support for compression on S3 delivery str…
madeline-k b5b48ed
feat(aws-kinesisfirehose-destinations): support prefixes for S3 desti…
madeline-k 7892f58
Merge branch 'master' into madeline-k/feat/kinesisfirehose-deliveryst…
madeline-k be0bf89
feat(aws-kinesisfirehose): add support for BufferingHints
madeline-k c764118
feat(aws-kinesisfirehose): support for S3 destination encryption on D…
madeline-k 78e6a9c
remove awslint exception for IConnectable.connections
madeline-k 5f7a15c
Change name of S3 destination to S3Bucket
madeline-k efe2fe0
add Role to DestinationBindOptions, update S3 to S3Bucket in tests
madeline-k 4308f44
remove helper function to enforce ExtendedS3DestinationConfigurationP…
madeline-k 172ab43
remove lambda dependency
madeline-k c0d85f5
update README
madeline-k 3d34c46
remove tagsand ITaggable interface
madeline-k 5ceff5c
use splitArn instead of parseArn
madeline-k ce4dde1
update error message for bad input ARN
madeline-k 0ed658f
add ArnFormat to formatArn() call
madeline-k 1925560
update error message in tests for bad input ARN
madeline-k e46c595
pass deliveryStreamName as physicalName through to super constructor
madeline-k d1463a2
move validation to beginning of constructor
madeline-k 1623199
simplify createLoggingOptions
madeline-k 16a54e5
remove awslint exclude
madeline-k b011392
feat(aws-kinesisfirehose): specific metrics functions for DeliveryStr…
madeline-k 56aa16a
change name of s3 destination props to S3BucketProps
BenChaimberg f70fc31
remove basic s3 integration test
BenChaimberg 73f1777
rename integration tests
BenChaimberg 314c4ca
de-exports DeliveryStreamBase
BenChaimberg 64131d1
leverage construct tree to store LogGroup and prevent creating it mul…
madeline-k 4cfc76a
Merge branch 'madeline-k/feat/kinesisfirehose-deliverystream' into ma…
madeline-k 6c78eeb
Revert "feat(aws-kinesisfirehose): specific metrics functions for Del…
madeline-k ccd9333
cleanup s3 destination unit tests to do less hardcoding
BenChaimberg 99a4167
Merge branch 'madeline-k/feat/kinesisfirehose-deliverystream' into ma…
madeline-k c77437a
feat(aws-kinesisfirehose): specific metrics functions for DeliveryStream
madeline-k e37d8ea
make snippets compile and enforce strict compilation
BenChaimberg cd1618b
remove IDeliveryStream from DestinationBindOptions, only service role…
BenChaimberg bfe6dd4
remove explicit dependency delivery stream -> service role
BenChaimberg dcd088d
Revert "remove explicit dependency delivery stream -> service role"
BenChaimberg 0a7e010
destination has separate role
BenChaimberg c99c242
update @types/jest dependency to match all other modules
madeline-k 157d3ca
loose snippet compilation to avoid cyclic dependency
BenChaimberg 49c184d
Merge remote-tracking branch 'origin/master' into madeline-k/feat/kin…
BenChaimberg db9ea21
update README
madeline-k 49a839e
Use L1 types in DestinationConfig returned from bind()
madeline-k c846f4d
Merge branch 'madeline-k/feat/kinesisfirehose-deliverystream' into ma…
madeline-k ff3fb60
Merge branch 'madeline-k/feat/kinesisfirehose-metrics' into madeline-…
madeline-k a2c85bd
remove DestinationBase, move createLoggingOptions and DestinationProps
BenChaimberg 569ca01
don't pass role into bind()
madeline-k af2cb02
Merge branch 'madeline-k/feat/kinesisfirehose-deliverystream' into ma…
madeline-k b392d12
Merge branch 'madeline-k/feat/kinesisfirehose-metrics' into madeline-…
madeline-k 5ee24d4
remove Node.addDependency's to avoid circular dependency
madeline-k c425f78
move integ test verification to core module instead of destinations m…
madeline-k 469bf47
update tests and remove addDependency
madeline-k 2514430
Merge branch 'madeline-k/feat/kinesisfirehose-sse' into madeline-k/fe…
madeline-k 97fb6bc
fix build errors from merge
madeline-k 42abd26
udpate implementation after merge
madeline-k db31e5a
Merge branch 'madeline-k/feat/kinesisfirehose-compression' into madel…
madeline-k 5389186
update integ expected.json
madeline-k 1ae1be4
Merge branch 'madeline-k/feat/kinesisfirehose-prefixes' into madeline…
madeline-k 1f9c228
update unit tests after merge
madeline-k 75f1b56
run integ tests and update expected.json
madeline-k 0eb56d3
Merge branch 'madeline-k/feat/kinesisfirehose-buffering' into madelin…
madeline-k e3a9ec7
Delete integ.s3-all-properties.expected.json
madeline-k 0883ade
re-run integ tests and update expected.json
madeline-k 37ece90
Merge branch 'madeline-k/feat/kinesisfirehose-prefixes' into madeline…
madeline-k 867b33e
Merge branch 'madeline-k/feat/kinesisfirehose-buffering' into madelin…
madeline-k a307108
feat(kinesisfirehose): destinations can provide resources to be depen…
BenChaimberg 04d5ae7
remove unused custom-resources dependency
BenChaimberg 93cc0e5
rewrite providing IAM role section (include separate destination role…
BenChaimberg 3aa77bd
add more IAM role detail
BenChaimberg 7883929
snapshot spacing
BenChaimberg 1c65da6
Merge remote-tracking branch 'origin/master' into madeline-k/feat/kin…
BenChaimberg 45fec81
make s3 destination props readonly
BenChaimberg 28c120f
line length linting
BenChaimberg 005402c
do not re-use log group if log group provided in props
BenChaimberg 0f9d42d
rename DestinationProps -> CommonDestinationProps
BenChaimberg ed02d9f
move logging tests to S3 bucket destination
BenChaimberg 83323ac
Merge branch 'madeline-k/feat/kinesisfirehose-deliverystream' into ma…
madeline-k 9a31251
Merge branch 'madeline-k/feat/kinesisfirehose-metrics' into madeline-…
madeline-k 142e096
re-run integration tests and update snapshot
madeline-k d075e18
Merge branch 'madeline-k/feat/kinesisfirehose-sse' into madeline-k/fe…
madeline-k 645d59b
Merge branch 'madeline-k/feat/kinesisfirehose-compression' into madel…
madeline-k 9a7fad1
Merge branch 'madeline-k/feat/kinesisfirehose-prefixes' into madeline…
madeline-k 2cbe865
Merge branch 'madeline-k/feat/kinesisfirehose-buffering' into madelin…
madeline-k 9cddb50
feat(aws-kinesisfirehose): support for Lambda data processors
madeline-k a1e5c52
update README to use correct S3Bucket class name
madeline-k ff92e3e
Merge branch 'madeline-k/feat/kinesisfirehose-compression' into madel…
madeline-k 6ea22a2
update README to use correct S3Bucket class name
madeline-k 324f78c
Merge branch 'madeline-k/feat/kinesisfirehose-prefixes' into madeline…
madeline-k 95aa481
update README to use correct S3Bucket class name
madeline-k 96909d1
Merge branch 'madeline-k/feat/kinesisfirehose-buffering' into madelin…
madeline-k c39bb5a
update README to use correct S3Bucket class name
madeline-k ccd8097
Merge branch 'madeline-k/feat/kinesisfirehose-encryption-dest' into m…
madeline-k d541b9a
refactor unit tests
madeline-k 00aa894
feat(aws-kinesisfirehose): Add support for backing up source records …
madeline-k aa857cd
add missing 'Bucket' to README
madeline-k c6a8553
Merge branch 'master' into madeline-k/feat/kinesisfirehose-deliveryst…
madeline-k e717474
Merge branch 'madeline-k/feat/kinesisfirehose-deliverystream' into ma…
madeline-k 4b1f5fe
Merge branch 'madeline-k/feat/kinesisfirehose-metrics' into madeline-…
madeline-k 7071ba9
Merge branch 'madeline-k/feat/kinesisfirehose-sse' into madeline-k/fe…
madeline-k f1ecc73
Merge branch 'madeline-k/feat/kinesisfirehose-compression' into madel…
madeline-k 7dce50f
Merge branch 'madeline-k/feat/kinesisfirehose-prefixes' into madeline…
madeline-k 29ea6f5
Merge branch 'madeline-k/feat/kinesisfirehose-buffering' into madelin…
madeline-k 583b2fe
Merge branch 'madeline-k/feat/kinesisfirehose-encryption-dest' into m…
madeline-k b95455e
Merge branch 'madeline-k/feat/kinesisfirehose-dataprocessors' into ma…
madeline-k 2bcc663
Merge branch 'master' of github.com:aws/aws-cdk into madeline-k/feat/…
BenChaimberg 98d6371
use new lazy mappings for CIDR blocks
BenChaimberg e006441
update S3 -> S3Bucket class name in default.ts-fixture
madeline-k 814c61e
remove example that won't translate to other languages
madeline-k 6bc7b60
Merge branch 'madeline-k/feat/kinesisfirehose-dataprocessors' into ma…
madeline-k 52d78d4
Merge branch 'madeline-k/feat/kinesisfirehose-deliverystream' into ma…
madeline-k 86c7cb7
Apply suggestions from code review
madeline-k f8b03c4
remove private index.ts
madeline-k 8c2903e
hardcode logical IDs in unit tests
madeline-k 2b3b2cf
Merge branch 'madeline-k/feat/kinesisfirehose-deliverystream' into ma…
madeline-k b7b897d
Merge branch 'madeline-k/feat/kinesisfirehose-metrics' into madeline-…
madeline-k 5aab535
Merge branch 'madeline-k/feat/kinesisfirehose-sse' into madeline-k/fe…
madeline-k 8c0cfe3
Merge branch 'madeline-k/feat/kinesisfirehose-compression' into madel…
madeline-k d916736
Merge branch 'madeline-k/feat/kinesisfirehose-prefixes' into madeline…
madeline-k 71b4239
Merge branch 'madeline-k/feat/kinesisfirehose-buffering' into madelin…
madeline-k 569743b
Merge branch 'madeline-k/feat/kinesisfirehose-encryption-dest' into m…
madeline-k 65bc7c5
Merge branch 'madeline-k/feat/kinesisfirehose-dataprocessors' into ma…
madeline-k 8045edc
update tests
madeline-k 4827969
Merge branch 'madeline-k/feat/kinesisfirehose-dataprocessors' into ma…
madeline-k ddcbd31
fix typo
madeline-k 7792efa
add unit tests
madeline-k 407ca46
Merge branch 'madeline-k/feat/kinesisfirehose-buffering' into madelin…
madeline-k 93071c5
unit tests
madeline-k 0417b29
Merge branch 'madeline-k/feat/kinesisfirehose-encryption-dest' into m…
madeline-k ab33d0f
Merge branch 'master' into madeline-k/feat/kinesisfirehose-metrics
madeline-k 0e63e66
Merge branch 'madeline-k/feat/kinesisfirehose-metrics' into madeline-…
madeline-k df298b0
Merge branch 'madeline-k/feat/kinesisfirehose-sse' into madeline-k/fe…
madeline-k 7d5956d
Merge branch 'madeline-k/feat/kinesisfirehose-compression' into madel…
madeline-k 09bfa3a
Merge branch 'madeline-k/feat/kinesisfirehose-prefixes' into madeline…
madeline-k 31a5c51
Merge branch 'madeline-k/feat/kinesisfirehose-buffering' into madelin…
madeline-k 89e6f8e
Merge branch 'madeline-k/feat/kinesisfirehose-encryption-dest' into m…
madeline-k f19704b
Merge branch 'madeline-k/feat/kinesisfirehose-dataprocessors' into ma…
madeline-k 12211e3
Update packages/@aws-cdk/aws-kinesisfirehose/README.md
madeline-k 124c354
remove unused dev dependencies
madeline-k 43f2ecf
Update packages/@aws-cdk/aws-kinesisfirehose/test/delivery-stream.tes…
madeline-k 3325990
Update packages/@aws-cdk/aws-kinesisfirehose/test/delivery-stream.tes…
madeline-k 34e29b4
Update packages/@aws-cdk/aws-kinesisfirehose-destinations/lib/private…
madeline-k 8ac8ea3
Merge branch 'master' into madeline-k/feat/kinesisfirehose-metrics
madeline-k 950724e
make constructor props available as a readonly property on the DataPr…
madeline-k 8bc6c88
README formatting
BenChaimberg 1aa653e
deduplicate delivery stream creation in metrics tests
BenChaimberg 9ee3651
Merge remote-tracking branch 'origin/madeline-k/feat/kinesisfirehose-…
BenChaimberg 44d3805
README formatting
BenChaimberg 6207614
docstring clarification of defaults
BenChaimberg 5c790a6
add comment detailing why explicit dependency on key grant is not added
BenChaimberg 61391a4
Merge branch 'madeline-k/feat/kinesisfirehose-sse' into madeline-k/fe…
BenChaimberg c30312d
remove Compression.UNCOMPRESSED, add Compression.of, make constructor…
BenChaimberg 380ad3d
Merge branch 'madeline-k/feat/kinesisfirehose-compression' into madel…
BenChaimberg 9fe4d6a
rename prefix -> dataOutputPrefix
BenChaimberg bd114cb
Merge branch 'madeline-k/feat/kinesisfirehose-prefixes' into madeline…
BenChaimberg 41e01e9
don't force users to provide buffering values when we have defaults
BenChaimberg f388b3c
Merge branch 'madeline-k/feat/kinesisfirehose-buffering' into madelin…
BenChaimberg d54389d
remove duplicated test
BenChaimberg 8dbb5ae
typo and unnecessary truthy testing
BenChaimberg 24f53cf
apply Adam's feedback
madeline-k c471df4
move processor.ts to firehose module
madeline-k fb0c21a
separate LambdaFunctionProcessor to its own file
madeline-k 7419fa0
Merge branch 'madeline-k/feat/kinesisfirehose-encryption-dest' into m…
madeline-k 2663007
fix trailing comma in package.json after merge
madeline-k a3dde9d
Merge branch 'madeline-k/feat/kinesisfirehose-dataprocessors' into ma…
madeline-k eaaf8f0
Merge branch 'madeline-k/feat/kinesisfirehose-backup' of github.com:a…
madeline-k 57e37a9
remove BackupMode.DISABLED, rename DestinationBackupOutput to Destina…
madeline-k dcb21ba
rename DestinationLoggingOutput to DestinationLoggingConfig
madeline-k 5f4577a
Merge branch 'master' into madeline-k/feat/kinesisfirehose-metrics
madeline-k 6ac183e
Merge branch 'madeline-k/feat/kinesisfirehose-metrics' into madeline-…
madeline-k 387fbef
Merge branch 'madeline-k/feat/kinesisfirehose-sse' into madeline-k/fe…
madeline-k 46d48d3
Merge branch 'madeline-k/feat/kinesisfirehose-compression' into madel…
madeline-k b223955
Merge branch 'madeline-k/feat/kinesisfirehose-prefixes' into madeline…
madeline-k 97e03d7
Merge branch 'madeline-k/feat/kinesisfirehose-buffering' into madelin…
madeline-k bf1452f
Merge branch 'madeline-k/feat/kinesisfirehose-encryption-dest' into m…
madeline-k f5702aa
Merge branch 'madeline-k/feat/kinesisfirehose-dataprocessors' into ma…
madeline-k 1a525bf
add missing newlines to end of files
madeline-k 865a9aa
move backupMode validation to constructor
madeline-k 9793012
only add BufferingHints to template if user defined them
madeline-k 397c56f
add verification that either both or neither of bufferringInterval an…
madeline-k 2772b1f
remove direct import of S3Bucket
madeline-k 81672d5
allow user to specify only one of bufferingInterval and bufferingSize
madeline-k a33eff2
refactor backup props existence checking logic
madeline-k ba08799
Apply suggestions from code review
madeline-k 2748ea9
inline processorIdentifier
madeline-k ca59756
refactor so that processor.bind() can return the constructor props i.…
madeline-k 9f9c7f8
Merge branch 'master' into madeline-k/feat/kinesisfirehose-compression
madeline-k 0754886
Revert "refactor so that processor.bind() can return the constructor …
madeline-k 84e6773
remove ProcessorProperty creation logic to separate function
madeline-k 385a49c
refactor createProcessingConfig
madeline-k e6b6e6c
refactor API to only accept one processor instead of an array
madeline-k 61ccc68
udpate README
madeline-k e8f116c
add lit suffix to integ test
madeline-k bcb6b37
add lit suffix to integration test reference in README
madeline-k 2b31c9f
some renaming
madeline-k 1351caf
remove redundant 'backup' in some property names
madeline-k 98f91f0
Apply suggestions from code review
madeline-k d47d4b7
Update packages/@aws-cdk/aws-kinesisfirehose/README.md
madeline-k e0f7901
Merge branch 'madeline-k/feat/kinesisfirehose-compression' into madel…
madeline-k e6ffd73
Merge branch 'madeline-k/feat/kinesisfirehose-prefixes' into madeline…
madeline-k bbc3700
Merge branch 'madeline-k/feat/kinesisfirehose-buffering' into madelin…
madeline-k 5fdb4b7
Merge branch 'madeline-k/feat/kinesisfirehose-encryption-dest' into m…
madeline-k 01d2ed8
Merge branch 'madeline-k/feat/kinesisfirehose-dataprocessors' into ma…
madeline-k 1e9da98
fix file reference to integration test in README
madeline-k d2af3de
Merge branch 'madeline-k/feat/kinesisfirehose-dataprocessors' into ma…
madeline-k 263738d
update README
madeline-k 07d96c1
don't add unnecessary fields to the template if backup is disabled
madeline-k e36969d
don't add encryptionconfiguration to template unless it is needed
madeline-k bf6f4bc
Merge branch 'master' into madeline-k/feat/kinesisfirehose-encryption…
madeline-k 6f599a5
Merge branch 'madeline-k/feat/kinesisfirehose-encryption-dest' into m…
madeline-k 0eca26d
Merge branch 'madeline-k/feat/kinesisfirehose-dataprocessors' into ma…
madeline-k 22ef045
fix unit tests after merge
madeline-k d1a6905
Remove outdated buffering docs
BenChaimberg 8efe8d9
Merge remote-tracking branch 'origin/master' into madeline-k/feat/kin…
BenChaimberg 7914cb8
Merge branch 'master' into madeline-k/feat/kinesisfirehose-backup
madeline-k 36dc4b8
Merge branch 'master' into madeline-k/feat/kinesisfirehose-backup
mergify[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,83 +1,25 @@ | ||
| import * as iam from '@aws-cdk/aws-iam'; | ||
| import * as firehose from '@aws-cdk/aws-kinesisfirehose'; | ||
| import * as kms from '@aws-cdk/aws-kms'; | ||
| import * as s3 from '@aws-cdk/aws-s3'; | ||
| import { Duration, Size } from '@aws-cdk/core'; | ||
| import { Construct } from 'constructs'; | ||
| import { CommonDestinationProps, Compression } from './common'; | ||
| import { createBufferingHints, createEncryptionConfig, createLoggingOptions, createProcessingConfig } from './private/helpers'; | ||
| import { BackupMode, CommonDestinationProps, CommonDestinationS3Props } from './common'; | ||
| import { createBackupConfig, createBufferingHints, createEncryptionConfig, createLoggingOptions, createProcessingConfig } from './private/helpers'; | ||
|
|
||
| /** | ||
| * Props for defining an S3 destination of a Kinesis Data Firehose delivery stream. | ||
| */ | ||
| export interface S3BucketProps extends CommonDestinationProps { | ||
| /** | ||
| * The length of time that Firehose buffers incoming data before delivering | ||
| * it to the S3 bucket. | ||
| * | ||
| * Minimum: Duration.seconds(60) | ||
| * Maximum: Duration.seconds(900) | ||
| * | ||
| * @default Duration.seconds(300) | ||
| */ | ||
| readonly bufferingInterval?: Duration; | ||
|
|
||
| /** | ||
| * The size of the buffer that Kinesis Data Firehose uses for incoming data before | ||
| * delivering it to the S3 bucket. | ||
| * | ||
| * Minimum: Size.mebibytes(1) | ||
| * Maximum: Size.mebibytes(128) | ||
| * | ||
| * @default Size.mebibytes(5) | ||
| */ | ||
| readonly bufferingSize?: Size; | ||
|
|
||
| /** | ||
| * The type of compression that Kinesis Data Firehose uses to compress the data | ||
| * that it delivers to the Amazon S3 bucket. | ||
| * | ||
| * The compression formats SNAPPY or ZIP cannot be specified for Amazon Redshift | ||
| * destinations because they are not supported by the Amazon Redshift COPY operation | ||
| * that reads from the S3 bucket. | ||
| * | ||
| * @default - no compression is applied | ||
| */ | ||
| readonly compression?: Compression; | ||
|
|
||
| /** | ||
| * The AWS KMS key used to encrypt the data that it delivers to your Amazon S3 bucket. | ||
| * | ||
| * @default - Data is not encrypted. | ||
| */ | ||
| readonly encryptionKey?: kms.IKey; | ||
|
|
||
| /** | ||
| * A prefix that Kinesis Data Firehose evaluates and adds to failed records before writing them to S3. | ||
| * | ||
| * This prefix appears immediately following the bucket name. | ||
| * @see https://docs.aws.amazon.com/firehose/latest/dev/s3-prefixes.html | ||
| * | ||
| * @default "YYYY/MM/DD/HH" | ||
| */ | ||
| readonly errorOutputPrefix?: string; | ||
|
|
||
| /** | ||
| * A prefix that Kinesis Data Firehose evaluates and adds to records before writing them to S3. | ||
| * | ||
| * This prefix appears immediately following the bucket name. | ||
| * @see https://docs.aws.amazon.com/firehose/latest/dev/s3-prefixes.html | ||
| * | ||
| * @default "YYYY/MM/DD/HH" | ||
| */ | ||
| readonly dataOutputPrefix?: string; | ||
| export interface S3BucketProps extends CommonDestinationS3Props, CommonDestinationProps { | ||
| } | ||
|
|
||
| /** | ||
| * An S3 bucket destination for data from a Kinesis Data Firehose delivery stream. | ||
| */ | ||
| export class S3Bucket implements firehose.IDestination { | ||
| constructor(private readonly bucket: s3.IBucket, private readonly props: S3BucketProps = {}) { } | ||
| constructor(private readonly bucket: s3.IBucket, private readonly props: S3BucketProps = {}) { | ||
| if (this.props.s3Backup?.mode === BackupMode.FAILED) { | ||
| throw new Error('S3 destinations do not support BackupMode.FAILED'); | ||
| } | ||
| } | ||
|
|
||
| bind(scope: Construct, _options: firehose.DestinationBindOptions): firehose.DestinationConfig { | ||
| const role = this.props.role ?? new iam.Role(scope, 'S3 Destination Role', { | ||
|
|
@@ -93,19 +35,28 @@ export class S3Bucket implements firehose.IDestination { | |
| streamId: 'S3Destination', | ||
| }) ?? {}; | ||
|
|
||
| const { backupConfig, dependables: backupDependables } = createBackupConfig(scope, role, this.props.s3Backup) ?? {}; | ||
| return { | ||
| extendedS3DestinationConfiguration: { | ||
| cloudWatchLoggingOptions: loggingOptions, | ||
| processingConfiguration: createProcessingConfig(scope, role, this.props.processor), | ||
| roleArn: role.roleArn, | ||
| s3BackupConfiguration: backupConfig, | ||
| s3BackupMode: this.getS3BackupMode(), | ||
| bufferingHints: createBufferingHints(this.props.bufferingInterval, this.props.bufferingSize), | ||
| bucketArn: this.bucket.bucketArn, | ||
| compressionFormat: this.props.compression?.value, | ||
| encryptionConfiguration: createEncryptionConfig(role, this.props.encryptionKey), | ||
| errorOutputPrefix: this.props.errorOutputPrefix, | ||
| prefix: this.props.dataOutputPrefix, | ||
| }, | ||
| dependables: [bucketGrant, ...(loggingDependables ?? [])], | ||
| dependables: [bucketGrant, ...(loggingDependables ?? []), ...(backupDependables ?? [])], | ||
| }; | ||
| } | ||
|
|
||
| private getS3BackupMode(): string | undefined { | ||
| return this.props.s3Backup?.bucket || this.props.s3Backup?.mode === BackupMode.ALL | ||
| ? 'Enabled' | ||
| : undefined; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would probably return |
||
| } | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.