plugins/developer-kit-java/skills/aws-sdk-java-v2-lambda/SKILL.md
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 skillsauth add giuseppe-trisciuoglio/developer-kit aws-sdk-java-v2-lambdaInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
| 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 |
Include Lambda SDK dependency in pom.xml:
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>lambda</artifactId>
</dependency>
See client-setup.md for complete setup.
Instantiate LambdaClient with proper configuration:
LambdaClient lambdaClient = LambdaClient.builder()
.region(Region.US_EAST_1)
.build();
For async operations, use LambdaAsyncClient.
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 for patterns.
Parse response payloads and check for errors:
if (response.functionError() != null) {
throw new LambdaInvocationException("Lambda error: " + response.functionError());
}
String result = response.payload().asUtf8String();
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 for complete patterns.
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);
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 for complete integration.
Use mocks or LocalStack for development testing.
See testing.md for testing patterns.
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();
}
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();
client.invoke(request);
}
@Service
public class LambdaService {
private final LambdaClient lambdaClient;
public UserResponse processUser(UserRequest request) {
String payload = objectMapper.writeValueAsString(request);
InvokeResponse response = lambdaClient.invoke(
InvokeRequest.builder()
.functionName("user-processor")
.payload(SdkBytes.fromUtf8String(payload))
.build()
);
return objectMapper.readValue(
response.payload().asUtf8String(),
UserResponse.class
);
}
}
See examples.md for more examples.
LambdaClient/LambdaAsyncClient once; they are thread-safeLambdaAsyncClient with CompletableFutureActive after create/update operationsRuntime.JAVA17 or newer for improved cold start performanceaws-sdk-java-v2-core — Core AWS SDK patterns and client configurationspring-boot-dependency-injection — Spring dependency injection best practicesunit-test-service-layer — Service testing patterns with Mockitospring-boot-actuator — Production monitoring and health checksdevelopment
Provides security review capability for TypeScript/Node.js applications, validates code against XSS, injection, CSRF, JWT/OAuth2 flaws, dependency CVEs, and secrets exposure. Use when performing security audits, before deployment, reviewing authentication/authorization implementations, or ensuring OWASP compliance for Express, NestJS, and Next.js. Triggers on "security review", "check for security issues", "TypeScript security audit".
development
Provides final code cleanup after task review approval. Removes debug logs, temporary comments, dead code, optimizes imports, and improves readability. Use when asked to clean up code, polish, finalize, tidy up, remove technical debt, or prepare code for completion after review. Not for refactoring logic or fixing bugs—focused solely on cosmetic and hygiene cleanup.
tools
Ralph Wiggum-inspired automation loop for specification-driven development. Orchestrates task implementation, review, cleanup, and synchronization using a Python script. Use when: user runs /loop command, user asks to automate task implementation, user wants to iterate through spec tasks step-by-step, or user wants to run development workflow automation with context window management. One step per invocation. State machine: init → choose_task → implementation → review → fix → cleanup → sync → update_done. Supports --from-task and --to-task for task range filtering. State persisted in fix_plan.json.
testing
Creates, updates, validates, and displays the architectural DNA of a project through two shared documents: docs/specs/architecture.md (technology stack, architectural rules, security constraints, AI guardrails) and docs/specs/ontology.md (domain glossary / Ubiquitous Language). Use BEFORE brainstorm as a project setup step, or at any point in the SDD lifecycle to validate specs/tasks against architecture principles. Triggers on 'create constitution', 'update constitution', 'constitution check', 'validate against constitution', 'project principles', 'architectural guardrails', 'setup project architecture', 'define ontology'.