serverless-secrets
serverless-secrets copied to clipboard
Add the option to add HTTP PROXY when communicating with AWS
This is to address network connectivity issue when communicating with AWS when working behind corporate proxy.
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?
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