We have now created an OpenSearch domain, configured the required IAM and OpenSearch permissions and we created two Glue jobs that we can run to produce logs.
All of the log information for the Glue jobs is collected in CloudWatch. Lets set up Lambda functions that will – in real time – send the CloudWatch log data to OpenSearch
We can complete this in the following steps
On the log groups page of CloudWatch you should see a few log groups which begin with /aws-glue/
workshop-role
that we created earlier" "
all log
The steps you just completed created a lambda function that will send CloudWatch logs to OpenSearch in real time.
Now that we have completed this process for the /aws-glue/jobs/error
log group Navigate back to the CloudWatch Console and repeat steps 1 - 13 for log groups /aws-glue/jobs/logs-v2
and /aws-glue/jobs/output
glue_job_success
jobRepeat step 3 - 4 for of the jobs you created earlier ie. glue_job_success
and glue_job_error
. Run each job a few times. The goal is to generate some CloudWatch logs that will be sent to OpenSearch.
You can view the job run history for a job by click on the check box next to job name and viewing the history tab
Ensure that you have at least 3 runs completed for each job. The job status for the glue_job_success
should be Succeeded and the job status for the glue_job_error
should be Failed
When you have at least 3 completed job runs for each job begin the next step Search Logs