npx skills add https://github.com/mindrally/skills --skill aws-development此技能提供了在亚马逊云服务(AWS)上开发应用程序的全面指南,重点关注无服务器架构、基础设施即代码和安全最佳实践。
// Use ES modules and typed handlers
import { APIGatewayProxyHandler } from 'aws-lambda';
export const handler: APIGatewayProxyHandler = async (event) => {
try {
// Validate input at function start
if (!event.body) {
return { statusCode: 400, body: JSON.stringify({ error: 'Missing body' }) };
}
// Business logic here
return { statusCode: 200, body: JSON.stringify({ success: true }) };
} catch (error) {
console.error('Lambda error:', error);
return { statusCode: 500, body: JSON.stringify({ error: 'Internal error' }) };
}
};
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
aws_* 前缀的 aws-cdk-libaws/
├── constructs/ # CDK custom constructs
├── stacks/ # CloudFormation stack definitions
├── functions/ # Lambda function implementations
└── tests/ # Infrastructure tests
import * as cdk from 'aws-cdk-lib';
import * as lambda from 'aws-cdk-lib/aws_lambda';
import * as dynamodb from 'aws-cdk-lib/aws_dynamodb';
// Use custom constructs for reusable patterns
export class ApiConstruct extends Construct {
constructor(scope: Construct, id: string, props: ApiProps) {
super(scope, id);
// Implementation
}
}
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"dynamodb:GetItem",
"dynamodb:PutItem",
"dynamodb:Query"
],
"Resource": "arn:aws:dynamodb:*:*:table/MyTable"
}
]
}
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Globals:
Function:
Timeout: 30
Runtime: nodejs20.x
Architectures:
- arm64
Tracing: Active
Resources:
MyFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: src/
Handler: index.handler
Events:
Api:
Type: Api
Properties:
Path: /items
Method: GET
import { DynamoDBClient } from '@aws-sdk/client-dynamodb';
import { mockClient } from 'aws-sdk-client-mock';
const ddbMock = mockClient(DynamoDBClient);
beforeEach(() => {
ddbMock.reset();
});
test('handler returns items', async () => {
ddbMock.on(QueryCommand).resolves({ Items: [] });
const result = await handler(event);
expect(result.statusCode).toBe(200);
});
cdk diff 或 sam validate每周安装量
100
代码仓库
GitHub 星标数
43
首次出现
2026年1月25日
安全审计
已安装于
gemini-cli83
opencode83
cursor79
codex79
claude-code76
github-copilot76
This skill provides comprehensive guidelines for developing applications on Amazon Web Services (AWS), focusing on serverless architecture, Infrastructure as Code, and security best practices.
// Use ES modules and typed handlers
import { APIGatewayProxyHandler } from 'aws-lambda';
export const handler: APIGatewayProxyHandler = async (event) => {
try {
// Validate input at function start
if (!event.body) {
return { statusCode: 400, body: JSON.stringify({ error: 'Missing body' }) };
}
// Business logic here
return { statusCode: 200, body: JSON.stringify({ success: true }) };
} catch (error) {
console.error('Lambda error:', error);
return { statusCode: 500, body: JSON.stringify({ error: 'Internal error' }) };
}
};
aws-cdk-lib with explicit aws_* prefixesaws/
├── constructs/ # CDK custom constructs
├── stacks/ # CloudFormation stack definitions
├── functions/ # Lambda function implementations
└── tests/ # Infrastructure tests
import * as cdk from 'aws-cdk-lib';
import * as lambda from 'aws-cdk-lib/aws_lambda';
import * as dynamodb from 'aws-cdk-lib/aws_dynamodb';
// Use custom constructs for reusable patterns
export class ApiConstruct extends Construct {
constructor(scope: Construct, id: string, props: ApiProps) {
super(scope, id);
// Implementation
}
}
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"dynamodb:GetItem",
"dynamodb:PutItem",
"dynamodb:Query"
],
"Resource": "arn:aws:dynamodb:*:*:table/MyTable"
}
]
}
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Globals:
Function:
Timeout: 30
Runtime: nodejs20.x
Architectures:
- arm64
Tracing: Active
Resources:
MyFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: src/
Handler: index.handler
Events:
Api:
Type: Api
Properties:
Path: /items
Method: GET
import { DynamoDBClient } from '@aws-sdk/client-dynamodb';
import { mockClient } from 'aws-sdk-client-mock';
const ddbMock = mockClient(DynamoDBClient);
beforeEach(() => {
ddbMock.reset();
});
test('handler returns items', async () => {
ddbMock.on(QueryCommand).resolves({ Items: [] });
const result = await handler(event);
expect(result.statusCode).toBe(200);
});
cdk diff or sam validate before deploymentWeekly Installs
100
Repository
GitHub Stars
43
First Seen
Jan 25, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
gemini-cli83
opencode83
cursor79
codex79
claude-code76
github-copilot76