Background
This article will introduce how to download the logs from Amazon S3 for AWS BigAnimal hosted cluster.
Prerequisites
When creating the cluster, you can fill in your AWS Account ID which will be used for authentication before you can download your logs.
Step 1 Get the Logs information from Monitoring & Logging
- OBJECT STORE - pg-logs-tenant-fccfe1d0-2e01-4a23-9192-6cbb2bc0c518
- AWS IAM ROLE - arn:aws:iam::649038350979:role/biganimal-pglogs-role-fccfe1d0-2e01-4a23-9192-6cbb2bc0c518
Step 2 Login to the AWS account and assume the role
Login to the AWS account and assume the role from AWS CLI:
aws sts assume-role --role-arn arn:aws:iam::649038350979:role/biganimal-pglogs-role-fccfe1d0-2e01-4a23-9192-6cbb2bc0c518 --role-session-name bah export AWS_ACCESS_KEY_ID= export AWS_SECRET_ACCESS_KEY= export AWS_SESSION_TOKEN=
Step 3 Download the logs
Download the logs from s3, the s3 bucket string is s3://$UI_OBJECT_STORE
aws s3 cp s3://pg-logs-tenant-fccfe1d0-2e01-4a23-9192-6cbb2bc0c518/ . --recursive
Possible problem
"An error occurred (AccessDenied) when calling the AssumeRole operation: User: ... is not authorized to perform: sts:AssumeRole on resource: arn:aws:iam::649038350979:role/biganimal-pglogs-role-fccfe1d0-2e01-4a23-9192-6cbb2bc0c518"
Solution
The AWS Account ID is set after cluster creation. By editing the cluster, the setting does not reflect into the environment. Please contact BigAnimal support.