cdk-patterns
AWS CDK 인프라 패턴 구축
CDK 컨스트럭트를 사용하여 프로덕션 수준의 AWS 인프라를 설계합니다. 재사용 가능한 L2/L3 컨스트럭트로 서버리스 API, 컨테이너, 데이터 파이프라인을 위한 검증된 패턴을 적용합니다.
Télécharger le ZIP du skill
Importer dans Claude
Allez dans Paramètres → Capacités → Skills → Importer un skill
Activez et commencez à utiliser
Tester
Utilisation de "cdk-patterns". Create a serverless API with Lambda and DynamoDB
Résultat attendu:
API Gateway 통합, 적절한 런타임 구성을 갖춘 Lambda 함수, 온디맨드 빌링을 사용하는 DynamoDB 테이블, grantReadWriteData 를 사용한 IAM 권한, 그리고 관찰 가능성을 위해 활성화된 X-Ray 트레이싱을 포함한 완전한 CDK 컨스트럭트를 생성합니다.
Utilisation de "cdk-patterns". Review my CDK stack for best practices
Résultat attendu:
구체적인 권장사항을 제공합니다: CfnFunction 을 lambda.Function L2 컨스트럭트로 교체, 상태 저장 리소스에 RemovalPolicy.RETAIN 추가, 인라인 정책 대신 table.grantReadWriteData 를 사용한 최소 권한 IAM 구현, 리소스 조직을 위한 cdk.Tags 추가.
Audit de sécurité
SûrAll static analysis findings are false positives. The 'Dynamic function constructor' at line 53 is actually a CDK Lambda construct (new lambda.Function). The 'Ruby/shell backtick execution' detections are markdown code block delimiters (```typescript), not shell commands. The 'Weak cryptographic algorithm' findings reference description text, not actual crypto code. This skill contains only documentation and example CDK TypeScript code with no executable security risks.
Score de qualité
Ce que vous pouvez construire
서버리스 API 개발
적절한 IAM 권한과 모니터링이 활성화된 API Gateway, Lambda, DynamoDB 를 사용하여 프로덕션 수준의 서버리스 API 를 구축합니다.
재사용 가능한 인프라 컨스트럭트
팀 간 일관된 인프라 배포를 위한 모범 사례를 인코딩하는 조직 표준 L3 컨스트럭트를 생성합니다.
CDK 코드 검토 및 최적화
기존 CDK 코드를 안티패턴, 보안 문제, 더 높은 수준의 컨스트럭트 사용 기회에 대해 검토합니다.
Essayez ces prompts
Create a CDK stack in TypeScript that deploys a Lambda function with an S3 bucket. Use L2 constructs, apply removal policies, and enable X-Ray tracing.
Generate a reusable CDK construct for a serverless API with API Gateway, Lambda, and DynamoDB. Include proper IAM permissions, environment variables, and CloudWatch alarms.
Design a multi-stack CDK application separating stateful resources (RDS, S3) from stateless compute (Lambda, ECS). Show how to pass references between stacks.
Review this CDK stack for security anti-patterns, IAM over-permissions, and opportunities to use L2 constructs instead of L1. Suggest specific improvements.
Bonnes pratiques
- 더 안전한 기본값과 적은 보일러플레이트 코드를 위해 L1 (Cfn*) 컨스트럭트보다 L2 컨스트럭트 사용
- 독립적인 수명 주기 관리를 위해 상태 저장 리소스 (데이터베이스, 버킷) 를 상태 비저장 컴퓨트와 별도의 스택으로 분리
- 광범위한 인라인 정책 대신 grant 메서드를 사용하여 모든 IAM 역할에 최소 권한 원칙 적용
Éviter
- L2 대안이 있을 때 L1 (Cfn*) 컨스트럭트 사용 - 더 많은 코드와 약한 안전성 보장 초래
- 이식성을 위해 cdk.Aws.ACCOUNT_ID 와 cdk.Aws.REGION 대신 계정 ID 또는 리전을 하드코딩
- 상태 저장 및 상태 비저장 리소스를 동일 스택에 배포하여 수명 주기를 불필요하게 결합