Skip to content
Skills Library
DevOps & cloud · Building & coding

serverless-aws

/serverless-aws

Patterns for AWS Lambda, DynamoDB, SQS, and Secrets Manager. Use when working on serverless AWS projects.

Repository
dotfiles ↗
Licence
MIT
Last repository change
21.10.2026

Assessment and security

95/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content30 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 21.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Patterns for AWS Lambda, DynamoDB, SQS, and Secrets Manager. Use when working on serverless AWS projects.

Original author description

Patterns for AWS Lambda, DynamoDB, SQS, and Secrets Manager. Use when working on serverless AWS projects.

How it works

  1. When to Use
  2. Lambda Handler Structure
  3. Cold Start Optimization
  4. SQS Processing
  5. External API Calls
  6. Deduplication
Original SKILL.md headings · 117 lines, 300 words
SKILL.md preview
---
name: serverless-aws
description: Patterns for AWS Lambda, DynamoDB, SQS, and Secrets Manager. Use when working on serverless AWS projects.
---

# Serverless AWS Skill

Patterns for AWS Lambda, DynamoDB, SQS, and Secrets Manager.

## When to Use

Apply when working on serverless AWS projects using Lambda functions.

## Lambda Handler Structure

```typescript
export async function handle(event: AWSLambda.APIGatewayProxyEvent) {
    try {
        return await handleInternal(event);
    } catch (error) {
        await trace.error(error, { headers: event.headers, body: event.body });
        return createErrorResponse(error);
    }
}

async function handleInternal(event: AWSLambda.APIGatewayProxyEvent) {
    const isAuthenticated = await authenticateRequest(event);
    if (!isAuthenticated) return unauthorizedResponse();

    const body = JSON.parse(event.body);
    assert(isValidInput(body), 'Invalid request body');
    return processRequest(body);
}
```

## Cold Start Optimization

Initialize clients outside handler:

```typescript
import { DynamoDBClient } from '@aws-sdk/client-dynamodb';

const dynamoClient = new DynamoDBClient({ region: 'us-east-1' });

let configCache: Config;

export async function handle(event: any) {
    if (!configCache) configCache = await loadConfig();
    return process(event, configCache);
}
```

## SQS Processing

```typescript
export async function handle(event: SQSEvent) {
    assert(event.Records.length === 1, 'Expected single record');
    
    const record = event.Records[0];
    const message = JSON.parse(record.body);
    const type = record.messageAttributes?.type?.stringValue;

    switch (type) {
        case 'ORDER_UPDATE': return handleOrderUpdate(message);
        case 'CUSTOMER_SYNC': return handleCustomerSync(message);
        default: console.warn('Unknown message type', type);
    }
}
```

## External API Calls

```typescript
export async function callExternalAPI(endpoint: string, data: any) {
    const config = await getServiceConfig();
    
    try {
        const response = await fetch(`${config.base_url}${endpoint}`, {
            method: 'POST',
            headers: {
                'Authorization': `Bearer ${config.api_key}`,
                'Content-Type': 'application/json'
            },
            body: JSON.stringify(data)
        });
        
        if (!response.ok) {
            throw new StatusCodeError(response.status, await response.text());
        }
        
        return response.json();
    } catch (error) {
        await trace.error('External API call failed', { endpoint, error });
        throw error;
    }
}
```

## Deduplication

```typescript
const processedEvents = new Map<string, number>();

function isDuplicate(eventId: string): boolean {
    const now = Date.now();
    const fiveMinutesAgo = now - (5 * 60 * 1000);
    
    // Clean old entries
    for (const [id, timestamp] of processedEvents.entries()) {
        if (timestamp < fiveMinutesAgo) {
            processedEvents.delete(id);
        }
    }
    
    if (processedEvents.has(eventId)) return true;
    
    processedEvents.set(eventId, now);
    return false;
}
```

Versions

The database has no other skills named serverless-aws.

Database snapshot: 13.11.2026 · package version 7820e1cedb67 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100aws-serverless
    Provides AWS serverless architecture patterns for Lambda, API Gateway, DynamoDB, SQS, and SAM/CDK. Use when working with AWS serverless files (serverless.yml, CDK stacks) or when the user mentions Lambda, API Gateway, serverless, or AWS SAM.
  • 90aws-serverless
    Use when implementing production serverless workloads on AWS — writing Lambda handler code, wiring API Gateway / DynamoDB Streams / SQS / SNS event-driven flows, SAM or CDK deployment, or fixing cold starts. Triggers: 'write a Lambda function', 'SAM template', 'API Gateway +…
  • 95aws-skills
    AWS development with CDK best practices, serverless patterns, cost optimization, and event-driven architecture. Use when deploying to AWS, writing Lambda functions, configuring API Gateway, working with DynamoDB, S3, or any AWS service.
  • 100aws-serverless-patterns
    AWS Lambda, API Gateway, DynamoDB, Step Functions, EventBridge patterns and best practices. Use when building or reviewing serverless backends, CDK infrastructure, or Lambda functions.
  • 100aws-lambda
    Build and deploy serverless functions on AWS Lambda. Configure triggers, manage permissions, and optimize performance. Use when implementing serverless applications.
  • 100aws-lambda
    Build and deploy serverless functions on AWS Lambda. Configure triggers, manage permissions, and optimize performance. Use when implementing serverless applications.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.