fix for crt error

This commit is contained in:
Michaela 2021-01-30 21:38:25 +10:00
parent e9f9ba7084
commit 7aaa1f93b8
2 changed files with 3 additions and 2 deletions

View File

@ -492,7 +492,7 @@ resource "aws_elasticsearch_domain" "ElasticsearchDomain" {
dedicated_master_enabled = true
dedicated_master_type = "t3.small.elasticsearch"
instance_count = 2
instance_type = "t3.small.elasticsearch"
instance_type = "m5.large.elasticsearch"
zone_awareness_enabled = true
}
cognito_options {

View File

@ -7,6 +7,7 @@ import functools
from aws_xray_sdk.core import xray_recorder
from aws_xray_sdk.core import patch_all
from awscrt import io, mqtt, auth, http
from awscrt.exceptions import AwsCrtError
from awsiot import mqtt_connection_builder
import uuid
import threading
@ -79,7 +80,7 @@ def lambda_handler(event, context):
qos=mqtt.QoS.AT_MOST_ONCE)
try:
msg.result()
except RuntimeError:
except (RuntimeError, AwsCrtError):
mqtt_connection = mqtt_connection_builder.websockets_with_default_aws_signing(
endpoint="a2sgq5szfqum7p-ats.iot.us-east-1.amazonaws.com",
client_bootstrap=client_bootstrap,