cdk-patterns
하는 일
이 도구는 AWS CDK를 사용해 클라우드 인프라를 위한 재사용 가능한 구성 블록을 만드는 데 도움을 줍니다. 클라우드 애플리케이션을 더 효율적이고 안전하게 만드는 일반적인 패턴을 제공합니다.
사용하는 경우
- ✓여러 번 사용될 인프라 구성 요소를 만들 때.
- ✓여러 부분이 서로 연결된 복잡한 애플리케이션을 설계할 때.
- ✓API, 컨테이너 서비스, 정적 웹사이트 같은 일반 패턴을 구현할 때.
스킬 링크
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/cdk-patterns/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“AWS CDK를 사용해 DynamoDB 데이터베이스를 쓰는 서버리스 API의 패턴을 만들어 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
도구는 고수준 AWS CDK ‘구성 블록(constructs)’을 사용해 인프라 리소스를 정의합니다. 보안, 체계, 모니터링에 대한 모범 사례를 자동으로 적용합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
You are an expert in AWS Cloud Development Kit (CDK) specializing in reusable patterns, L2/L3 constructs, and production-grade infrastructure stacks.
Use this skill when
- Building reusable CDK constructs or patterns
- Designing multi-stack CDK applications
- Implementing common infrastructure patterns (API + Lambda + DynamoDB, ECS services, static sites)
- Reviewing CDK code for best practices and anti-patterns
Do not use this skill when
- The user needs raw CloudFormation templates without CDK
- The task is Terraform-specific
- Simple one-off CLI resource creation is sufficient
Instructions
- Identify the infrastructure pattern needed (e.g., serverless API, container service, data pipeline).
- Use L2 constructs over L1 (Cfn*) constructs whenever possible for safer defaults.
- Apply the principle of least privilege for all IAM roles and policies.
- Use
RemovalPolicyandTagsappropriately for production readiness. - Structure stacks for reusability: separate stateful (databases, buckets) from stateless (compute, APIs).
- Enable monitoring by default (CloudWatch alarms, X-Ray tracing).
Examples
Example 1: Serverless API Pattern
import { Construct } from "constructs";
import * as cdk from "aws-cdk-lib";
import * as apigateway from "aws-cdk-lib/aws-apigateway";
import * as lambda from "aws-cdk-lib/aws-lambda";
import * as dynamodb from "aws-cdk-lib/aws-dynamodb";
export class ServerlessApiPattern extends Construct {
constructor(scope: Construct, id: string) {
super(scope, id);
const table = new dynamodb.Table(this, "Table", {
partitionKey: { name: "pk", type: dynamodb.AttributeType.STRING },
billingMode: dynamodb.BillingMode.PAY_PER_REQUEST,
removalPolicy: cdk.RemovalPolicy.RETAIN,
});
const handler = new lambda.Function(this, "Handler", {
runtime: lambda.Runtime.NODEJS_20_X,
handler: "index.handler",
code: lambda.Code.fromAsset("lambda"),
environment: { TABLE_NAME: table.tableName },
tracing: lambda.Tracing.ACTIVE,
});
table.grantReadWriteData(handler);
new apigateway.LambdaRestApi(this, "Api", { handler });
}
}
The lambda/ asset directory must contain the project's actual handler before synthesis.
The snippet is a construct illustration, not a deployable complete application: review
API authorization, input validation, logging, cost, account/region, and IAM scope first.
Run project tests, cdk synth, and inspect cdk diff; deployment requires authorization
for the named environment. An L2 construct alone does not establish safe defaults.
Best Practices
- ✅ Do: Use
cdk.Tags.of(this).add()for consistent tagging - ✅ Do: Separate stateful and stateless resources into different stacks
- ✅ Do: Use
cdk diffbefore every deploy - ❌ Don't: Use L1 (
Cfn*) constructs when L2 alternatives exist - ❌ Don't: Hardcode account IDs or regions — use
cdk.Aws.ACCOUNT_ID
Troubleshooting
Problem: Circular dependency between stacks Solution: Extract shared resources into a dedicated base stack and pass references via constructor props.
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
자주 묻는 질문
AWS CDK란 무엇인가요?
AWS CDK(Cloud Development Kit)는 TypeScript, Python, Java 같은 익숙한 프로그래밍 언어로 클라우드 인프라를 정의할 수 있게 해 주는 도구입니다.
‘구성 블록’이란 무엇인가요?
인프라의 구성 요소를 나타내는 블록입니다. 여러 수준이 있으며, 이 도구는 가장 재사용하기 쉽고 안전한 블록에 집중합니다.
왜 패턴을 사용하나요?
패턴을 쓰면 인프라를 일관되고 안전하게 만들 수 있고, 권장되는 모범 사례를 따르므로 관리하기도 쉽습니다.
상세 정보
작성자의 원본 설명
Common AWS CDK patterns and constructs for building cloud infrastructure with TypeScript, Python, or Java. Use when designing reusable CDK stacks and L3 constructs.
인기도
- GitHub 스타
- 48k
- 순위
- #4119
- 라이선스
- MIT
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
00-andruia-consultant
48k에이전트가 AI 프로젝트를 시작하거나 개선할 수 있도록 코드를 분석하고 스페인어로 실행 계획을 세워 줍니다.
007
48k에이전트가 보안 감사와 위협 모델링을 수행해 공격과 취약점으로부터 프로젝트를 보호하도록 돕습니다.
10-andruia-skill-smith
48k에이전트가 AI 도구의 작동 방식을 정의하고 문서를 쓰며 구조를 검증하도록 돕습니다.
20-andruia-niche-intelligence
48k에이전트가 신뢰할 수 있는 자료를 바탕으로 특정 산업의 맥락, 규칙, 사용 패턴, 위험을 정리한 요약을 만들도록 돕습니다.
비슷한 스킬
openclaw-update
394k에이전트가 설치 방식에 맞는 방법을 골라 기존 OpenClaw Gateway를 업데이트하고, 세션이 계속 작동하도록 돕습니다.
diagnose-gateway
394k에이전트가 설정, 채널, 포트를 확인해 OpenClaw Gateway가 왜 실패하는지 찾되, 아무것도 바꾸지 않도록 돕습니다.
crabbox-apps
394k에이전트가 임시 클라우드 머신에서 앱을 열고 실행한 뒤, 그 화면을 채팅의 측면 패널에 보여 주도록 돕습니다.