英文:
AWS Cli - MWAA - Create environment with configuration options
问题
我通过AWS Cli的create-environment函数创建MWAA环境。我可以创建环境,但现在我尝试添加一个配置选项,以便我可以将AWS Secret Manager用作后端 (https://docs.aws.amazon.com/mwaa/latest/userguide/connections-secrets-manager.html)。我的命令是:
aws mwaa create-environment --name "my_mwaa_env" --airflow-configuration-options "secrets.backend": "airflow.providers.amazon.aws.secrets.secrets_manager.SecretsManagerBackend", "secrets.backend_kwargs": '{"connections_prefix" : "airflow/connections", "variables_prefix" : "airflow/variables"}'
我已经将参数airflow-configuration-options设置为String和Json,但我无法使用这些选项创建。使用这个版本,我得到了这个错误:
Unknown options: airflow/connections,, variables_prefix, :, airflow/variables}, :
是否有类似用例的示例?谢谢
英文:
I'm creating MWAA enviornments through AWS Cli with the create-environment function. I can create the environment without any problems but now I'm trying to add a configuration option so I can use AWS Secret Manager as the backend (https://docs.aws.amazon.com/mwaa/latest/userguide/connections-secrets-manager.html). My command is this:
aws mwaa create-environment --name "my_mwaa_env" --airflow-configuration-options "secrets.backend": "airflow.providers.amazon.aws.secrets.secrets_manager.SecretsManagerBackend", "secrets.backend_kwargs": '{"connections_prefix" : "airflow/connections", "variables_prefix" : "airflow/variables"}'
I already put the parameter airflow-configuration-options as String, Json, but I am not able to create with these options. With this version I'm getting this error:
Unknown options: airflow/connections,, variables_prefix, :, airflow/variables}, :
Does anyone have an example of a similar use case?
Thanks
答案1
得分: 0
Looks like --airflow-configuration-options needs to be a map. You can refer to https://docs.aws.amazon.com/cli/latest/reference/mwaa/create-environment.html
So it's something like
aws mwaa create-environment --name "my_mwaa_env" --airflow-configuration-options {
"secrets.backend": "airflow.providers.amazon.aws.secrets.secrets_manager.SecretsManagerBackend", "secrets.backend_kwargs": {"connections_prefix" : "airflow/connections", "variables_prefix" : "airflow/variables"}
}
英文:
Looks like --airflow-configuration-options needs to be a map. You can refer to https://docs.aws.amazon.com/cli/latest/reference/mwaa/create-environment.html
So it's something like
aws mwaa create-environment --name "my_mwaa_env" --airflow-configuration-options {
"secrets.backend": "airflow.providers.amazon.aws.secrets.secrets_manager.SecretsManagerBackend", "secrets.backend_kwargs": {"connections_prefix" : "airflow/connections", "variables_prefix" : "airflow/variables"}
}
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论