grafana / k6-jslib-aws

Javascript Library allowing to interact with AWS resources from k6 scripts
Apache License 2.0
18 stars 28 forks source link

Sending event with eventbridge client returns undefined when both successful or failure #84

Open AT2406 opened 7 months ago

AT2406 commented 7 months ago

While using the EventBridgeClient to put events, the response from the request is undefined and makes it impossible to know whether or not the event was successfully sent without have a cloudwatch log group set up. The same can be said about testing the sending of events with localstack.

The output below is what is received after using the AWS SDK to sent an event, and using the AWS CLI the output is a JSON object of the entries.

Events sent successfully: {
  '$metadata': {
    httpStatusCode: 200,
    requestId: '7d7d7230-2ba9-47df-9365-e9c5fe559c5b',
    extendedRequestId: undefined,
    cfId: undefined,
    attempts: 1,
    totalRetryDelay: 0
  },
  Entries: [ { EventId: '7b8f902c-b455-cd10-ca02-a70759febd56' } ],
  FailedEntryCount: 0
}

Are there any ways of returning the response rather than undefined?