When working with Amazon CloudWatch and SES metrics, it's common to encounter challenges, especially when trying to manipulate and visualize data effectively.
To address your first issue regarding filling no data periods with zeros, the correct approach is to use the FILL function in conjunction with your SUM expression. However, the FILL function should be applied directly to the metric you want to fill. For example, you can try:
FILL(SUM(METRICS()), 0)
If this does not yield the desired results, ensure that your metric is correctly defined and that there are indeed periods with no data.
For your second issue about creating custom lines for a specific campaign, your SEARCH function seems to be on the right track, but ensure that the syntax is correct and that the metric name and tags match exactly what is being sent to CloudWatch. Here’s a refined example:
SUM(SEARCH('{SES,campaign} MetricName="Send" campaign="my-campaign"', 'Average', 3600))
Make sure that the tags you are using in the SEARCH function are correctly set in your SES configuration. If you still see no results, double-check the time range and ensure that data for that specific campaign exists in the selected timeframe.