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.
What this skill does
# 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`:
```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:
```java
LambdaClient lambdaClient = LambdaClient.builder()
.region(Region.US_EAST_1)
.build();
```
For async operations, use `LambdaAsyncClient`.
### 3. Invoke Lambda Function
Synchronous invocation:
```java
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:
```java
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:
```java
// 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:
```java
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:
```java
@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
```java
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
```java
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);
}
```
### Spring Boot Service
```java
@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](references/examples.md) for more examples.
## Best Practices
- **Reuse clients**: Create `LambdaClient`/`LambdaAsyncClient` once; they are thread-safe
- **Use async client**: For fire-and-forget invocations, use `LambdaAsyncClient` with `CompletableFuture`
- **Verify deployments**: Always wait for function state to be `Active` after create/update operations
- **Limit payload size**: Keep request/response payloads under 256KB for async, 6MB for sync invocations
- **Configure timeouts**: Set client read timeout slightly higher than Lambda function timeout
- **Use latest runtime**: Specify `Runtime.JAVA17` or newer for improved cold start performance
## Constraints and Warnings
- **Payload Limit**: 6MB (sync), 256KB (async invocation)
- **Timeout**: Max 900 seconds (15 minutes) per invocation
- **Cold Starts**: JVM-based functions have longer cold starts; use GraalVM Native Image for improvement
- **Deployment Size**: Function code + layers must not exceed 50MB (zipped) or 250MB (unzipped)
- **Concurrency**: Default 1000 per region; use reserved concurrency to guarantee capacity
- **Cost**: Monitor with CloudWatch metrics; set billing alerts to prevent runaway costs
## References
- **[client-setup.md](references/client-setup.md)** — Client configuration and setup
- **[invocation-patterns.md](references/invocation-patterns.md)** — Synchronous and async invocation patterns
- **[function-management.md](references/function-management.md)** — Create, update, delete functions
- **[spring-boot-integration.md](references/spring-boot-integration.md)** — Spring Boot configuration and services
- **[testing.md](references/testing.md)** — Unit and intRelated in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.