Skip to main content
Glama

update_environment

Modify configuration parameters for an existing Amazon Managed Workflows for Apache Airflow (MWAA) environment, including DAG paths, scaling settings, and Airflow versions.

Instructions

Update an existing MWAA environment configuration.

Only provide the parameters you want to change.

Args: name: Environment name dag_s3_path: S3 path to DAGs folder execution_role_arn: IAM role ARN network_configuration: VPC configuration source_bucket_arn: S3 bucket ARN airflow_version: Apache Airflow version environment_class: Environment size max_workers: Maximum workers min_workers: Minimum workers schedulers: Number of schedulers webserver_access_mode: Access mode weekly_maintenance_window_start: Maintenance window airflow_configuration_options: Configuration overrides logging_configuration: Logging settings requirements_s3_path: Path to requirements.txt plugins_s3_path: Path to plugins.zip startup_script_s3_path: Path to startup script

Returns: Dictionary containing the environment ARN

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
dag_s3_pathNo
execution_role_arnNo
network_configurationNo
source_bucket_arnNo
airflow_versionNo
environment_classNo
max_workersNo
min_workersNo
schedulersNo
webserver_access_modeNo
weekly_maintenance_window_startNo
airflow_configuration_optionsNo
logging_configurationNo
requirements_s3_pathNo
plugins_s3_pathNo
startup_script_s3_pathNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The actual implementation of the update_environment tool, which handles the boto3 client call to update the MWAA environment.
    async def update_environment(self, **kwargs: Any) -> Dict[str, Any]:
        """Update an existing MWAA environment."""
        self._check_readonly("update_environment")
    
        try:
            params = {k: v for k, v in kwargs.items() if v is not None}
    
            boto_params: Dict[str, Any] = {}
            param_mapping = {
                "name": "Name",
                "dag_s3_path": "DagS3Path",
                "execution_role_arn": "ExecutionRoleArn",
                "network_configuration": "NetworkConfiguration",
                "source_bucket_arn": "SourceBucketArn",
                "airflow_version": "AirflowVersion",
                "environment_class": "EnvironmentClass",
                "max_workers": "MaxWorkers",
                "min_workers": "MinWorkers",
                "schedulers": "Schedulers",
                "webserver_access_mode": "WebserverAccessMode",
                "weekly_maintenance_window_start": "WeeklyMaintenanceWindowStart",
                "airflow_configuration_options": "AirflowConfigurationOptions",
                "logging_configuration": "LoggingConfiguration",
                "requirements_s3_path": "RequirementsS3Path",
                "plugins_s3_path": "PluginsS3Path",
                "startup_script_s3_path": "StartupScriptS3Path",
            }
    
            for snake_key, value in params.items():
                if snake_key in param_mapping:
                    boto_params[param_mapping[snake_key]] = value
    
            response = self.mwaa_client.update_environment(**boto_params)
            return {"Arn": response["Arn"]}
  • The registration of the update_environment tool in the MCP server, which maps to the tools.update_environment handler.
    @mcp.tool(name="update_environment")
    async def update_environment(
        name: str,
        dag_s3_path: Optional[str] = None,
        execution_role_arn: Optional[str] = None,
        network_configuration: Optional[Dict[str, Any]] = None,
        source_bucket_arn: Optional[str] = None,
        airflow_version: Optional[str] = None,
        environment_class: Optional[str] = None,
        max_workers: Optional[int] = None,
        min_workers: Optional[int] = None,
        schedulers: Optional[int] = None,
        webserver_access_mode: Optional[str] = None,
        weekly_maintenance_window_start: Optional[str] = None,
        airflow_configuration_options: Optional[Dict[str, str]] = None,
        logging_configuration: Optional[Dict[str, Any]] = None,
        requirements_s3_path: Optional[str] = None,
        plugins_s3_path: Optional[str] = None,
        startup_script_s3_path: Optional[str] = None,
    ) -> Dict[str, Any]:
        """Update an existing MWAA environment configuration.
    
        Only provide the parameters you want to change.
    
        Args:
            name: Environment name
            dag_s3_path: S3 path to DAGs folder
            execution_role_arn: IAM role ARN
            network_configuration: VPC configuration
            source_bucket_arn: S3 bucket ARN
            airflow_version: Apache Airflow version
            environment_class: Environment size
            max_workers: Maximum workers
            min_workers: Minimum workers
            schedulers: Number of schedulers
            webserver_access_mode: Access mode
            weekly_maintenance_window_start: Maintenance window
            airflow_configuration_options: Configuration overrides
            logging_configuration: Logging settings
            requirements_s3_path: Path to requirements.txt
            plugins_s3_path: Path to plugins.zip
            startup_script_s3_path: Path to startup script
    
        Returns:
            Dictionary containing the environment ARN
        """
        max_workers_int = int(max_workers) if max_workers is not None else None
        min_workers_int = int(min_workers) if min_workers is not None else None
        schedulers_int = int(schedulers) if schedulers is not None else None
    
        return await tools.update_environment(
            name=name,
            dag_s3_path=dag_s3_path,
            execution_role_arn=execution_role_arn,
            network_configuration=network_configuration,
            source_bucket_arn=source_bucket_arn,
            airflow_version=airflow_version,
            environment_class=environment_class,
            max_workers=max_workers_int,
            min_workers=min_workers_int,
            schedulers=schedulers_int,
            webserver_access_mode=webserver_access_mode,
            weekly_maintenance_window_start=weekly_maintenance_window_start,
            airflow_configuration_options=airflow_configuration_options,
            logging_configuration=logging_configuration,
            requirements_s3_path=requirements_s3_path,
            plugins_s3_path=plugins_s3_path,
            startup_script_s3_path=startup_script_s3_path,
        )
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Explains the partial update pattern well, but with no annotations provided, it omits operational details critical for AWS mutations: permissions required (IAM), whether the update is atomic, potential downtime for Airflow environments, or if the operation is async/sync.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with purpose front-loaded, followed by usage constraint, Args block, and Returns. The Args block is necessarily lengthy given zero schema descriptions, but earns its place by providing essential parameter semantics.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Acknowledges the return value (environment ARN) which aligns with the existing output schema. However, for a complex 17-parameter AWS mutation tool, it lacks discussion of idempotency, update propagation delays, or validation behavior that would help an agent handle errors or retries.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description compensates by documenting all 16 optional parameters with concise semantic meanings (e.g., 'VPC configuration', 'Path to requirements.txt'). This successfully fills the schema gap, though it lacks format constraints or valid value ranges.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States specific action ('Update') and resource ('MWAA environment configuration'). The word 'existing' implicitly distinguishes it from the sibling 'create_environment', though it could explicitly contrast with creation/deletion siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'Only provide the parameters you want to change' provides crucial behavioral guidance for partial updates, indicating PATCH-like semantics. However, it lacks explicit guidance on when to choose this over 'create_environment' or 'delete_environment'.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/paschmaria/mwaa-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server