My worker tier returns 400 Error, CloudWatch Error?

橙三吉。 提交于 2019-12-06 05:00:00

I "solved" this by changing the SQS Settings to send the messages in text/plain instead of application/json. Then I recieve the data by the following:

domain = base64.b64decode(request.data) 

I use b64decode because the messages are base64 encoded. But point being that when sending the SQS Message in plain text, you fetch it by request.data.

It's not a fix to the json problem. I was not able to locate why json was causing these issues, but in my case it does not matter if I send it in json or text because it's just a single string that is being send. Hopefully this helps someone.

Anish Acharya

The following policy should give your EBS instance access to your SQS instance:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "QueueAccess",
            "Action": [
                "sqs:ChangeMessageVisibility",
                "sqs:DeleteMessage",
                "sqs:ReceiveMessage"
            ],
            "Effect": "Allow",
            "Resource": "*"
        },
        {
            "Sid": "MetricsAccess",
            "Action": [
                "cloudwatch:PutMetricData"
            ],
            "Effect": "Allow",
            "Resource": "*"
        }
    ]
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!