harbor run -t openthoughts/tasktrove-exp-flat25-stackoverflow-v2-5k-stackoverflow-4652harbor download openthoughts/tasktrove-exp-flat25-stackoverflow-v2-5k-stackoverflow-4652Title: Implement HitCounter CDK construct in Python (CDK) per tests: DynamoDB table, SSE, and Lambda integration
Body: I need help implementing a new CDK construct in Python at cdk_workshop/hitcounter.py. The construct should export a class HitCounter that can be used like this:
HitCounter(stack, "HitCounter", downstream=some_lambda.Function, read_capacity=some_int )
Requirements and constraints (as used by tests):
The construct must:
Ensure there are no extra resources besides the HitCounter’s DynamoDB table and the HitCounter Lambda (plus the necessary constructs and IAM permissions required by CDK to wire them together).
Notes for the tests (what they expect):
Deliverable:
Code sketch / interface (for reference, not a solution):
The construct should be importable and usable as: from aws_cdk import aws_dynamodb as dynamodb from aws_cdk import aws_lambda as _lambda from aws_cdk import core
class HitCounter(core.Construct): def init(self, scope: core.Construct, id: str, downstream: _lambda.Function, read_capacity: int = None) -> None: super().init(scope, id) # Implementation goes here
What I’m asking for: