I've deployed everything except for the following pieces:
# Create a CloudWatch Event Rule to schedule the Glue Job
resource "aws_cloudwatch_event_rule" "glue_job_schedule_rule" {
name = "glue-job-schedule-rule"
description = "Rule to schedule Glue Job to run daily at 4 PM CST"
schedule_expression = "cron(0 22 * * ? *)" # 4 PM CST is 10 PM UTC
}
# Create CloudWatch Event Target to trigger the Glue Job
resource "aws_cloudwatch_event_target" "glue_job_schedule_target" {
rule = aws_cloudwatch_event_rule.glue_job_schedule_rule.name
target_id = "trigger-glue-job"
arn = "arn:aws:glue:${var.aws_region}:${data.aws_caller_identity.current.account_id}:job/${var.report_glue_name}"
input = jsonencode({
"JobName" = var.report_glue_name
})
}
However, I'm encountering the following error:
Error: creating EventBridge Target (glue-job-schedule-rule-trigger-glue-job): operation error EventBridge: PutTargets, https response error StatusCode: 400, RequestID: 03b0fdd0-251d-4808-be72-ba2a715ec1a2, api error ValidationException: Parameter arn:aws:glue:us-east-1:1234567890:job/missing_recordings_report is not valid. Reason: Provided Arn is not in correct format.
This error occurs at the following line in my main.tf file:
resource "aws_cloudwatch_event_target" "glue_job_schedule_target" {
I've verified that everything else is deployed to aws-qa. Any insights on why the ARN format might be incorrect and how to resolve this issue would be greatly appreciated. Thank you!
What I Tried:
I used Terraform to set up a schedule and trigger for an AWS Glue Job using CloudWatch Event Rule and Event Target.
What I Expected:
I expected everything to be created successfully and the Glue Job to run as scheduled.
What Actually Happened:
I received an error message saying the ARN format for the Glue Job is not valid. The error mentioned a ValidationException and provided details about the incorrect ARN format.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744768097a4592587.html
评论列表(0条)