-
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(lambda-event-sources): disable event source #6541
feat(lambda-event-sources): disable event source #6541
Conversation
67e362e
to
45e4d4c
Compare
…pping options parameter to supported event sources in Lambda closes aws#5750
45e4d4c
to
4578bdf
Compare
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 |
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 is fine. We have another PR that addresses the other properties coming in - #5929 |
@@ -137,6 +138,7 @@ and add it to your Lambda function. The following parameters will impact Amazon | |||
|
|||
* __batchSize__: Determines how many records are buffered before invoking your lambda function - could impact your function's memory usage (if too high) and ability to keep up with incoming data velocity (if too low). | |||
* __startingPosition__: Will determine where to being consumption, either at the most recent ('LATEST') record or the oldest record ('TRIM_HORIZON'). 'TRIM_HORIZON' will ensure you process all available data, while 'LATEST' will ignore all records that arrived prior to attaching the event source. | |||
* __enabled__: Disables or enables the event source mapping to pause/start polling and invocation. |
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.
Is this not applicable to other event sources, such as S3 and SNS?
The documentation here seems to suggest that it's applicable to all event source types, no?
@@ -20,7 +20,8 @@ class DynamoEventSourceTest extends cdk.Stack { | |||
|
|||
fn.addEventSource(new DynamoEventSource(queue, { | |||
batchSize: 5, | |||
startingPosition: lambda.StartingPosition.TRIM_HORIZON | |||
startingPosition: lambda.StartingPosition.TRIM_HORIZON, | |||
enabled: false |
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.
Avoid changing an existing integration test.
Actually, an integration test is not needed for this feature; unit tests are sufficient.
Once all the requested changes have been addressed, and the PR is ready for another review, remember to dismiss the review. |
Is this still being worked on? |
This PR has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled. |
One concern may be that there are a lot of event source mapping options specific to streams that are not reflected in the CDK code base: https://docs.aws.amazon.com/lambda/latest/dg/API_CreateEventSourceMapping.html. If perceived to be needed ASAP, those can be added to the StreamEventSourceProps in this CR as well. I checked that CloudFormation does support all of these options. However, only passing the enabled flag helps close the feature request #5750 and limits the scope of the CR.
Unit tests are added and verification was added to existing integration tests as well. I also manually verified that all 3 event sources that support this (dynamo, sqs and kinesis) start out as disabled.
closes #5750
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license