-
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(scheduler-targets-alpha): KinesisDataFirehosePutRecord
Target
#27842
Conversation
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.
The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.
A comment requesting an exemption should contain the text Exemption Request
. Additionally, if clarification is needed add Clarification Request
to a comment.
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
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.
Looks good 👍
Just some minor documentation adjustments needed.
|
||
## Put records to an Amazon Kinesis Data Firehose | ||
|
||
Use the `KinesisDataFirehosePutRecord` target to put records to an Amazon Kinesis Data Firehose. |
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.
Use the `KinesisDataFirehosePutRecord` target to put records to an Amazon Kinesis Data Firehose. | |
Use the `KinesisDataFirehosePutRecord` target to put a record to a Kinesis Data Firehose delivery stream. |
import * as kinesisfirehose from 'aws-cdk-lib/aws-kinesisfirehose'; | ||
|
||
declare const deliveryStream: kinesisfirehose.CfnDeliveryStream; |
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.
import * as kinesisfirehose from 'aws-cdk-lib/aws-kinesisfirehose'; | |
declare const deliveryStream: kinesisfirehose.CfnDeliveryStream; | |
import * as firehose from 'aws-cdk-lib/aws-kinesisfirehose'; | |
declare const deliveryStream: firehose.CfnDeliveryStream; |
|
||
protected addTargetActionToRole(schedule: ISchedule, role: IRole): void { | ||
if (!sameEnvDimension(this.deliveryStream.stack.region, schedule.env.region)) { | ||
throw new Error(`Cannot assign firehose in region ${this.deliveryStream.stack.region} to the schedule ${Names.nodeUniqueId(schedule.node)} in region ${schedule.env.region}. Both the schedule and the firehose must be in the same region.`); |
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.
throw new Error(`Cannot assign firehose in region ${this.deliveryStream.stack.region} to the schedule ${Names.nodeUniqueId(schedule.node)} in region ${schedule.env.region}. Both the schedule and the firehose must be in the same region.`); | |
throw new Error(`Cannot assign the Firehose delivery stream in region ${this.deliveryStream.stack.region} to the schedule ${Names.nodeUniqueId(schedule.node)} in region ${schedule.env.region}. Both the schedule and the Firehose delivery stream must be in the same region.`); |
} | ||
|
||
if (!sameEnvDimension(this.deliveryStream.stack.account, schedule.env.account)) { | ||
throw new Error(`Cannot assign firehose in account ${this.deliveryStream.stack.account} to the schedule ${Names.nodeUniqueId(schedule.node)} in account ${schedule.env.region}. Both the schedule and the firehose must be in the same account.`); |
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.
throw new Error(`Cannot assign firehose in account ${this.deliveryStream.stack.account} to the schedule ${Names.nodeUniqueId(schedule.node)} in account ${schedule.env.region}. Both the schedule and the firehose must be in the same account.`); | |
throw new Error(`Cannot assign the Firehose delivery stream in account ${this.deliveryStream.stack.account} to the schedule ${Names.nodeUniqueId(schedule.node)} in account ${schedule.env.region}. Both the schedule and the Firehose delivery stream must be in the same account.`); |
Thanks! Please check the changes. |
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 👍
This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state. |
…cheduler-targets-firehose
KinesisDataFirehosePutRecord
Target
Signed-off-by: Vinayak Kukreja <vinakuk@amazon.com>
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.
Hey @go-to-k, thank you for this contribution.
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Pull request has been modified.
Thanks for your approval! I fixed conflicts. Please approve again. I fixed the other PR the same way, but when one of them gets merged, the other one gets conflicts again. If that happens, I will fix it again. |
Hey @go-to-k , thank you for fixing the conflicts. The other PR is now merged. Please let me know once you have fixed conflicts for this PR. |
This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state. |
…cheduler-targets-firehose
Thanks, I fixed new conflicts in this PR again, please look at this. |
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 main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
This PR adds KinesisDataFirehosePutRecord as a target for an EventBridge scheduler.
Closes #27450.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license