GenerateAccessLogs
Source:
src/AWS/Amplify/GenerateAccessLogs.ts
Runtime binding for amplify:GenerateAccessLogs.
Bind an App in the function’s init phase to get a callable that
generates a pre-signed URL to the app’s access logs for a time range —
e.g. an analytics function ingesting traffic data on a schedule. Provide the
implementation with Effect.provide(AWS.Amplify.GenerateAccessLogsHttp).
Reading Access Logs
Section titled “Reading Access Logs”// init — bind the operation to the appconst generateAccessLogs = yield* AWS.Amplify.GenerateAccessLogs(app);
// runtime — logUrl is a pre-signed CSV downloadconst { logUrl } = yield* generateAccessLogs({ domainName: "example.com", startTime: new Date(Date.now() - 24 * 60 * 60 * 1000), endTime: new Date(),});