Skip to content

Commit

Permalink
[Lambda]: Use default context for SSL
Browse files Browse the repository at this point in the history
  • Loading branch information
gaetan-deputier committed Feb 17, 2020
1 parent fc8be4c commit 55e019e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aws/logs_monitoring/lambda_function.py
Expand Up @@ -366,7 +366,7 @@ def __init__(self, host, port, no_ssl, api_key, scrubber):
def _connect(self):
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
if self._use_ssl:
sock = ssl.wrap_socket(sock)
sock = ssl.create_default_context().wrap_socket(sock, server_hostname=self.host)
sock.connect((self.host, self.port))
self._sock = sock

Expand Down Expand Up @@ -658,7 +658,7 @@ def add_metadata_to_lambda_log(event):
# Add any enhanced tags from metadata
if IS_ENHANCED_METRICS_FILE_PRESENT:
tags += get_enriched_lambda_log_tags(event)

# Dedup tags, so we don't end up with functionname twice
tags = list(set(tags))

Expand Down

0 comments on commit 55e019e

Please sign in to comment.