High-volume Amplify app access logs are unreachable, and cannot select smaller range than an hour

0

There is an hour of access logs I want to download/view from my Amplify app.

The problem is because of the high number of requests in this hour, the results can't seem to load in Amplify -> App settings: Monitoring -> Access logs. So I figured I could potentially use AWS CLI and inspect a smaller range, for example: "aws amplify generate-access-logs --start-time 2023-02-02T22:00Z --end-time 2023-02-02T22:05Z --app-id <app id> --domain-name <domain name>".

However, ANY smaller range within that hour still results in an error when trying to load them (BadRequestException). This is likely because the narrow Timestamp range appears to be pointless and limited to a minimum of 1 hour anyway. This was shown in testing using "--start-time 2023-02-02T19:00Z --end-time 2023-02-02T19:30Z" results in the entire 7-8pm hour log. Am I using Timestamps wrong or is this just a 'feature' of Amplify app logs?

Does anyone have any advice for this issue, e.g., how come I can't select a smaller range and is there a better way to access them? Or is this hour simply forever unreachable due to the high volume of requests...

1 Resposta
0

Hello!!! One thing you could do is use the AWS CLI to Download Smaller Ranges. While the Amplify console may have limitations in displaying the full hour of access logs, you can try using the AWS CLI to download a smaller range of logs. The command you provided `

aws amplify generate-access-logs --start-time 2023-02-02T22:00Z --end-time 2023-02-02T22:05Z --app-id <app id> --domain-name <domain name>

` is a good starting point. However, as you've noticed, the timestamp range seems to be limited to a minimum of 1 hour.

It's possible that the Amplify access logs have a built-in limitation on the minimum time range that can be retrieved. This could be a "feature" of the service, and not necessarily a bug.

If the Amplify access logs are however, not meeting your needs, you could consider integrating your application with other AWS logging services, such as Cloudwatch of Kinesis Firehose.

profile picture
ESPECIALISTA
respondido há 12 dias

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas