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

ヤプリにおけるAWSコスト最適化の取り組み

kmitsuhashi
October 30, 2023

 ヤプリにおけるAWSコスト最適化の取り組み

kmitsuhashi

October 30, 2023
Tweet

More Decks by kmitsuhashi

Other Decks in Technology

Transcript

  1. ৽ͨʹ௚໘ͭͭ͋͠Δ՝୊ 01 AWSίετ࠷దԽͷऔΓ૊Έഎܠ ࣄۀ֦େʹ൐͍૿Ճ͢ΔAWSΞΧ΢ϯτʹ໨͕ಧ͔ͳ͘ͳΓͭͭ͋Δ prod stg dev prod stg dev

    prod stg dev αʔϏεA༻ͷΞΧ΢ϯτ αʔϏεB༻ͷΞΧ΢ϯτ αʔϏεBͷҕୗઌ༻ͷ ΞΧ΢ϯτ SREνʔϜ શһ͕೺Ѳ Ұ෦ϝϯ όʔͷΈ೺Ѳ ར༻ঢ়گෆ໌
  2. • ΞΧ΢ϯτԣஅͰίετਪҠΛ֬ೝ͍ͨ͠ • த௕ظͰͷ܏޲Λ෼ੳͰ͖ΔΑ͏ʹ͍ͨ͠ • Cost ExplorerͷΑ͏ʹৄࡉͳྉۚ಺༁͕ݟ͑ΔΑ͏ʹ͍ͨ͠ ͱ͸ݴͬͯ΋… • ࡞ΓࠐΈ͸ಋೖ΍ϝϯςφϯε͕େมͳͷͰආ͚͍ͨ

    • खಈͰͷΦϖϨʔγϣϯ΋ۃྗආ͚͍ͨ • Cost ExplorerͰຖճؤுΔͷ͸ͭΒ͍ ࠷ߴͷμογϡϘʔυΛ࡞Γ͍ͨʂʂ 02 ͲͷΑ͏ʹίετ࠷దԽʹऔΓ૊Μ͔ͩ - ՄࢹԽ
  3. CIDͷಛ௃ 2 02 ͲͷΑ͏ʹίετ࠷దԽʹऔΓ૊Μ͔ͩ - ՄࢹԽ S3 Storage Lens ͳͲͷίετ࠷దԽʹ໾ཱͭػೳ

    ͱͷ࿈ܞ ίετ࠷దԽͷͨΊͷਪ঑ࣄ ߲Λදࣔ https://d1s0yx3p3y3rah.cloudfront.net/anonymous-embed?dashboard=cudos
  4. 02 ͲͷΑ͏ʹίετ࠷దԽʹऔΓ૊Μ͔ͩ - ࠷దԽ ΞΧ΢ϯτ αʔϏε ݱঢ় ࢪࡦ ࡟ݮֹ ೉౓

    ༏ઌॱҐ ํ਑ Account A RDS m5.8xlarge εϖοΫ࠷దԽ $XXX/݄ 5 3 XXXͷͨΊอཹ Account A S3 ແظݶอଘ ϥΠϑαΠΫϧ ϙϦγʔઃఆ $XXX/݄ 2 2 ࣮ࢪ͢Δ Account B ElastiCache ෆཁϦιʔεՔ ಇ Ϧιʔε࡟আ $XXX/݄ 1 1 ࣮ࢪ͢Δ Account A DynamoDB ΦϯσϚϯυΩ ϟύγςΟ ϦβʔϒυΩϟ ύγςΟߪೖ $XXX/݄ 3 4 XXXͷͨΊ࣮ࢪ ͠ͳ͍ ɾɾɾ
  5. S3 VPCΤϯυϙΠϯτΛར༻͢Δ 03 ۩ମతͳίετ࠷దԽࢪࡦ • ϓϥΠϕʔταϒωοτ͔ΒS3ΞΫηεͷࡍʹ͸NAT GateawayΛ௨ΔΑ͏ʹͳ͍ͬͯͨ • S3ʹஔ͔ΕͨେྔͷassetσʔλʹΞΫηε͢ΔͨΊಛʹྉ͕ۚߴ͘ͳ͍ͬͯͨ ※

    ap-northeast-1ϦʔδϣϯͰͷ2023೥8݄25೔ݱࡏͷՁ֨ ແྉ Private subnet Public subnet VPC Endpoint (Gateway) AWS Fargate NAT Gateway Amazon Simple Storage Service (Amazon S3) asset $0.062/GB ※