Skip to content
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

CloudWatch GetMetricData() returns "MalformedInput: timestamp must follow ISO8601" #3506

Closed
ellagxy opened this issue Aug 26, 2020 · 1 comment
Labels
bug This issue is a bug. duplicate This issue is a duplicate.

Comments

@ellagxy
Copy link

ellagxy commented Aug 26, 2020

Please fill out the sections below to help us address your issue.

Version of AWS SDK for Go?

1.34.10

Version of Go (go version)?

go version go1.14.7 linux/amd64

What issue did you see?

When call GetMetricData(), it returns "MalformedInput: timestamp must follow ISO8601" error.

Steps to reproduce

  1. My code to form GetMetricDataInput with timestamp:
    endTime := time.Now()
    duration, _ := time.ParseDuration("-60s")
    startTime := endTime.Add(duration)
    getMetricDataInput := &cloudwatch.GetMetricDataInput{
    StartTime: aws.Time(startTime),
    EndTime: aws.Time(endTime),
    MetricDataQueries: metricDataQueries,
    }

  2. Same timestamp code I did not see issue with AWS SDK 1.34.7

  3. I was printing out my GetMetricDataInput and timestamp looks like below:
    StartTime: 2020-08-26 17:27:42.921042773 +0000 UTC m=-174.480789205,
    EndTime: 2020-08-26 17:28:42.921042773 +0000 UTC m=-114.480789205,

  4. I thought it might be related to the time on my computer where I did GetMetricData() call, so I moved endTime and startTime 5min before then time.Now() but still seeing same issue.

If you have an runnable example, please include it.

@skmcgrail
Copy link
Member

Thanks for the report @ellagxy, this issue is being tracked in #3498. Closing this issue since it is a duplicate.

@diehlaws diehlaws added bug This issue is a bug. duplicate This issue is a duplicate. labels Aug 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. duplicate This issue is a duplicate.
Projects
None yet
Development

No branches or pull requests

3 participants