Skip to content

Add AWS AppSync Event API instruction and regenerate docs#828

Merged
aaronpowell merged 2 commits intogithub:stagedfrom
icsaba:codex/aws-appsync-eventapi-instructions
Feb 26, 2026
Merged

Add AWS AppSync Event API instruction and regenerate docs#828
aaronpowell merged 2 commits intogithub:stagedfrom
icsaba:codex/aws-appsync-eventapi-instructions

Conversation

@icsaba
Copy link
Copy Markdown
Contributor

@icsaba icsaba commented Feb 26, 2026

Summary

Adds a new public instruction file for AWS AppSync Event API development:

  • instructions/aws-appsync.instructions.md

This guide is designed for production use and focuses on APPSYNC_JS event handlers (onPublish, onSubscribe) with strict runtime-safe patterns.

What’s Included

  • Runtime restrictions for APPSYNC_JS (unsupported language features, control-flow limits, no async/promise usage)
  • Built-in utilities and runtime utility usage (util.*, runtime.earlyReturn)
  • Built-in module guidance for:
    • @aws-appsync/utils/dynamodb
    • @aws-appsync/utils/rds
  • Data source mapping and usage guidance for Event API:
    • Lambda, DynamoDB, RDS, EventBridge, HTTP, OpenSearch, Bedrock
  • Data source setup and IAM hardening:
    • least privilege policies
    • trust principal appsync.amazonaws.com
    • aws:SourceAccount and aws:SourceArn restrictions
  • Handler flow guidance:
    • when to return transformed events
    • datasource request/response structure
  • Pipeline data-flow guidance:
    • use ctx.prev.result for sequential step chaining
    • use ctx.stash for cross-step shared metadata/state
  • Batch operations coverage:
    • DynamoDB batch and transaction patterns (batch*, transact*)
    • Lambda batching strategy for Event API (Invoke with list payloads)
    • explicit note that Event API handlers do not use BatchInvoke request objects
  • Error handling and authorization flow recommendations
  • Observability and production-readiness checklist

Why

AWS AppSync Event API behavior is specific and easy to misuse with generic GraphQL/AppSync assumptions. This instruction file provides an opinionated, safe baseline for public-facing event systems, reducing runtime errors and improving consistency/security.

Notes

  • File follows repository naming and frontmatter conventions.
  • PR targets staged branch per repository contribution guidance.

@aaronpowell aaronpowell merged commit 5f18d4c into github:staged Feb 26, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants