Skip to content

LambdaFunctionRecommendation

Source code in docs_src/capo_compute_optimizer/types/lambda_function_recommendation.py
class LambdaFunctionRecommendation(TypedDict, closed=True):
    function_arn: NotRequired["capo_compute_optimizer.types.function_arn.FunctionArn"]
    """<p>The Amazon Resource Name (ARN) of the current function.</p>"""
    function_version: NotRequired[
        "capo_compute_optimizer.types.function_version.FunctionVersion"
    ]
    """<p>The version number of the current function.</p>"""
    account_id: NotRequired["capo_compute_optimizer.types.account_id.AccountId"]
    """<p>The Amazon Web Services account ID of the function.</p>"""
    current_memory_size: "capo_compute_optimizer.types.memory_size.MemorySize"
    """<p>The amount of memory, in MB, that's allocated to the current function.</p>"""
    number_of_invocations: (
        "capo_compute_optimizer.types.number_of_invocations.NumberOfInvocations"
    )
    """<p>The number of times your function code was applied during the look-back period.</p>"""
    utilization_metrics: NotRequired[
        "capo_compute_optimizer.types.lambda_function_utilization_metrics.LambdaFunctionUtilizationMetrics"
    ]
    """<p>An array of objects that describe the utilization metrics of the function.</p>"""
    lookback_period_in_days: (
        "capo_compute_optimizer.types.look_back_period_in_days.LookBackPeriodInDays"
    )
    """<p>The number of days for which utilization metrics were analyzed for the function.</p>"""
    last_refresh_timestamp: NotRequired[
        "capo_compute_optimizer.types.last_refresh_timestamp.LastRefreshTimestamp"
    ]
    """<p>The timestamp of when the function recommendation was last generated.</p>"""
    finding: NotRequired[
        "capo_compute_optimizer.types.lambda_function_recommendation_finding.LambdaFunctionRecommendationFinding"
    ]
    """<p>The finding classification of the function.</p> <p>Findings for functions include:</p> <ul> <li> <p> <b> <code>Optimized</code> </b> — The function is correctly provisioned to run your workload based on its current configuration and its utilization history. This finding classification does not include finding reason codes.</p> </li> <li> <p> <b> <code>NotOptimized</code> </b> — The function is performing at a higher level (over-provisioned) or at a lower level (under-provisioned) than required for your workload because its current configuration is not optimal. Over-provisioned resources might lead to unnecessary infrastructure cost, and under-provisioned resources might lead to poor application performance. This finding classification can include the <code>MemoryUnderprovisioned</code> and <code>MemoryUnderprovisioned</code> finding reason codes.</p> </li> <li> <p> <b> <code>Unavailable</code> </b> — Compute Optimizer was unable to generate a recommendation for the function. This could be because the function has not accumulated sufficient metric data, or the function does not qualify for a recommendation. This finding classification can include the <code>InsufficientData</code> and <code>Inconclusive</code> finding reason codes.</p> <note> <p>Functions with a finding of unavailable are not returned unless you specify the <code>filter</code> parameter with a value of <code>Unavailable</code> in your <code>GetLambdaFunctionRecommendations</code> request.</p> </note> </li> </ul>"""
    finding_reason_codes: NotRequired[
        "capo_compute_optimizer.types.lambda_function_recommendation_finding_reason_codes.LambdaFunctionRecommendationFindingReasonCodes"
    ]
    """<p>The reason for the finding classification of the function.</p> <note> <p>Functions that have a finding classification of <code>Optimized</code> don't have a finding reason code.</p> </note> <p>Finding reason codes for functions include:</p> <ul> <li> <p> <b> <code>MemoryOverprovisioned</code> </b> — The function is over-provisioned when its memory configuration can be sized down while still meeting the performance requirements of your workload. An over-provisioned function might lead to unnecessary infrastructure cost. This finding reason code is part of the <code>NotOptimized</code> finding classification.</p> </li> <li> <p> <b> <code>MemoryUnderprovisioned</code> </b> — The function is under-provisioned when its memory configuration doesn't meet the performance requirements of the workload. An under-provisioned function might lead to poor application performance. This finding reason code is part of the <code>NotOptimized</code> finding classification.</p> </li> <li> <p> <b> <code>InsufficientData</code> </b> — The function does not have sufficient metric data for Compute Optimizer to generate a recommendation. For more information, see the <a href="https://docs.aws.amazon.com/compute-optimizer/latest/ug/requirements.html">Supported resources and requirements</a> in the <i>Compute Optimizer User Guide</i>. This finding reason code is part of the <code>Unavailable</code> finding classification.</p> </li> <li> <p> <b> <code>Inconclusive</code> </b> — The function does not qualify for a recommendation because Compute Optimizer cannot generate a recommendation with a high degree of confidence. This finding reason code is part of the <code>Unavailable</code> finding classification.</p> </li> </ul>"""
    memory_size_recommendation_options: NotRequired[
        "capo_compute_optimizer.types.lambda_function_memory_recommendation_options.LambdaFunctionMemoryRecommendationOptions"
    ]
    """<p>An array of objects that describe the memory configuration recommendation options for the function.</p>"""
    current_performance_risk: NotRequired[
        "capo_compute_optimizer.types.current_performance_risk.CurrentPerformanceRisk"
    ]
    """<p>The risk of the current Lambda function not meeting the performance needs of its workloads. The higher the risk, the more likely the current Lambda function requires more memory.</p>"""
    effective_recommendation_preferences: NotRequired[
        "capo_compute_optimizer.types.lambda_effective_recommendation_preferences.LambdaEffectiveRecommendationPreferences"
    ]
    """<p> Describes the effective recommendation preferences for Lambda functions. </p>"""
    tags: NotRequired["capo_compute_optimizer.types.tags.Tags"]
    """<p> A list of tags assigned to your Lambda function recommendations. </p>"""

