amazon-web-services - AWS MWAA:某些提供的配置没有预期的格式:调度程序,例如:core.log_format
问题描述
我正在 AWS 中部署 Managed Airflow (MWAA) 并在 cloudformation 中收到以下错误。我给出的 log_format 与气流文档中提到的相同,但 CFN 仍然给出错误。
资源处理程序返回消息:“提供的请求无效:某些提供的配置没有预期的格式:调度程序,例如:core.log_format。(服务:Mwaa,状态代码:400,HandlerErrorCode:InvalidRequest)
以下是我在 cloudformation 中提供的 Airflow 配置选项。
AirflowConfigurationOptions:
core:
parallelism: 64
default_task_retries: 3
default_timezone: Australia/Melbourne
dag_concurrency: 16
maximum_active_runs_per_dag: 16
load_examples: False
load_default_connections: False
log_format: "[%%(asctime)s] {{%%(filename)s:%%(lineno)d}} %%(levelname)s - %%(message)s"
webserver:
default_ui_timezone: Australia/Melbourne
scheduler:
catchup_by_default: False
allow_trigger_in_future: True
operators:
default_owner: vulcan
smart_sensor:
use_smart_sensor: True
shards: 8
logging:
remote_logging: True
remote_log_conn_id: s3
remote_base_log_folder:
- Fn::ImportValue: xxxxx
解决方案
在 CFN 中提及气流配置的正确方法是:
env:
Type: AWS::MWAA::Environment
Properties:
AirflowConfigurationOptions:
core.parallelism: 64
core.default_task_retries: 3
core.default_timezone: Australia/Melbourne
并且应该首先使用 AWS Secret manager 创建远程登录连接,然后可以在 cfn 中的远程日志记录气流配置中使用它。
推荐阅读
- django - django inlineformset 中的动态额外字段
- d3.js - d3v4 扭曲饼图转换
- javascript - NodeJS 从 DB 1 中检索记录 1 与全部
- python-3.x - 将字典列表的字符串表示形式转换为字典列表
- angular - Angular 通过输入中的 id 从数组中获取对象
- android - Android 模拟器没有与我的 React Native 应用程序一起运行
- postgresql - Odoo 12 数据库连接超时与繁重的 cron 作业
- eclipse - 如何将源文件链接到基于 Eclipse 的 IDE
- linux - 通过 ssh 连接到 jupyter notebook 服务器的问题
- pycharm - Python 社区:我们可以在社区版本中使用 BDD 框架吗?