[ 
https://issues.apache.org/jira/browse/BEAM-13956?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17494073#comment-17494073
 ] 

Moritz Mack commented on BEAM-13956:
------------------------------------

Propagating environment variables is hardly possible unless supported by the 
runner itself I think :/

I suppose I misunderstood what you meant with SystemProperties.

Java System properties could be done doing something like this, if absolutely 
needed. But obviously that's also very limited and nothing guarantees that 
these are available for later transforms ...
{code:java}
interface SystemProps extends PipelineOptions {
  Map<String,String> getSystemProperties();
  void getSystemProperties(Map<String,String> props);
} 

class DoFnWithSystemProperties<T> extends DoFn<In, OU> {
  @Setup
  public void setSystemProperties(PipelineOptions opts){
    
opts.as(SystemProps.class).getSystemProperties().forEach(System::setProperty);
  }
  
  ...
}{code}

> Serialize/deserialize used StsClient when serializing/deserializing 
> StsAssumeRoleCredentialsProvider
> ----------------------------------------------------------------------------------------------------
>
>                 Key: BEAM-13956
>                 URL: https://issues.apache.org/jira/browse/BEAM-13956
>             Project: Beam
>          Issue Type: Improvement
>          Components: io-java-aws
>            Reporter: Igor Maravić
>            Priority: P3
>              Labels: aws, aws-sdk-v2
>
> To use _StsAssumeRoleCredentialsProvider_ from the environment that doesn't 
> have access to AWS defaults credentials one needs to provide configured 
> _StsClient_ to {_}StsAssumeRoleCredentialsProvider{_}. 
> If we don't serialize and consequently deserialize _StsClient_ that was 
> provided to _StsAssumeRoleCredentialsProvider,_ we're not going to be able to 
> use _StsAssumeRoleCredentialsProvider_ from the Beam pipeline.
> The goal of this ticket is to introduce this functionality.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to