LambdaWeb / Client / create_web_function_endpoint

create_web_function_endpoint

LambdaWeb.Client.create_web_function_endpoint(**kwargs)

Creates an endpoint for a web function. An endpoint exposes the web function over HTTPS and routes traffic to one or more revisions.

To use this operation, you must have the CreateWebFunctionEndpoint permission on the web function, not on the endpoint being created.

Note

This API is experimental and for internal AWS use only. It is not yet available to external customers.

See also: AWS API Documentation

Request Syntax

response = client.create_web_function_endpoint(
    functionName='string',
    endpointName='string',
    description='string',
    endpointType='HomeRegion'|'MultiRegion'|'PerRegion',
    authType='ApplicationManaged'|'IamAuth',
    autoDeploymentMode='LatestRevision'|'Disabled',
    revisionWeights=[
        {
            'revisionId': 'string',
            'weight': 123
        },
    ],
    regions=[
        'string',
    ],
    scalingConfig={
        'maxEnvironments': 123
    },
    throttleConfig={
        'rateLimit': 123
    }
)
Parameters:
  • functionName (string) –

    [REQUIRED]

    The name of the web function to create the endpoint for. You can specify the function name or the function ARN. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.

  • endpointName (string) –

    [REQUIRED]

    The name of the endpoint to create. The name can contain letters, numbers, hyphens (-), and underscores (_), and can’t begin or end with a hyphen or an underscore. The length constraint applies only to the full ARN. If you specify only the endpoint name, it is limited to 64 characters in length.

  • description (string) – A description of the endpoint.

  • endpointType (string) –

    [REQUIRED]

    The type of endpoint to create. Determines how traffic is served and routed across Regions.

  • authType (string) –

    [REQUIRED]

    The authorization type for the endpoint.

  • autoDeploymentMode (string) – The auto-deployment mode for the endpoint. Controls whether the endpoint automatically serves the newest revision. If you don’t specify a value, the default is Disabled, and this default is returned in the response.

  • revisionWeights (list) –

    A list of revision weights that determine how traffic is distributed across revisions. Up to two revisions can be specified for canary or blue-green deployments.

    • (dict) –

      Specifies a revision and its traffic weight for an endpoint. Up to two revisions can be assigned weights to split traffic for canary or blue-green deployments.

      • revisionId (string) – [REQUIRED]

        The identifier of the revision.

      • weight (integer) – [REQUIRED]

        The percentage of traffic to route to this revision. Minimum value of 1, maximum value of 100.

  • regions (list) –

    The list of Regions for the endpoint. Required when the endpoint type is MultiRegion or PerRegion: specify at least one Region other than the Region where you create the endpoint (the home Region). The home Region is added automatically if you don’t include it; specifying only the home Region isn’t allowed. When the endpoint type is HomeRegion, omit this field or specify only the home Region.

    • (string) –

  • scalingConfig (dict) –

    The scaling configuration for the endpoint. There is no default value. If you don’t specify a scaling configuration, it is absent from the response.

    • maxEnvironments (integer) –

      The maximum number of concurrent execution environments for the endpoint. Minimum value of 2, maximum value of 10000. There is no default value. If you don’t specify a value, the scaling configuration is absent from the response. On an update, omit scalingConfig to keep the current value, or specify an empty object to clear a previously set value.

  • throttleConfig (dict) –

    The throttling configuration for the endpoint. There is no default value. If you don’t specify a throttling configuration, it is absent from the response.

    • rateLimit (integer) –

      The maximum request rate per second for the endpoint. The value must be one of the following supported values: 0, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, or 10000. The maximum effective value is also bounded by your account-level maximum total rate limit. There is no default value. If you don’t specify a value, the throttling configuration is absent from the response. On an update, omit throttleConfig to keep the current value, or specify an empty object to clear a previously set value.

Return type:

dict

Returns:

Response Syntax

{
    'functionArn': 'string',
    'endpointArn': 'string',
    'endpointName': 'string',
    'description': 'string',
    'endpointType': 'HomeRegion'|'MultiRegion'|'PerRegion',
    'domainName': 'string',
    'authType': 'ApplicationManaged'|'IamAuth',
    'autoDeploymentMode': 'LatestRevision'|'Disabled',
    'revisionWeights': [
        {
            'revisionId': 'string',
            'weight': 123
        },
    ],
    'regions': [
        'string',
    ],
    'scalingConfig': {
        'maxEnvironments': 123
    },
    'throttleConfig': {
        'rateLimit': 123
    },
    'state': 'Pending'|'Active'|'Failed'|'Deleting',
    'stateReason': 'string',
    'updateStatus': 'InProgress'|'Successful'|'Failed',
    'updateStatusReason': 'string',
    'regionalEndpoints': {
        'string': {
            'domainName': 'string',
            'authType': 'ApplicationManaged'|'IamAuth',
            'revisionWeights': [
                {
                    'revisionId': 'string',
                    'weight': 123
                },
            ],
            'scalingConfig': {
                'maxEnvironments': 123
            },
            'throttleConfig': {
                'rateLimit': 123
            },
            'state': 'Pending'|'Active'|'Failed'|'Deleting',
            'stateReason': 'string',
            'updateStatus': 'InProgress'|'Successful'|'Failed',
            'updateStatusReason': 'string'
        }
    },
    'createdAt': datetime(2015, 1, 1),
    'updatedAt': datetime(2015, 1, 1)
}

Response Structure

  • (dict) –

    Contains details about the created endpoint.

    • functionArn (string) –

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

    • endpointArn (string) –

      The Amazon Resource Name (ARN) of the endpoint.

    • endpointName (string) –

      The name of the endpoint.

    • description (string) –

      The description of the endpoint.

    • endpointType (string) –

      The type of a web function endpoint. Possible values: HomeRegion (serves from the Region where the function was created), MultiRegion (replicates across chosen Regions and routes to the nearest), PerRegion (separate endpoint per Region).

    • domainName (string) –

      The domain name assigned to the endpoint.

    • authType (string) –

      The authorization type for a web function endpoint. Possible values: ApplicationManaged (the function handles authorization), IamAuth (Lambda authorizes requests with AWS SigV4 and IAM).

    • autoDeploymentMode (string) –

      The auto-deployment mode for a web function endpoint. Possible values: LatestRevision (endpoint automatically serves the newest revision), Disabled (revision routing is fixed until explicitly changed).

    • revisionWeights (list) –

      The traffic distribution across revisions for the endpoint. Each entry maps a revision to a weight from 1 to 100.

      • (dict) –

        Specifies a revision and its traffic weight for an endpoint. Up to two revisions can be assigned weights to split traffic for canary or blue-green deployments.

        • revisionId (string) –

          The identifier of the revision.

        • weight (integer) –

          The percentage of traffic to route to this revision. Minimum value of 1, maximum value of 100.

    • regions (list) –

      The Regions configured for the endpoint.

      • (string) –

    • scalingConfig (dict) –

      The scaling configuration for a web function endpoint.

      • maxEnvironments (integer) –

        The maximum number of concurrent execution environments for the endpoint. Minimum value of 2, maximum value of 10000. There is no default value. If you don’t specify a value, the scaling configuration is absent from the response. On an update, omit scalingConfig to keep the current value, or specify an empty object to clear a previously set value.

    • throttleConfig (dict) –

      The throttling configuration for a web function endpoint.

      • rateLimit (integer) –

        The maximum request rate per second for the endpoint. The value must be one of the following supported values: 0, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, or 10000. The maximum effective value is also bounded by your account-level maximum total rate limit. There is no default value. If you don’t specify a value, the throttling configuration is absent from the response. On an update, omit throttleConfig to keep the current value, or specify an empty object to clear a previously set value.

    • state (string) –

      The current state of the endpoint.

    • stateReason (string) –

      The reason for the current state of the endpoint.

    • updateStatus (string) –

      The status of the most recent update to an endpoint. Possible values: InProgress (update is in progress), Successful (update completed successfully), Failed (update failed).

    • updateStatusReason (string) –

      The reason for the endpoint’s most recent update status.

    • regionalEndpoints (dict) –

      The list of regional endpoint configurations.

      • (string) –

        • (dict) –

          Represents the endpoint configuration and state in a specific Region.

          • domainName (string) –

            The domain name of the regional endpoint.

          • authType (string) –

            The authorization type for the regional endpoint.

          • revisionWeights (list) –

            The revision weights for the regional endpoint.

            • (dict) –

              Specifies a revision and its traffic weight for an endpoint. Up to two revisions can be assigned weights to split traffic for canary or blue-green deployments.

              • revisionId (string) –

                The identifier of the revision.

              • weight (integer) –

                The percentage of traffic to route to this revision. Minimum value of 1, maximum value of 100.

          • scalingConfig (dict) –

            The scaling configuration for the regional endpoint. This field is absent if the endpoint has no scaling configuration.

            • maxEnvironments (integer) –

              The maximum number of concurrent execution environments for the endpoint. Minimum value of 2, maximum value of 10000. There is no default value. If you don’t specify a value, the scaling configuration is absent from the response. On an update, omit scalingConfig to keep the current value, or specify an empty object to clear a previously set value.

          • throttleConfig (dict) –

            The throttling configuration for the regional endpoint. This field is absent if the endpoint has no throttling configuration.

            • rateLimit (integer) –

              The maximum request rate per second for the endpoint. The value must be one of the following supported values: 0, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, or 10000. The maximum effective value is also bounded by your account-level maximum total rate limit. There is no default value. If you don’t specify a value, the throttling configuration is absent from the response. On an update, omit throttleConfig to keep the current value, or specify an empty object to clear a previously set value.

          • state (string) –

            The current state of the regional endpoint.

          • stateReason (string) –

            The reason for the current state of the regional endpoint.

          • updateStatus (string) –

            The status of the most recent update to the regional endpoint.

          • updateStatusReason (string) –

            The reason for the current update status of the regional endpoint.

    • createdAt (datetime) –

      The date and time the endpoint was created.

    • updatedAt (datetime) –

      The date and time the endpoint was last updated.

Exceptions