So, I have a service deployed to ECS, I'm trying to send an HTTP request to that service using the following code:
connection = http.client.HTTPConnection(url)
rawRequest={
"BotAlias": "botName",
"UserID": "user",
"AudioFile": base64.b64encode(audio).decode("utf-8")
}
data = json.dumps(rawRequest)
connection.request("POST", "/service-path/protobuf-call",
data, {"Content-type": "application/json"})
response = connection.getresponse()
print(response.read())
return json.loads(response.read().decode())
The rule for port 80 of my ALB is to redirect to port 443 with status code of HTTP_301. For port 443, I have a default rule to redirect to each service's target group depending on the path of the request. However, when I actually run the service I keep getting 301 as the response and not the lex bot response I was looking for. Any thoughts? Thanks in advance!