Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Support for passing HTTP_PROXY and HTTPS_PROXY Env vars for AWS_CLI

Oscar West January 25, 2021

Hi,

We use the aws-s3-deploy pipe and would like support for setting HTTP_PROXY and HTTPS_PROXY Environment variables for the AWS CLI to pick up: https://docs.amazonaws.cn/en_us/cli/latest/userguide/cli-configure-proxy.html

Or is there another way to pass and set arbitrary environment variables for all pipes?

https://bitbucket.org/atlassian/aws-s3-deploy/src/master/

 

1 answer

0 votes
Halyna Berezovska
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 28, 2021

@Oscar Westdo I understand right that you don't expect aws access keys credentials to be added to repository variables and instead want to add HTTPS_PROXY and use this authentication instead of aws access keys?

Or do you want to be able to use both at the same time (aws access keys for authentication and proxy to access some resources, e.g. s3 bucket via proxy)?

This is the question to better understand your case and try to find out if it is supported or not.

Thanks!

Regards, Galyna

Oscar West January 28, 2021

Hi, essentially we want the aws cli to proxy our aws s3 sync commands via a proxy server. (https://bitbucket.org/atlassian/aws-s3-deploy/src/f300028f7cf938d2db4f394544e70a52b000a1ff/pipe/pipe.sh#lines-70)

So still need the aws credentials but we need to set the environment variables for the aws cli to pick up on this.

 

Maybe something like this: 

if [[ -n "${PROXY}" ]]; then
  export HTTP_PROXY="${PROXY}"
  export HTTPS_PROXY="${PROXY}"
fi

 

Or is this already supported by passing HTTP_PROXY and HTTPS_PROXY as variables for the pipe? Like this:

 pipe: atlassian/aws-s3-deploy:0.4.5
  variables:
AWS_ACCESS_KEY_ID: '<string>' # Optional if already defined in the context.
AWS_SECRET_ACCESS_KEY: '<string>' # Optional if already defined in the context. HTTP_PROXY: '<string>' # Optional HTTPS_PROXY: '<string>' # Optional
...

Can't seem to find any documentation.

Halyna Berezovska
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 1, 2021

@Oscar WestI've just tried to pass variables, like in your second approach, it worked.

So I think the second option is supported, you can simply try it.

Looking forward to seeing your feedback, we'll make a support ticket, if there are some problems.

Regards,  Galyna

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events