How to make the environment variables reach Dataflow workers as environment variables in python sdk

Tadayasu Yotsu

I write custom sink with python sdk. I try to store data to AWS S3. To connect S3, some credential, secret key, is necessary, but it's not good to set in code for security reason. I would like to make the environment variables reach Dataflow workers as environment variables. How can I do it?

jkff

Generally, for transmitting information to workers that you don't want to hard-code, you should use PipelineOptions - please see Creating Custom Options. Then, when constructing the pipeline, just extract the parameters from your PipelineOptions object and put them into your transform (e.g. into your DoFn or a sink).

However, for something as sensitive as a credential, passing sensitive information in a command-line argument might be not a great idea. I would recommend a more secure approach: put the credential into a file on GCS, and pass the name of the file as a PipelineOption. Then programmatically read the file from GCS whenever you need the credential, using GcsIO.

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

How do I make sudo preserve my environment variables?

分類Dev

How to print environment variables on Heroku?

分類Dev

How to configure environment variables in Ubuntu?

分類Dev

Unable to get environment variables using os python

分類Dev

How to set ASP.NET 5 environment variables on production environment

分類Dev

How to set bash environment variables using lua

分類Dev

How to have defaults for environment variables in PyCharm

分類Dev

How to pass environment variables to a service started by systemd

分類Dev

Jenkins : How to get sonar environment variables

分類Dev

How to backup/export Gitlab CI environment variables?

分類Dev

How to remove a environment variables using config transformations

分類Dev

How to add entries to Pulumi output for environment variables?

分類Dev

How does 'screen' impact environment variables?

分類Dev

GOD and environment variables : How to manage credentials?

分類Dev

how to use system environment variables in boto

分類Dev

How to export Environment variables to a text file

分類Dev

How to print all non-environment variables?

分類Dev

Environment Variables in Rstudio on Mac

分類Dev

Creating complex environment variables

分類Dev

Editing Environment Variables

分類Dev

How to list global environment variables separately from user-specific environment variables?

分類Dev

Can the environment variables for a modified environment be accessed externally?

分類Dev

Get variables from the environment in go?

分類Dev

Where are environment variables stored in registry?

分類Dev

AWS OpsWorks Environment variables not working

分類Dev

PHPUnit ignores Apache environment variables

分類Dev

Environment variables for tests in Symfony 4

分類Dev

Pom file not reading environment variables

分類Dev

Blazor: Managing Environment Specific Variables

Related 関連記事

  1. 1

    How do I make sudo preserve my environment variables?

  2. 2

    How to print environment variables on Heroku?

  3. 3

    How to configure environment variables in Ubuntu?

  4. 4

    Unable to get environment variables using os python

  5. 5

    How to set ASP.NET 5 environment variables on production environment

  6. 6

    How to set bash environment variables using lua

  7. 7

    How to have defaults for environment variables in PyCharm

  8. 8

    How to pass environment variables to a service started by systemd

  9. 9

    Jenkins : How to get sonar environment variables

  10. 10

    How to backup/export Gitlab CI environment variables?

  11. 11

    How to remove a environment variables using config transformations

  12. 12

    How to add entries to Pulumi output for environment variables?

  13. 13

    How does 'screen' impact environment variables?

  14. 14

    GOD and environment variables : How to manage credentials?

  15. 15

    how to use system environment variables in boto

  16. 16

    How to export Environment variables to a text file

  17. 17

    How to print all non-environment variables?

  18. 18

    Environment Variables in Rstudio on Mac

  19. 19

    Creating complex environment variables

  20. 20

    Editing Environment Variables

  21. 21

    How to list global environment variables separately from user-specific environment variables?

  22. 22

    Can the environment variables for a modified environment be accessed externally?

  23. 23

    Get variables from the environment in go?

  24. 24

    Where are environment variables stored in registry?

  25. 25

    AWS OpsWorks Environment variables not working

  26. 26

    PHPUnit ignores Apache environment variables

  27. 27

    Environment variables for tests in Symfony 4

  28. 28

    Pom file not reading environment variables

  29. 29

    Blazor: Managing Environment Specific Variables

ホットタグ

アーカイブ