-
Notifications
You must be signed in to change notification settings - Fork 633
Closed
Labels
bugThis issue is a bug.This issue is a bug.p2This is a standard priority issueThis is a standard priority issueservice-apiThis issue is due to a problem in a service API, not the SDK implementation.This issue is due to a problem in a service API, not the SDK implementation.
Description
Checkboxes for prior research
- I've gone through Developer Guide and API reference
- I've checked AWS Forums and StackOverflow.
- I've searched for previous similar issues and didn't find any solution.
Describe the bug
I am using GenerateAccessLogsCommand
to get the access logs from my amplify app for a specific time.
When calling GenerateAccessLogsCommand, if, for example, I send as start date: 2024-09-11T14:12:21.237Z and as end date: 2024-09-11T15:12:21.237Z, I get some logs out of this range of dates. In this case, I am getting logs from 14:22 until 15:39.
This looks a bit random, cause sometimes I also miss some logs from the date ranges, and other times I get logs previous to the dates range I send.
SDK version number
@aws-sdk/[email protected]
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
v16.20.2
Reproduction Steps
const client = new AmplifyClient({ region: "[region]" });
const currentTime = new Date();
// Example for getting logs from 1.5 hours before. Range of one hour
const endTime = new Date(currentTime.getTime() - 30 * 60 * 1000);
const startTime = new Date(endTime.getTime() - 60 * 60 * 1000);
const input = {
startTime: startTime,
endTime: endTime,
domainName: "[domain]",
appId: "[amplifyApp]",
};
const command = new GenerateAccessLogsCommand(input);
const response = await client.send(command);
const logsResponse = await fetch(response.logUrl || '');
const logs = await logsResponse.text();
Observed Behavior
Getting logs out of the range
Expected Behavior
Get all logs includes in the range of dates I send to GenerateAccessLogsCommand
Possible Solution
No response
Additional Information/Context
No response
Metadata
Metadata
Assignees
Labels
bugThis issue is a bug.This issue is a bug.p2This is a standard priority issueThis is a standard priority issueservice-apiThis issue is due to a problem in a service API, not the SDK implementation.This issue is due to a problem in a service API, not the SDK implementation.