Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/GoranErhartic/cursor-development-rulesnpx agentmods add rules/goranerhartic/cursor-development-rules/cdk-infrastructure-lambdaWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/goranerhartic/cursor-development-rules/cdk-infrastructure-lambda)<a href="https://agentmods.dev/rules/goranerhartic/cursor-development-rules/cdk-infrastructure-lambda"><img src="https://agentmods.dev/badge/rules/goranerhartic/cursor-development-rules/cdk-infrastructure-lambda/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/goranerhartic/cursor-development-rules/cdk-infrastructure-lambda"><img src="https://agentmods.dev/badge/rules/goranerhartic/cursor-development-rules/cdk-infrastructure-lambda.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00017 | $0.01657 |
| Opus 5.5 | $0.00007 | $0.00663 |
| Sonnet 5.5 | $0.00003 | $0.00331 |
| Haiku 4.5 | $0.00002 | $0.00166 |
Grade A, and why
cdk-infrastructure-lambda scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 237 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Lambda Function Construct
Standard Lambda Configuration
// cdk/lib/constructs/lambda-function.ts
import { Construct } from "constructs";
import { Duration } from "aws-cdk-lib";
import {
Runtime,
Tracing,
Architecture,
Function as LambdaFunction,
FunctionProps,
LayerVersion,
} from "aws-cdk-lib/aws-lambda";
import { NodejsFunction, NodejsFunctionProps } from "aws-cdk-lib/aws-lambda-nodejs";
import { RetentionDays } from "aws-cdk-lib/aws-logs";
export interface StandardLambdaProps extends Omit<NodejsFunctionProps, "runtime" | "architecture"> {
/**
* Memory size in MB
*/
memorySize?: number;
/**
* Timeout in seconds
*/
timeoutSeconds?: number;
/**
* Reserved concurrency
*/
reservedConcurrentExecutions?: number;
/**
* Enable X-Ray tracing
*/
enableTracing?: boolean;
/**
* Layers to attach
*/
layers?: LayerVersion[];
}
export class StandardLambda extends NodejsFunction {
constructor(scope: Construct, id: string, props: StandardLambdaProps) {
super(scope, id, {
runtime: Runtime.NODEJS_22_X,
architecture: Architecture.ARM_64, // Cost-effective
memorySize: props.memorySize ?? 512,
timeout: Duration.seconds(props.timeoutSeconds ?? 30),
tracing: props.enableTracing !== false ? Tracing.ACTIVE : Tracing.DISABLED,
logRetention: RetentionDays.TWO_WEEKS,
reservedConcurrentExecutions: props.reservedConcurrentExecutions,
bundling: {
minify: true,
sourceMap: true,
sourcesContent: false,
externalModules: [
"@aws-sdk/*", // Use Lambda-provided SDK
],
esbuildArgs: {
"--tree-shaking": "true",
},
...props.bundling,
},
environment: {
NODE_OPTIONS: "--enable-source-maps",
LOG_LEVEL: "info",
...props.environment,
},
...props,
});
}
}
API Handler Lambda
// cdk/lib/stacks/api-stack.ts
import { Stack, StackProps, Duration } from "aws-cdk-lib";
import { Construct } from "constructs";
import { RestApi, LambdaIntegration, Cors } from "aws-cdk-lib/aws-apigateway";
import { StandardLambda } from "../constructs/lambda-function";
import { Table } from "aws-cdk-lib/aws-dynamodb";
import { Secret } from "aws-cdk-lib/aws-secretsmanager";
interface ApiStackProps extends StackProps {
dataTable: Table;
idempotencyTable: Table;
databaseSecret: Secret;
rdsProxyEndpoint: string;
}
export class ApiStack extends Stack {
public readonly api: RestApi;
constructor(scope: Construct, id: string, props: ApiStackProps) {
super(scope, id, props);
// Create API Gateway
this.api = new RestApi(this, "RealEstateApi", {
restApiName: "Real Estate API",
defaultCorsPreflightOptions: {
allowOrigins: Cors.ALL_ORIGINS,
allowMethods: Cors.ALL_METHODS,
allowHeaders: ["Content-Type", "Authorization", "X-Correlation-Id"],
},
});
// Properties resource
const properties = this.api.root.addResource("properties");
const propertyById = properties.addResource("{propertyId}");
// Create Property Handler
const createPropertyHandler = new StandardLambda(this, "CreateProperty", {
entry: "src/functions/create-property/handler.ts",
handler: "handler",
memorySize: 512,
timeoutSeconds: 30,
environment: {
DYNAMODB_TABLE_NAME: props.dataTable.tableName,
IDEMPOTENCY_TABLE_NAME: props.idempotencyTable.tableName,
DATABASE_URL: `postgresql://user:password@${props.rdsProxyEndpoint}:5432/realestate?connection_limit=1`,
},
});
props.dataTable.grantReadWriteData(createPropertyHandler);
props.idempotencyTable.grantReadWriteData(createPropertyHandler);
props.databaseSecret.grantRead(createPropertyHandler);
properties.addMethod("POST", new LambdaIntegration(createPropertyHandler));
// Get Property Handler
const getPropertyHandler = new StandardLambda(this, "GetProperty", {
entry: "src/functions/get-property/handler.ts",
handler: "handler",
memorySize: 256,
timeoutSeconds: 10,
environment: {
DYNAMODB_TABLE_NAME: props.dataTable.tableName,
},
});
props.dataTable.grantReadData(getPropertyHandler);
propertyById.addMethod("GET", new LambdaIntegration(getPropertyHandler));
// Listings resource
const listings = properties.addResource("listings");
// Search Properties Handler
const searchHandler = new StandardLambda(this, "SearchProperties", {
entry: "src/functions/search-properties/handler.ts",
handler: "handler",
memorySize: 1024,
timeoutSeconds: 30,
environment: {
OPENSEARCH_ENDPOINT: props.opensearchEndpoint,
LISTINGS_INDEX: "listings",
},
});
this.api.root.addResource("search").addMethod(
"GET",
new LambdaIntegration(searchHandler)
);
}
}
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 237 lines · 17 tokens per session scan A 34ca530f78fc
cdk-infrastructure-lambda is a cursor rule published in the GitHub repository GoranErhartic/cursor-development-rules (19 stars, last pushed 7mo ago), licensed MIT. It adds 17 tokens to every session and 1,657 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other cursor rules, from other repositories
beanstalk-deploy
Robust deployment patterns for Elastic Beanstalk with GitHub Actions, Pulumi, and edge case handling.
aws-ecs
Definitive guidelines for building, deploying, and operating applications on AWS ECS, emphasizing immutable containers, secure secrets management, and robust operational patterns.
aws-rds-best-practices
AWS RDS PostgreSQL best practices - database configuration, connection management, authentication, backup, and performance optimization standards.
ponytail
Ponytail, lazy senior dev mode. Always pick the simplest solution that works.
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.