Upgrade to Pro — share decks privately, control downloads, hide ads and more …

awsCustomResourceで作成してみた

clouddev-code
September 26, 2023
210

 awsCustomResourceで作成してみた

clouddev-code

September 26, 2023
Tweet

Transcript

  1. Agenda • Aurora Serverless V2 • IaCで構築したい • 各ツールでの対応状況 •

    aws Custom Resource をつかって • 実際のコード • まとめ
  2. Aurora Serverless v2スケール検証 • 100人のユーザがとあるサイトに同時にアクセスするような環 境をシミュレートを想定してpgbench 11.12から実施 transaction type: <builtin:

    TPC-B (sort of)> scaling factor: 100 query mode: simple number of clients: 100 number of threads: 1 number of transactions per client: 1000 number of transactions actually processed: 100000/100000 latency average = 471.550 ms tps = 212.066468 (including connections establishing) tps = 212.086562 (excluding connections establishing)
  3. AWS CLIでも作れますが。。。 • aws rds create-db-cluster --db-cluster-identifier demo-aurora-serverless --db-cluster-parameter-group-name amazon-eks-vpc-private-s-rdsclusterparametergroup-lg8u5xkpnnjx

    --vpc-security-group-ids sg-0215b5f619554b318 --db-subnet-group-name subnet-aurora-postgresql --engine aurora-postgresql --engine-version 13.6 --master-username postgresql --master-user-password demo-aurora-root --storage-encrypted --no-enable-iam-database-authentication --serverless-v2-scaling-configuration MinCapacity=0.5,MaxCapacity=2 aws rds create-db-instance --db-instance-identifier demo-aurora-serverless-instance --engine aurora-postgresql --availability-zone ap-northeast-1a --db-parameter-group-name amazon-eks-vpc-private-subnets-wit-vpce-rdsparametergroup-1r19qjjkh2swg --engine-version 13.6 --db-cluster-identifier demo-aurora-serverless --db-instance-class db.serverless AWS CLIでも作成できますが、指定す るパラメータもめちゃくちゃ指定する必 要がある!
  4. 紹介したリファレンス • • https://github.com/boto/boto3/blob/develop/CHANGELOG.rst • https://github.com/aws/aws-cdk/issues/20197 • https://github.com/aws-cloudformation/cloudformation-covera ge-roadmap/issues/1150 •

    https://github.com/aws/aws-sdk-go-v2/blob/main/CHANGELO G.md • https://zenn.dev/chatii/articles/708e4b55da1263 • https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUser Guide/aurora-serverless-v2.setting-capacity.html