Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

(lambda-event-sources): Providing a Token for the maxConcurrency results in a runtime error #27796

Closed
rahman opened this issue Nov 1, 2023 · 1 comment · Fixed by #27797
Closed
Labels
@aws-cdk/aws-lambda-event-sources bug This issue is a bug. effort/small Small work item – less than a day of effort p2

Comments

@rahman
Copy link
Contributor

rahman commented Nov 1, 2023

Describe the bug

When providing a numeric token for the maxConcurrency it results in a runtime error

Expected Behavior

It should not error when provided with a numeric token

Current Behavior

Providing a token currently results in a runtime error

jsii.errors.JavaScriptError: 
  @jsii/kernel.RuntimeError: Error: maxConcurrency must be between 2 and 1000 concurrent instances

Reproduction Steps


event_source.SqsEventSource(queue=queue, batch_size=batch_size,
                            max_concurrency=Token.as_number(ssm.StringParameter.value_for_string_parameter(self, "max_concurrency"))))

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.103.1

Framework Version

No response

Node.js Version

v16.20.1

OS

Linux

Language

Python

Language Version

Python 3.10.12

Other information

No response

@rahman rahman added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Nov 1, 2023
@khushail khushail added investigating This issue is being investigated and/or work is in progress to resolve the issue. and removed needs-triage This issue or PR still needs to be triaged. labels Nov 1, 2023
@khushail khushail added p2 effort/small Small work item – less than a day of effort and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. labels Nov 10, 2023
@mergify mergify bot closed this as completed in #27797 Nov 20, 2023
mergify bot pushed a commit that referenced this issue Nov 20, 2023
…t token-aware (#27797)

Allows a Token to be provided for maxConcurrency without runtime errors

Closes #27796.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
@aws-cdk/aws-lambda-event-sources bug This issue is a bug. effort/small Small work item – less than a day of effort p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants