Skip to content

Get Lambda Function Recommendations

computeoptimizer_get_lambda_function_recommendations R Documentation

Returns Lambda function recommendations

Description

Returns Lambda function recommendations.

Compute Optimizer generates recommendations for functions that meet a specific set of requirements. For more information, see the Supported resources and requirements in the Compute Optimizer User Guide.

Usage

computeoptimizer_get_lambda_function_recommendations(functionArns,
  accountIds, filters, nextToken, maxResults)

Arguments

functionArns

The Amazon Resource Name (ARN) of the functions for which to return recommendations.

You can specify a qualified or unqualified ARN. If you specify an unqualified ARN without a function version suffix, Compute Optimizer will return recommendations for the latest (⁠$LATEST⁠) version of the function. If you specify a qualified ARN with a version suffix, Compute Optimizer will return recommendations for the specified function version. For more information about using function versions, see Using versions in the Lambda Developer Guide.

accountIds

The ID of the Amazon Web Services account for which to return function recommendations.

If your account is the management account of an organization, use this parameter to specify the member account for which you want to return function recommendations.

Only one account ID can be specified per request.

filters

An array of objects to specify a filter that returns a more specific list of function recommendations.

nextToken

The token to advance to the next page of function recommendations.

maxResults

The maximum number of function recommendations to return with a single request.

To retrieve the remaining results, make another request with the returned nextToken value.

Value

A list with the following syntax:

list(
  nextToken = "string",
  lambdaFunctionRecommendations = list(
    list(
      functionArn = "string",
      functionVersion = "string",
      accountId = "string",
      currentMemorySize = 123,
      numberOfInvocations = 123,
      utilizationMetrics = list(
        list(
          name = "Duration"|"Memory",
          statistic = "Maximum"|"Average",
          value = 123.0
        )
      ),
      lookbackPeriodInDays = 123.0,
      lastRefreshTimestamp = as.POSIXct(
        "2015-01-01"
      ),
      finding = "Optimized"|"NotOptimized"|"Unavailable",
      findingReasonCodes = list(
        "MemoryOverprovisioned"|"MemoryUnderprovisioned"|"InsufficientData"|"Inconclusive"
      ),
      memorySizeRecommendationOptions = list(
        list(
          rank = 123,
          memorySize = 123,
          projectedUtilizationMetrics = list(
            list(
              name = "Duration",
              statistic = "LowerBound"|"UpperBound"|"Expected",
              value = 123.0
            )
          ),
          savingsOpportunity = list(
            savingsOpportunityPercentage = 123.0,
            estimatedMonthlySavings = list(
              currency = "USD"|"CNY",
              value = 123.0
            )
          ),
          savingsOpportunityAfterDiscounts = list(
            savingsOpportunityPercentage = 123.0,
            estimatedMonthlySavings = list(
              currency = "USD"|"CNY",
              value = 123.0
            )
          )
        )
      ),
      currentPerformanceRisk = "VeryLow"|"Low"|"Medium"|"High",
      effectiveRecommendationPreferences = list(
        savingsEstimationMode = list(
          source = "PublicPricing"|"CostExplorerRightsizing"|"CostOptimizationHub"
        )
      ),
      tags = list(
        list(
          key = "string",
          value = "string"
        )
      )
    )
  )
)

Request syntax

svc$get_lambda_function_recommendations(
  functionArns = list(
    "string"
  ),
  accountIds = list(
    "string"
  ),
  filters = list(
    list(
      name = "Finding"|"FindingReasonCode",
      values = list(
        "string"
      )
    )
  ),
  nextToken = "string",
  maxResults = 123
)