Prerequisites
- access to AWS console which has BigAnimal configured
- AWS user has IAM management permission and can create lambda applications
Step 1 - locate S3 bucket
1. Go to your AWS console - S3 bucket
2. Search for logs-bucket-<project id>-<region> ( How to get your BigAnimal Cluster ID (PG cluster ID) and project ID )
- project id: XGv7pBgfaWhhNakq
- region: us-east-1
Step 2 - Create AWS Lambda Application
1. Get your New Relic license key - Type: License Ingest
2. Go to AWS Serverless Application Repository, and switch to the correct region
3. Search for newrelic
in available applications and check Show apps that create custom IAM roles or resource policies to find NewRelic-log-ingestion-s3
.
4. Click the NewRelic-log-ingestion-s3
details and click Deploy.
5. Scroll to the Application settings and enter your New Relic License Key
6. Deploy the application
Step 3 - Create a Lambda trigger in AWS
1. Go to Functions, and choose NewRelic-s3-log-ingestion
2. Add Trigger
3. Select the correct S3 bucket
Step 4 - Manage IAM role permission
1. Go to IAM -> Roles, and find the newrelic related role
2. Click 'Add permissions', and 'create inline policy'
3. Create KMS decrypt policy and you can specify the resources via 'Add ARN'
Now you can see the logs at New Relic
Troubleshoot
If you can not see the logs at New Relic, you can go to AWS CloudWatch and check the logs in the Log group: /aws/lambda/NewRelic-s3-log-ingestion
Reference: AWS Lambda for sending logs from S3