Skip to content

Submitted policy is over max allowed size. #29

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
0xhb opened this issue Apr 17, 2025 · 1 comment
Open

Submitted policy is over max allowed size. #29

0xhb opened this issue Apr 17, 2025 · 1 comment

Comments

@0xhb
Copy link

0xhb commented Apr 17, 2025

When I execute the command terraform apply, I always get this error:

│ Error: setting SQS Queue (https://sqs.us-east-1.amazonaws.com/637423392949/internal_message_bus) attribute (Policy): OverLimit: Submitted policy is over max allowed size.
│ status code: 403, request id: fb5b99ab-69cd-5ce5-a097-f9d18526b9d9

│ with module.challenge_middle[0].aws_sqs_queue_policy.schedule-event-rce-policy,
│ on challenges/Middle/middle.tf line 162, in resource "aws_sqs_queue_policy" "schedule-event-rce-policy":
│ 162: resource "aws_sqs_queue_policy" "schedule-event-rce-policy" {

Image

@0xhb
Copy link
Author

0xhb commented Apr 17, 2025

resource "aws_sqs_queue_policy" "schedule-event-rce-policy" {
queue_url = aws_sqs_queue.internal_message_bus.id

policy = jsonencode({
Version = "2012-10-17",
Id = "sqspolicy",
Statement = [
{
Sid = "First",
Effect = "Allow",
Principal = "*",
Action = ["sqs:SendMessage", "sqs:ReceiveMessage"],
Resource = aws_sqs_queue.internal_message_bus.arn,
Condition = {
IpAddress = {
"aws:SourceIp" = "${var.user_ip}/32"
}
}
}
]
})
}

here is the error source as pointed by terraform

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant