CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/maven-com-amazonaws--aws-java-sdk-lambda

AWS Java SDK client for communicating with AWS Lambda Service for function management, invocation, and resource control

Pending
Overview
Eval results
Files

function-url-management.mddocs/

Function URL Management

Lambda Function URLs provide dedicated HTTP(S) endpoints for direct function invocation without requiring API Gateway. This capability enables simplified web applications and microservices with native Lambda integration.

Capabilities

Create Function URL Configuration

Creates a dedicated HTTP(S) endpoint for a Lambda function with configurable authentication and CORS settings.

/**
 * Creates a Lambda function URL with the specified configuration parameters
 * @param createFunctionUrlConfigRequest - Configuration for the function URL
 * @return CreateFunctionUrlConfigResult containing the function URL and creation details
 */
CreateFunctionUrlConfigResult createFunctionUrlConfig(CreateFunctionUrlConfigRequest createFunctionUrlConfigRequest);

Usage Example:

import com.amazonaws.services.lambda.*;
import com.amazonaws.services.lambda.model.*;

AWSLambda lambdaClient = AWSLambdaClientBuilder.standard()
    .withRegion("us-east-1")
    .build();

// Create function URL with IAM authentication
CreateFunctionUrlConfigRequest createRequest = new CreateFunctionUrlConfigRequest()
    .withFunctionName("my-function")
    .withAuthType(FunctionUrlAuthType.AWS_IAM)
    .withCors(new Cors()
        .withAllowCredentials(true)
        .withAllowHeaders("Content-Type", "X-Amz-Date")
        .withAllowMethods("GET", "POST")
        .withAllowOrigins("*")
        .withMaxAge(300));

CreateFunctionUrlConfigResult result = lambdaClient.createFunctionUrlConfig(createRequest);
System.out.println("Function URL: " + result.getFunctionUrl());

Get Function URL Configuration

Retrieves the current configuration for a Lambda function URL.

/**
 * Returns details about a Lambda function URL
 * @param getFunctionUrlConfigRequest - Request specifying the function name
 * @return GetFunctionUrlConfigResult with URL configuration details
 */
GetFunctionUrlConfigResult getFunctionUrlConfig(GetFunctionUrlConfigRequest getFunctionUrlConfigRequest);

Update Function URL Configuration

Modifies the configuration of an existing Lambda function URL.

/**
 * Updates the configuration for a Lambda function URL
 * @param updateFunctionUrlConfigRequest - Updated configuration parameters
 * @return UpdateFunctionUrlConfigResult with updated configuration
 */
UpdateFunctionUrlConfigResult updateFunctionUrlConfig(UpdateFunctionUrlConfigRequest updateFunctionUrlConfigRequest);

Delete Function URL Configuration

Removes the function URL configuration, making the endpoint no longer accessible.

/**
 * Deletes a Lambda function URL
 * @param deleteFunctionUrlConfigRequest - Request specifying the function name
 * @return DeleteFunctionUrlConfigResult confirming deletion
 */
DeleteFunctionUrlConfigResult deleteFunctionUrlConfig(DeleteFunctionUrlConfigRequest deleteFunctionUrlConfigRequest);

List Function URL Configurations

Retrieves a list of function URLs for the specified function.

/**
 * Returns a list of Lambda function URLs for the specified function
 * @param listFunctionUrlConfigsRequest - Request with function name and optional filters
 * @return ListFunctionUrlConfigsResult containing function URL configurations
 */
ListFunctionUrlConfigsResult listFunctionUrlConfigs(ListFunctionUrlConfigsRequest listFunctionUrlConfigsRequest);

Types

// Authentication types for function URLs
public enum FunctionUrlAuthType {
    AWS_IAM, NONE
}

// CORS configuration for function URLs
public class Cors {
    private Boolean allowCredentials;
    private java.util.List<String> allowHeaders;
    private java.util.List<String> allowMethods;
    private java.util.List<String> allowOrigins;
    private java.util.List<String> exposeHeaders;
    private Integer maxAge;
    // ... getters and setters
}

// Function URL configuration
public class FunctionUrlConfig {
    private String functionUrl;
    private String functionArn;
    private String creationTime;
    private String lastModifiedTime;
    private FunctionUrlAuthType authType;
    private Cors cors;
    // ... getters and setters
}

Install with Tessl CLI

npx tessl i tessl/maven-com-amazonaws--aws-java-sdk-lambda

docs

account-settings.md

alias-version-management.md

client-management.md

concurrency-performance.md

event-source-mapping.md

function-invocation.md

function-management.md

function-url-management.md

high-level-invocation.md

index.md

layer-management.md

permissions-policies.md

runtime-management.md

security-code-signing.md

tagging.md

waiters-polling.md

tile.json