/aws-sdk-java-v2-lambda
Provides AWS Lambda patterns using AWS SDK for Java 2.x. Use when invoking Lambda functions, creating/updating functions, managing function configurations, working with Lambda layers, or integrating Lambda with Spring Boot applications.
$ npx -y skills add giuseppe-trisciuoglio/developer-kit --skill aws-sdk-java-v2-lambda --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/aws-sdk-java-v2-lambda
Context preview
The summary Claude sees to decide when to auto-load this skill.
Provides AWS Lambda patterns using AWS SDK for Java 2.x. Use when invoking Lambda functions, creating/updating functions, managing function configurations, working with Lambda layers, or integrating Lambda with Spring Boot applications.
SKILL.md
aws-sdk-java-v2-lambda.SKILL.mdname: aws-sdk-java-v2-lambda
description: Provides AWS Lambda patterns using AWS SDK for Java 2.x. Use when invoking Lambda functions, creating/updating functions, managing function configurations, working with Lambda layers, or integrating Lambda with Spring Boot applications.
allowed-tools: Read, Write, Edit, Bash, Glob, Grep
AWS SDK for Java 2.x - AWS Lambda
Overview
AWS Lambda is a compute service that runs code without managing servers. Use this skill to implement AWS Lambda operations using AWS SDK for Java 2.x in applications and services.
When to Use
- Invoking Lambda functions from Java applications
- Deploying and updating Lambda functions via SDK
- Managing function configurations and layers
- Integrating Lambda with Spring Boot applications
Quick Reference
| Operation | SDK Method | Use Case | |-----------|------------|----------| | **Invoke** | `invoke()` | Synchronous/async function invocation | | **List Functions** | `listFunctions()` | Get all Lambda functions | | **Get Config** | `getFunction()` | Retrieve function configuration | | **Create Function** | `createFunction()` | Create new Lambda function | | **Update Code** | `updateFunctionCode()` | Deploy new function code | | **Update Config** | `updateFunctionConfiguration()` | Modify settings (timeout, memory, env vars) | | **Delete Function** | `deleteFunction()` | Remove Lambda function |
Instructions
1. Add Dependencies
Include Lambda SDK dependency in `pom.xml`:
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>lambda</artifactId>
</dependency>See [client-setup.md](references/client-setup.md) for complete setup.
2. Create Client
Instantiate `LambdaClient` with proper configuration:
LambdaClient lambdaClient = LambdaClient.builder()
.region(Region.US_EAST_1)
.build();For async operations, use `LambdaAsyncClient`.
3. Invoke Lambda Function
Synchronous invocation:
InvokeRequest request = InvokeRequest.builder()
.functionName("my-function")
.payload(SdkBytes.fromUtf8String(payload))
.build();
InvokeResponse response = lambdaClient.invoke(request);
return response.payload().asUtf8String();See [invocation-patterns.md](references/invocation-patterns.md) for patterns.
4. Handle Responses
Parse response payloads and check for errors:
if (response.functionError() != null) {
throw new LambdaInvocationException("Lambda error: " + response.functionError());
}
String result = response.payload().asUtf8String();5. Manage Functions
Create, update, or delete Lambda functions:
// Create
CreateFunctionRequest createRequest = CreateFunctionRequest.builder()
.functionName("my-function")
.runtime(Runtime.JAVA17)
.role(roleArn)
.code(code)
.build();
lambdaClient.createFunction(createRequest);
// Verify function is active before proceeding
GetFunctionRequest getRequest = GetFunctionRequest.builder()
.functionName("my-function")
.build();
GetFunctionResponse getResponse = lambdaClient.getFunction(getRequest);
if (!"Active".equals(getResponse.configuration().state())) {
throw new IllegalStateException("Function not active: " + getResponse.configuration().stateReason());
}
// Update code
UpdateFunctionCodeRequest updateCodeRequest = UpdateFunctionCodeRequest.builder()
.functionName("my-function")
.zipFile(SdkBytes.fromByteArray(zipBytes))
.build();
lambdaClient.updateFunctionCode(updateCodeRequest);
// Wait for deployment to complete
Waiter<GetFunctionConfigurationRequest> waiter = lambdaClient.waiter();
waiter.waitUntilFunctionUpdatedActive(GetFunctionConfigurationRequest.builder()
.functionName("my-function")
.build());See [function-management.md](references/function-management.md) for complete patterns.
6. Configure Environment
Set environment variables and concurrency limits:
Environment env = Environment.builder()
.variables(Map.of(
"DB_URL", "jdbc:postgresql://db",
"LOG_LEVEL", "INFO"
))
.build();
UpdateFunctionConfigurationRequest configRequest = UpdateFunctionConfigurationRequest.builder()
.functionName("my-function")
.environment(env)
.timeout(60)
.memorySize(512)
.build();
lambdaClient.updateFunctionConfiguration(configRequest);7. Integrate with Spring Boot
Configure Lambda beans and services:
@Configuration
public class LambdaConfiguration {
@Bean
public LambdaClient lambdaClient() {
return LambdaClient.builder()
.region(Region.US_EAST_1)
.build();
}
}
@Service
public class LambdaInvokerService {
public <T, R> R invoke(String functionName, T request, Class<R> responseType) {
// Implementation
}
}See [spring-boot-integration.md](references/spring-boot-integration.md) for complete integration.
8. Test Locally
Use mocks or LocalStack for development testing.
See [testing.md](references/testing.md) for testing patterns.
Examples
Basic Invocation
public String invokeFunction(LambdaClient client, String functionName, String payload) {
InvokeRequest request = InvokeRequest.builder()
.functionName(functionName)
.payload(SdkBytes.fromUtf8String(payload))
.build();
InvokeResponse response = client.invoke(request);
if (response.functionError() != null) {
throw new RuntimeException("Lambda error: " + response.functionError());
}
return response.payload().asUtf8String();
}Async Invocation
public void invokeAsync(LambdaClient client, String functionName, Map<String, Object> event) {
String jsonPayload = new ObjectMapper().writeValueAsString(event);
InvokeRequest request = InvokeRequest.builder()
.functionName(functionName)
.invocationType(InvocationType.EVENT)
.payload(SdkBytes.fromUtf8String(jsonPayload))
.build();Read more
name: aws-sdk-java-v2-lambda description: Provides AWS Lambda patterns using AWS SDK for Java 2.x. Use when invoking Lambda functions, creating/updating functions, managing function configurations, working with Lambda layers, or integrating Lambda with Spring Boot applications. allowed-tools: Read, Write, Edit, Bash, Glob, Grep
AWS SDK for Java 2.x - AWS Lambda
Overview
AWS Lambda is a compute service that runs code without managing servers. Use this skill to implement AWS Lambda operations using AWS SDK for Java 2.x in applications and services.
When to Use
- Invoking Lambda functions from Java applications
- Deploying and updating Lambda functions via SDK
- Managing function configurations and layers
- Integrating Lambda with Spring Boot applications
Quick Reference
| Operation | SDK Method | Use Case | |-----------|------------|----------| | **Invoke** | `invoke()` | Synchronous/async function invocation | | **List Functions** | `listFunctions()` | Get all Lambda functions | | **Get Config** | `getFunction()` | Retrieve function configuration | | **Create Function** | `createFunction()` | Create new Lambda function | | **Update Code** | `updateFunctionCode()` | Deploy new function code | | **Update Config** | `updateFunctionConfiguration()` | Modify settings (timeout, memory, env vars) | | **Delete Function** | `deleteFunction()` | Remove Lambda function |
Instructions
1. Add Dependencies
Include Lambda SDK dependency in `pom.xml`:
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>lambda</artifactId>
</dependency>See [client-setup.md](references/client-setup.md) for complete setup.
2. Create Client
Instantiate `LambdaClient` with proper configuration:
LambdaClient lambdaClient = LambdaClient.builder()
.region(Region.US_EAST_1)
.build();For async operations, use `LambdaAsyncClient`.
3. Invoke Lambda Function
Synchronous invocation:
InvokeRequest request = InvokeRequest.builder()
.functionName("my-function")
.payload(SdkBytes.fromUtf8String(payload))
.build();
InvokeResponse response = lambdaClient.invoke(request);
return response.payload().asUtf8String();See [invocation-patterns.md](references/invocation-patterns.md) for patterns.
4. Handle Responses
Parse response payloads and check for errors:
if (response.functionError() != null) {
throw new LambdaInvocationException("Lambda error: " + response.functionError());
}
String result = response.payload().asUtf8String();5. Manage Functions
Create, update, or delete Lambda functions:
// Create
CreateFunctionRequest createRequest = CreateFunctionRequest.builder()
.functionName("my-function")
.runtime(Runtime.JAVA17)
.role(roleArn)
.code(code)
.build();
lambdaClient.createFunction(createRequest);
// Verify function is active before proceeding
GetFunctionRequest getRequest = GetFunctionRequest.builder()
.functionName("my-function")
.build();
GetFunctionResponse getResponse = lambdaClient.getFunction(getRequest);
if (!"Active".equals(getResponse.configuration().state())) {
throw new IllegalStateException("Function not active: " + getResponse.configuration().stateReason());
}
// Update code
UpdateFunctionCodeRequest updateCodeRequest = UpdateFunctionCodeRequest.builder()
.functionName("my-function")
.zipFile(SdkBytes.fromByteArray(zipBytes))
.build();
lambdaClient.updateFunctionCode(updateCodeRequest);
// Wait for deployment to complete
Waiter<GetFunctionConfigurationRequest> waiter = lambdaClient.waiter();
waiter.waitUntilFunctionUpdatedActive(GetFunctionConfigurationRequest.builder()
.functionName("my-function")
.build());See [function-management.md](references/function-management.md) for complete patterns.
6. Configure Environment
Set environment variables and concurrency limits:
Environment env = Environment.builder()
.variables(Map.of(
"DB_URL", "jdbc:postgresql://db",
"LOG_LEVEL", "INFO"
))
.build();
UpdateFunctionConfigurationRequest configRequest = UpdateFunctionConfigurationRequest.builder()
.functionName("my-function")
.environment(env)
.timeout(60)
.memorySize(512)
.build();
lambdaClient.updateFunctionConfiguration(configRequest);7. Integrate with Spring Boot
Configure Lambda beans and services:
@Configuration
public class LambdaConfiguration {
@Bean
public LambdaClient lambdaClient() {
return LambdaClient.builder()
.region(Region.US_EAST_1)
.build();
}
}
@Service
public class LambdaInvokerService {
public <T, R> R invoke(String functionName, T request, Class<R> responseType) {
// Implementation
}
}See [spring-boot-integration.md](references/spring-boot-integration.md) for complete integration.
8. Test Locally
Use mocks or LocalStack for development testing.
See [testing.md](references/testing.md) for testing patterns.
Examples
Basic Invocation
public String invokeFunction(LambdaClient client, String functionName, String payload) {
InvokeRequest request = InvokeRequest.builder()
.functionName(functionName)
.payload(SdkBytes.fromUtf8String(payload))
.build();
InvokeResponse response = client.invoke(request);
if (response.functionError() != null) {
throw new RuntimeException("Lambda error: " + response.functionError());
}
return response.payload().asUtf8String();
}Async Invocation
public void invokeAsync(LambdaClient client, String functionName, Map<String, Object> event) {
String jsonPayload = new ObjectMapper().writeValueAsString(event);
InvokeRequest request = InvokeRequest.builder()
.functionName(functionName)
.invocationType(InvocationType.EVENT)
.payload(SdkBytes.fromUtf8String(jsonPayload))
.build();Showing the first part of this file.
Modular plugin marketplace for Claude Code and agentic CLIs, with validated, spec-driven skills, agents, commands, and workflows for Java, TypeScript, Python, PHP, AWS, and AI.
Repo: giuseppe-trisciuoglio/developer-kit
Other skills on developer-kit.
- /chunking-strategy
Provides chunking strategies for RAG systems. Generates chunk size recommendations (256-1024 tokens), overlap percentages (10-20%), and semantic boundary detection methods. Validates semantic coherence and evaluates retrieval precision/recall metrics. Use when building
Open skill - /prompt-engineering
Provides workflows to write, debug, and optimize prompts for LLMs, including few-shot example selection, chain-of-thought structuring, system prompt design, and template composition. Use when the user asks to write or improve a prompt, wants help with few-shot examples,
Open skill - /rag
Implements document chunking, embedding generation, vector storage, and retrieval pipelines for Retrieval-Augmented Generation systems. Use when building RAG applications, creating document Q&A systems, or integrating AI with knowledge bases.
Open skill - /aws-cloudformation-auto-scaling
Provides AWS CloudFormation patterns for Auto Scaling including EC2, ECS, and Lambda. Use when creating Auto Scaling groups, launch configurations, launch templates, scaling policies, lifecycle hooks, and predictive scaling. Covers template structure with Parameters, Outputs,
Open skill - /aws-cloudformation-bedrock
Provides AWS CloudFormation patterns for Amazon Bedrock resources including agents, knowledge bases, data sources, guardrails, prompts, flows, and inference profiles. Use when creating Bedrock agents with action groups, implementing RAG with knowledge bases, configuring vector
Open skill - /aws-cloudformation-cloudfront
Provides AWS CloudFormation patterns for CloudFront distributions, origins (ALB, S3, Lambda@Edge, VPC Origins), CacheBehaviors, Functions, SecurityHeaders, parameters, Outputs and cross-stack references. Use when creating CloudFront distributions with CloudFormation, configuring
Open skill

