package Ġjet brains . build Server . runner . lambda . aws Ċ Ċ import Ġcom . amazonaws . client . builder . Aws Client Builder Ċ import Ġcom . amazonaws . services . lambda . AW SL ambda Ċ import Ġcom . amazonaws . services . lambda . AW SL ambda Client Builder Ċ import Ġcom . amazonaws . services . s 3 . transfer . Transfer Manager Ċ import Ġcom . amazonaws . services . s 3 . transfer . Transfer Manager Builder Ċ import Ġjet brains . build Server . agent . Build Runner Context Ċ import Ġjet brains . build Server . runner . lambda . Lambda Constants Ċ import Ġjet brains . build Server . util . amazon . AWS Common Params Ċ import Ġjet brains . build Server . util . amazon . AWS Common Params . with AWS Clients Ċ Ċ class ĠParameter Based Aws Client Fetcher ( private Ġval Ġcontext : ĠBuild Runner Context ) Ġ: ĠAws Client Fetcher Ġ{ ĊĠĠĠ Ġoverride Ġfun Ġget AW SL ambda Client (): ĠAW SL ambda Ġ= ĊĠĠĠĠĠĠĠ Ġwith AWS Clients < AW SL ambda , ĠException >( context . runner Parameters ) Ġ{ Ġclients Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġclient Builder Ġ= ĠAW SL ambda Client Builder . standard () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. with Client Configuration ( clients . client Configuration ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. with Credentials ( AWS Common Params . get Credentials Provider ( context . runner Parameters )) ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ( context . runner Parameters . containsKey ( Lambda Constants . L AMBDA _ ENDPOINT _ URL _ PARAM )) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġclient Builder . with Endpoint Configuration ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠAws Client Builder . Endpoint Configuration ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġcontext . runner Parameters [ Lambda Constants . L AMBDA _ ENDPOINT _ URL _ PARAM ], ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġclients . region ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġclient Builder . with Region ( clients . region ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġclient Builder . build () ĊĠĠĠĠĠĠĠ Ġ} ĊĊĊĠĠĠ Ġoverride Ġfun Ġget Transfer Manager (): ĠTransfer Manager Ġ= ĊĠĠĠĠĠĠĠ Ġwith AWS Clients < Transfer Manager , ĠException >( context . runner Parameters ) Ġ{ Ġclients Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ ĠTransfer Manager Builder . standard () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. with S 3 Client ( clients . create S 3 Client ()) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. build () ĊĠĠĠĠĠĠĠ Ġ} Ċ }