aws-powertools / powertools-lambda-python

A developer toolkit to implement Serverless best practices and increase developer velocity.
https://docs.powertools.aws.dev/lambda/python/latest/
MIT No Attribution
2.73k stars 378 forks source link

Feature request: Event Source Data Class for CloudWatch custom connector #3499

Open corey-cole opened 6 months ago

corey-cole commented 6 months ago

Use case

CloudWatch metrics/alarms now support non-CloudWatch sources via an adapter Lambda function. The request/response structures are complex enough that they would benefit from having a strongly typed wrapper.

Solution/User Experience

The aws_lambda_powertools.utilities.data_classes namespace includes type for the new GetMetricData event and the corresponding MetricDataResults response.

NOTE: Although the event shares a name with an existing API call, it does not have the same structure and the existing definitions cannot be used here.

Alternative solutions

N/A

Acknowledgment

rubenfonseca commented 6 months ago

Thank you so much for opening this @corey-cole ! Would you like to take a stab at the implementation, and open a PR? We can of course help you out!