$120 tested Claude codes · real before/after data · Full tier $15 one-timebuy --sheet=15 →
$Free 40-page Claude guide — setup, 120 prompt codes, MCP servers, AI agents. download --free →
clskills.sh — terminal v2.4 — 2,347 skills indexed● online
[CL]Skills_
ServerlessintermediateNew

Serverless Queue

Share

Implement serverless queues and event-driven processing

Works with OpenClaude

You are a serverless architecture specialist. The user wants to implement serverless queues and event-driven processing using AWS SQS, Lambda, and EventBridge.

What to check first

  • Verify AWS CLI is installed: aws --version
  • Check IAM permissions for SQS, Lambda, and EventBridge: aws iam get-user
  • Confirm Node.js runtime available: node --version

Steps

  1. Create an SQS queue using AWS CLI with aws sqs create-queue --queue-name my-processing-queue --attributes VisibilityTimeout=300,MessageRetentionPeriod=1209600
  2. Create an IAM role for Lambda with AWSLambdaSQSQueueExecutionRole policy attached
  3. Create a Lambda function that will consume messages from the queue with handler entry point index.handler
  4. Configure the SQS queue as an event source mapping to Lambda using aws lambda create-event-source-mapping --event-source-arn <queue-arn> --function-name my-processor --batch-size 10
  5. Set up EventBridge rule with aws events put-rule --name my-processing-rule --event-bus-name default --state ENABLED
  6. Add the SQS queue as the EventBridge target using aws events put-targets --rule my-processing-rule --targets "Id"="1","Arn"="<queue-arn>"
  7. Publish test events to EventBridge with aws events put-events --entries file://events.json
  8. Monitor execution with CloudWatch Logs: aws logs tail /aws/lambda/my-processor --follow

Code

// Lambda handler for processing SQS messages
const AWS = require('aws-sdk');
const sqs = new AWS.SQS();

exports.handler = async (event) => {
  console.log('Processing batch:', event.Records.length);
  
  const results = [];
  
  for (const record of event.Records) {
    try {
      const body = JSON.parse(record.body);
      console.log('Message body:', body);
      
      // Process the message
      const processedData = await processMessage(body);
      results.push({
        messageId: record.messageId,
        status: 'success',
        data: processedData
      });
      
      // Delete message from queue after successful processing
      await sqs.deleteMessage({
        QueueUrl: process.env.QUEUE_URL,
        ReceiptHandle: record.receiptHandle
      }).promise();
      
    } catch (error) {
      console.error('Error processing message:', error);
      results.push({
        messageId: record.messageId,
        status: 'failed',
        error: error.message
      });
      
      // Message will be redriven to DLQ after max retries
    }
  }
  
  return {

Note: this example was truncated in the source. See the GitHub repo for the latest full version.

Common Pitfalls

  • Treating this skill as a one-shot solution — most workflows need iteration and verification
  • Skipping the verification steps — you don't know it worked until you measure
  • Applying this skill without understanding the underlying problem — read the related docs first

When NOT to Use This Skill

  • When a simpler manual approach would take less than 10 minutes
  • On critical production systems without testing in staging first
  • When you don't have permission or authorization to make these changes

How to Verify It Worked

  • Run the verification steps documented above
  • Compare the output against your expected baseline
  • Check logs for any warnings or errors — silent failures are the worst kind

Production Considerations

  • Test in staging before deploying to production
  • Have a rollback plan — every change should be reversible
  • Monitor the affected systems for at least 24 hours after the change

Quick Info

CategoryServerless
Difficultyintermediate
Version1.0.0
AuthorClaude Skills Hub
serverlessqueueevents

Install command:

curl -o ~/.claude/skills/serverless-queue.md https://claude-skills-hub.vercel.app/skills/serverless/serverless-queue.md

Related Serverless Skills

Other Claude Code skills in the same category — free to download.

Want a Serverless skill personalized to YOUR project?

This is a generic skill that works for everyone. Our AI can generate one tailored to your exact tech stack, naming conventions, folder structure, and coding patterns — with 3x more detail.