:doc:`Lambda <../../lambda>` / Client / put_function_scaling_config

***************************
put_function_scaling_config
***************************



.. py:method:: Lambda.Client.put_function_scaling_config(**kwargs)

  

  Sets the scaling configuration for a Lambda Managed Instances function. The scaling configuration defines the minimum and maximum number of execution environments that can be provisioned for the function, allowing you to control scaling behavior and resource allocation.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/PutFunctionScalingConfig>`_  


  **Request Syntax**
  ::

    response = client.put_function_scaling_config(
        FunctionName='string',
        Qualifier='string',
        FunctionScalingConfig={
            'MinExecutionEnvironments': 123,
            'MaxExecutionEnvironments': 123
        }
    )
    
  :type FunctionName: string
  :param FunctionName: **[REQUIRED]** 

    The name or ARN of the Lambda function.

    

  
  :type Qualifier: string
  :param Qualifier: **[REQUIRED]** 

    Specify a version or alias to set the scaling configuration for a published version of the function.

    

  
  :type FunctionScalingConfig: dict
  :param FunctionScalingConfig: 

    The scaling configuration to apply to the function, including minimum and maximum execution environment limits.

    

  
    - **MinExecutionEnvironments** *(integer) --* 

      The minimum number of execution environments to maintain for the function.

      

    
    - **MaxExecutionEnvironments** *(integer) --* 

      The maximum number of execution environments that can be provisioned for the function.

      

    
  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'FunctionState': 'Pending'|'Active'|'Inactive'|'Failed'|'Deactivating'|'Deactivated'|'ActiveNonInvocable'|'Deleting'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **FunctionState** *(string) --* 

        The current state of the function after applying the scaling configuration.

        
  
  **Exceptions**
  
  *   :py:class:`Lambda.Client.exceptions.InvalidParameterValueException`

  
  *   :py:class:`Lambda.Client.exceptions.ResourceConflictException`

  
  *   :py:class:`Lambda.Client.exceptions.ServiceException`

  
  *   :py:class:`Lambda.Client.exceptions.TooManyRequestsException`

  
  *   :py:class:`Lambda.Client.exceptions.ResourceNotFoundException`

  