account_id instance-attribute

account_id: NotRequired[AccountId]

The Amazon Web Services account ID of the function.

current_memory_size instance-attribute

current_memory_size: MemorySize

The amount of memory, in MB, that's allocated to the current function.

current_performance_risk instance-attribute

current_performance_risk: NotRequired[CurrentPerformanceRisk]

The risk of the current Lambda function not meeting the performance needs of its workloads. The higher the risk, the more likely the current Lambda function requires more memory.

effective_recommendation_preferences instance-attribute

effective_recommendation_preferences: NotRequired[
    LambdaEffectiveRecommendationPreferences
]

Describes the effective recommendation preferences for Lambda functions.

finding instance-attribute

The finding classification of the function.

Findings for functions include:

  • Optimized — The function is correctly provisioned to run your workload based on its current configuration and its utilization history. This finding classification does not include finding reason codes.

  • NotOptimized — The function is performing at a higher level (over-provisioned) or at a lower level (under-provisioned) than required for your workload because its current configuration is not optimal. Over-provisioned resources might lead to unnecessary infrastructure cost, and under-provisioned resources might lead to poor application performance. This finding classification can include the MemoryUnderprovisioned and MemoryUnderprovisioned finding reason codes.

  • Unavailable — Compute Optimizer was unable to generate a recommendation for the function. This could be because the function has not accumulated sufficient metric data, or the function does not qualify for a recommendation. This finding classification can include the InsufficientData and Inconclusive finding reason codes.

    Functions with a finding of unavailable are not returned unless you specify the filter parameter with a value of Unavailable in your GetLambdaFunctionRecommendations request.

finding_reason_codes instance-attribute

finding_reason_codes: NotRequired[LambdaFunctionRecommendationFindingReasonCodes]

The reason for the finding classification of the function.

Functions that have a finding classification of Optimized don't have a finding reason code.

Finding reason codes for functions include:

  • MemoryOverprovisioned — The function is over-provisioned when its memory configuration can be sized down while still meeting the performance requirements of your workload. An over-provisioned function might lead to unnecessary infrastructure cost. This finding reason code is part of the NotOptimized finding classification.

  • MemoryUnderprovisioned — The function is under-provisioned when its memory configuration doesn't meet the performance requirements of the workload. An under-provisioned function might lead to poor application performance. This finding reason code is part of the NotOptimized finding classification.

  • InsufficientData — The function does not have sufficient metric data for Compute Optimizer to generate a recommendation. For more information, see the Supported resources and requirements in the Compute Optimizer User Guide. This finding reason code is part of the Unavailable finding classification.

  • Inconclusive — The function does not qualify for a recommendation because Compute Optimizer cannot generate a recommendation with a high degree of confidence. This finding reason code is part of the Unavailable finding classification.

function_arn instance-attribute

function_arn: NotRequired[FunctionArn]

The Amazon Resource Name (ARN) of the current function.

function_version instance-attribute

function_version: NotRequired[FunctionVersion]

The version number of the current function.

last_refresh_timestamp instance-attribute

last_refresh_timestamp: NotRequired[LastRefreshTimestamp]

The timestamp of when the function recommendation was last generated.

lookback_period_in_days instance-attribute

lookback_period_in_days: LookBackPeriodInDays

The number of days for which utilization metrics were analyzed for the function.

memory_size_recommendation_options instance-attribute

memory_size_recommendation_options: NotRequired[
    LambdaFunctionMemoryRecommendationOptions
]

An array of objects that describe the memory configuration recommendation options for the function.

number_of_invocations instance-attribute

number_of_invocations: NumberOfInvocations

The number of times your function code was applied during the look-back period.

tags instance-attribute

tags: NotRequired[Tags]

A list of tags assigned to your Lambda function recommendations.

utilization_metrics instance-attribute

utilization_metrics: NotRequired[LambdaFunctionUtilizationMetrics]

An array of objects that describe the utilization metrics of the function.