cursor-rules / rules
Cursor rule8 starsChanged 19 months agoMITView on GitHub
AWS Serverless Application Model (SAM) Development Standards
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 1,533 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository17 other files it gives its agents.
- .cursor/rules/aws-bedrock.mdcCursor rule
- .cursor/rules/aws-cloudformation.mdcCursor rule
- .cursor/rules/aws-dynamodb.mdcCursor rule
- .cursor/rules/aws-eventbridge.mdcCursor rule
- .cursor/rules/aws-gamelift.mdcCursor rule
- .cursor/rules/aws-iam.mdcCursor rule
- .cursor/rules/aws-lambda.mdcCursor rule
- .cursor/rules/aws-sagemaker.mdcCursor rule
- .cursor/rules/aws-vpc.mdcCursor rule
- .cursor/rules/base.mdcCursor rule
- .cursor/rules/docs-structure.mdcCursor rule
- .cursor/rules/expo.mdcCursor rule
- .cursor/rules/nextjs.mdcCursor rule
- .cursor/rules/react.mdcCursor rule
- .cursor/rules/react-native.mdcCursor rule
- .cursor/rules/readme-documentation.mdcCursor rule
- .cursor/rules/typescript.mdcCursor rule
The file
We split this aws-sam.mdc into the rules it gives an agent
7 rules. About 0 are common, 7 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Use clear, descriptive resource names
- Distinctive: line 17
Add comments for complex resource configurations
- Distinctive: line 20
Use outputs for important resource information
- Distinctive: line 21
Create mappings for environment-specific variables
- Distinctive: line 29
Create appropriate event source mappings
- Distinctive: line 85
Use SAM CLI for local testing
- Distinctive: line 89
Use SAM accelerate for faster development
≈ “Common” is an estimate: at least 1 in 5 of the 3,030 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
--- description: AWS Serverless Application Model (SAM) Development Standards globs: alwaysApply: false --- --- Description: AWS Serverless Application Model (SAM) Development Standards Globs: **/*.yaml, **/*.yml, **/template.yaml, **/sam.yaml --- # AWS SAM Development Standards @base.mdc ## SAM Template Structure - Organize templates with logical resource groupings - Use clear, descriptive resource names - Add comments for complex resource configurations - Structure templates consistently across projects - Implement parameters for configurable values - Use outputs for important resource information - Create mappings for environment-specific variables - Split complex applications into nested stacks ## SAM Resource Definitions - Define Lambda functions with appropriate properties - Configure API Gateway resources properly - Set up DynamoDB tables with correct key structures - Implement proper S3 bucket configurations - Create appropriate event source mappings - Configure Step Functions state machines properly - Set up SNS topics and SQS queues with correct attributes - Define appropriate CloudWatch alarm resources ## Function Configuration - Set appropriate memory and timeout values - Configure environment variables properly - Implement function layers for shared code - Set up appropriate IAM roles with least privilege - Configure function URL settings when applicable - Implement proper VPC configurations when needed - Set up provisioned concurrency for critical functions - Configure proper retry behavior for event sources ## API Gateway Configuration - Implement proper API Gateway endpoint types - Configure appropriate authorization methods - Set up request/response mappings properly - Implement proper CORS settings - Configure throttling and quota limits - Set up appropriate caching strategies - Implement proper stage variables - Configure request validation when applicable ## Event Configuration - Define appropriate event sources for Lambda functions - Configure event filters to reduce unnecessary invocations - Set proper batch sizes for stream-based event sources - Implement proper failure handling for event processing - Configure event retention and replay strategies - Set up dead-letter queues for failed events - Configure event source mappings with proper concurrency settings - Implement event bridging patterns when appropriate ## Security Best Practices - Implement proper IAM roles with least privilege - Configure appropriate resource policies - Set up proper encryption for all resource types - Implement secure API authorization - Configure VPC endpoints for private resources - Set up WAF for public APIs - Implement proper secret management - Configure security groups and network ACLs properly ## Deployment Configuration - Configure appropriate deployment preferences - Set up canary deployments for critical resources - Implement proper rollback triggers - Configure CodeDeploy hooks appropriately - Set up deployment alarms - Implement blue/green deployment strategies - Configure proper deployment monitoring - Implement deployment validation tests ## Local Development - Use SAM CLI for local testing - Configure proper local environment variables - Set up mock event JSON files for testing - Implement proper debugging configurations - Use SAM accelerate for faster development - Configure proper local API testing - Set up Docker for local Lambda execution - Implement proper unit and integration testing ## CI/CD Integration - Set up proper SAM build pipelines - Configure deployment artifacts correctly - Implement environment-specific configurations - Set up proper testing stages in pipelines - Configure appropriate approval workflows - Implement proper artifact storage - Set up deployment validation - Configure proper rollback strategies ## Monitoring and Observability - Implement proper CloudWatch logging - Set up appropriate CloudWatch metrics - Configure custom metrics for business KPIs - Implement proper alarm configurations - Set up X-Ray tracing for distributed systems - Configure proper log groups and retention policies - Implement centralized logging strategies - Set up appropriate dashboards for monitoring
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

