serverless-secrets icon indicating copy to clipboard operation
serverless-secrets copied to clipboard

Add the option to add HTTP PROXY when communicating with AWS

Open williamsia opened this issue 7 years ago • 2 comments

This is to address network connectivity issue when communicating with AWS when working behind corporate proxy.

williamsia avatar Oct 05 '17 02:10 williamsia

Hey @williamsia, Thanks for the PR! I get what you're after here, but let me take this back to the drawing board and see what I can do in terms of offering something more flexible. I'm sure others may need access to the AWS.config object for other uses, and I don't think it is sustainable to do this kind of thing for every provider long term. I'm thinking of another client method that lets you send a "configuration callback" to be executed before the provider is retrieved, and the AWS.config would be passed in as an argument for the consumer to tweak as needed. Thoughts?

azurelogic avatar Oct 05 '17 22:10 azurelogic

Hi @azurelogic thanks for the quick reply. Maybe we should have just the provider specified by the serverless framework itself, https://github.com/serverless/serverless/blob/master/lib/plugins/aws/provider/awsProvider.js#L114 so we don't have to reinvent the wheel. We just piggy backing all the AWS options set back the serverless framework itself.

And just uses the provider the way "sls invoke" uses it as specified in https://github.com/serverless/serverless/blob/master/lib/plugins/aws/invoke/index.js#L82

But that means more changes on the code. I don't mind doing some of the work if you agree with this approach, either way happy to follow your lead mate.

Cheers

williamsia avatar Oct 06 '17 01:10 williamsia