getndazn / dazn-lambda-powertools

Powertools (logger, HTTP client, AWS clients, middlewares, patterns) for Lambda functions.
https://getndazn.github.io/dazn-lambda-powertools
MIT License
738 stars 75 forks source link

SQS : http now unsupported is a breaking change #89

Closed ilan-deepreach closed 5 years ago

ilan-deepreach commented 5 years ago

This is a Bug Report

Description

Similar or dependent issues:

Additional Data

theburningmonk commented 5 years ago

@ilan-deepreach first of all, apologies as we didn't consider this use case at all, which is why we didn't consider it a breaking change - it had no breaking change to the existing contract. Due to a legal issue, we had to move the packages to the new name. Unfortunately, the two things together have made your life difficult.

@simontabor @gsingh1 what if we only set the SSL agent when we are running inside AWS? e.g. we can check against the reserved env vars like AWS_LAMBDA_RUNTIME_API or LAMBDA_RUNTIME_DIR, and only set the SSL agent if those env vars are present.

@ilan-deepreach what are you using to run the code locally? severless-offline? SAM? Can you check if those env vars are set even when you're running locally?

theburningmonk commented 5 years ago

Since AWS SDK v2.263.0 has built-in support for enabling HTTP keepalive, so we can actually just get rid of the code we have for doing that ourselves.

@simontabor @gsingh1

gsingh1 commented 5 years ago

agreed, we can just get rid of the whole thing now 👍

ilan-deepreach commented 5 years ago

@theburningmonk no problem. We use localstack with sam local Glad the problem is going to be solved with new SDK. Anyway we just end up updating the AWS config to use an http agent on localDev so it's okay on our side. Thanks for your work, we very much appreciate your work in my company :+1: