monitoring-stack-cdk/resources/lambda-functions/sendAPIMetricReportvenv/lambda_function.py [14:26]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    host = os.environ.get('ENDPOINT')
    region = os.environ.get('REGION')
    service = 'es'
    credentials = boto3.Session().get_credentials()
    awsauth = AWS4Auth(credentials.access_key, credentials.secret_key, region, service, session_token=credentials.token)

    es = Elasticsearch(
        hosts = [{'host': host, 'port': 443}],
        http_auth = awsauth,
        use_ssl = True,
        verify_certs = True,
        connection_class = RequestsHttpConnection
    )
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



monitoring-stack-cdk/resources/lambda-functions/sendSoftPhoneMetricsvenv/lambda_function.py [12:25]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
host = os.environ.get('ENDPOINT')
region = os.environ.get('REGION')
service = 'es'
credentials = boto3.Session().get_credentials()
awsauth = AWS4Auth(credentials.access_key, credentials.secret_key, region, service, session_token=credentials.token)

## Establish the connection to Amazon Elasticsearch
es = Elasticsearch(
    hosts = [{'host': host, 'port': 443}],
    http_auth = awsauth,
    use_ssl = True,
    verify_certs = True,
    connection_class = RequestsHttpConnection
)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



