get_dr_information¶
- ReplicationStatusMonitorApi.get_dr_information(role_id, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Get DR replication and snapshot status
Returns current DR backup status for the DLZ S3 bucket (replication metrics) and Redshift (snapshot copy in the last two hours). Requires system-settings.view on the given role. No request body. does not start batch retry jobs.
- Parameters:
role_id (str) – Amorphic role ID the request is authorized against. Must be a role the user belongs to. Also recorded in audit logs. (required)
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
- Returns:
Returns the result object.
Request and Response Examples¶
HTTP: GET /dr-information
Success (HTTP 200)¶
S3 and Redshift status objects. S3 Status is pending, completed, or the failed-objects retry sentence. Redshift Status is Snapshot copy completed or Snapshot copy failed. Metric keys with no CloudWatch datapoint are empty objects.
S3 and Redshift copy completed
{
"S3": {
"Status": "completed",
"Details": {
"ReplicationLatency": {
"Timestamp": "2026-08-13 13:45:00",
"Value": 12.0
},
"BytesPendingReplication": {
"Timestamp": "2026-08-13 13:45:00",
"Value": 0.0
},
"OperationsPendingReplication": {
"Timestamp": "2026-08-13 13:45:00",
"Value": 0.0
},
"OperationsFailedReplication": {
"Timestamp": "2026-08-13 02:00:00",
"Value": 0.0
}
}
},
"Redshift": {
"Status": "Snapshot copy completed",
"Details": {
"SnapshotIdentifier": "amorphic-prod-2026-08-13-12-00-00",
"SnapshotCreateTime": "2026-08-13 12:00:00+00:00"
}
}
}
S3 replication still pending
{
"S3": {
"Status": "pending",
"Details": {
"ReplicationLatency": {
"Timestamp": "2026-08-13 13:45:00",
"Value": 45.0
},
"BytesPendingReplication": {
"Timestamp": "2026-08-13 13:45:00",
"Value": 1048576.0
},
"OperationsPendingReplication": {
"Timestamp": "2026-08-13 13:45:00",
"Value": 3.0
},
"OperationsFailedReplication": {}
}
},
"Redshift": {
"Status": "Snapshot copy failed",
"Details": {}
}
}
Some S3 objects failed replication
{
"S3": {
"Status": "some objects failed to be replicated, they will be retried again today at 12:00 am",
"Details": {
"ReplicationLatency": {},
"BytesPendingReplication": {},
"OperationsPendingReplication": {
"Timestamp": "2026-08-13 13:45:00",
"Value": 0.0
},
"OperationsFailedReplication": {
"Timestamp": "2026-08-13 02:00:00",
"Value": 5.0
}
}
},
"Redshift": {
"Status": "Snapshot copy completed",
"Details": {
"SnapshotIdentifier": "amorphic-prod-2026-08-13-12-00-00",
"SnapshotCreateTime": "2026-08-13 12:00:00+00:00"
}
}
}
Errors¶
Documented error codes: AUTH-1001, AUTH-1030.
HTTP 400
API Gateway request validation only (for example missing role_id). The handler does not return 400; auth and other failures are HTTP 500.
Missing required role_id header
{
"Message": "Missing required request parameters: [role_id]"
}
HTTP 500
Handler catches every exception and returns HTTP 500 with {“Message”: “<text>”}. Application errors use {“Message”: “<CODE> - <text>”} (AUTH-1001 missing role_id, AUTH-1030 missing system-settings.view). AWS/CloudWatch/ Redshift failures use the raw exception string.
role_id missing after request reached Lambda
{
"Message": "AUTH-1001 - Missing role information in event header"
}
Caller lacks system-settings.view
{
"Message": "AUTH-1030 - User is not authorized to get application status for DR due to the following missing permission(s) - {'System Settings': ['view']}"
}
Unhandled backend / AWS error
{
"Message": "An error occurred (AccessDenied) when calling the GetMetricData operation"
}