SlideShare a Scribd company logo
S A N F R A N C I S C O | A P R I L 2 0 , 2 0 2 2
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Improving developer experience
with CDK
Casey Lee
D E V 2 0 2
Chief Technology Officer
Gaggle
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Gaggle’s Transformation Story
Blocked Items
190,616,612
105%
Messages
5,155,335,282
350%
Files
6,276,549,392
489%
PSS
20,395
61%
Human Items
38,815,291
34%
Lives Saved
1,338
50%
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Challenge:
“The tech team never gets
anything done...when they do,
it is months late!”
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
% Efficiency = (# Engineers) / (WIP)
WIP = (Lead Time) x (Deploy Frequency)
High WIP, Low Efficiency
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Challenge:
Inability to
work in
isolation
results in long
feedback loops
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Solution: Provision separate AWS
accounts per developer
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Challenge: Unable to use
existing CI/CD to deploy
into dev account
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Solution: Use CDK
for each
application
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Solution: Use CDK for each application
from gaggle_cdk.core import S3Website, S3JsonFile, apply_permissions_boundary
class AppStack(core.Stack):
def __init__() -> None:
s3_website = S3Website(
self,
hosted_zone=hosted_zone,
website_sources=s3deploy.Source.asset(artifact)
)
config = S3JsonFile(
bucket=s3_website.bucket,
object_key="assets/config.json",
values={
"version": os.getenv("CODEBUILD_RESOLVED_SOURCE_VERSION","-"),
"identityProviderId": user_pool_idp,
"baseApiUrl": base_url,
}
)
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Solution: Automate IAM Permission Boundary
from gaggle_cdk.core import apply_permissions_boundary
class AppStack(core.Stack):
def __init__(self) -> None:
apply_permissions_boundary(self)
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Solution: Automate Tag Policy
tags = GaggleTags(
application=application,
environment=environment,
team=team,
some_random_tag=”foo",
)
# Create a stack, add resources to it
stack = core.Stack(app, "my-stack")
# Apply the tags to the stack
tags.apply(stack)
# Additionally you can apply tags to the entire app
tags.apply(app)
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Challenge: Deploying dependencies
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Solution:
Automate
build/deploy of
dependencies
from source
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Solution: Automate build/deploy of
dependencies from source
# Define the commands needed to build build:
- npm run build
# Define the dependencies to load
dependencies:
- repo: gaggle-net/service-a.git
ref: main
# Define the applications to run locally
- basedir: infrastructure
stacks: ui-stack
context:
my-context-key: my-context-value
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Challenge: QA
is now a
bottleneck to
delivery
process
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Solution:
Separate
integration
accounts per
team
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Solution: Create
pipeline for
each service
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Solution: Create pipeline for
each service
from aws_cdk import core
from gaggle_cdk.core.pipelines import DeploymentPipeline
class ExamplePipelineStack(core.Stack):
def __init__(self,scope: core.Construct):
pipeline = DeploymentPipeline(
self,
github_repo="sample-api",
github_org="gaggle-net",
integration_account="100000000000",
staging_account="200000000000",
production_account="300000000000",
)
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Challenge: Many
accounts can be
expensive!!
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Solution:
Budget
Automation
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
# The 'org' sections defines settings for the entire organization
org:
owner: org-owner@gaggle.net
workspace: T0000000
channel: ZZZZZZZ
default_daily_limit: 5
# Teams are containers for accounts.
# 'owner' - email address to notify for overages
# 'channel' - slack channel to notify for overages
teams:
- name: FOO
owner: alice@gaggle.net
channel: YYYYYYYYYYY
# Accounts are matched by 'name'.
# - 'owner' an additional 'owner' can be specified to be included in overage emails.
# - 'daily_limit' can be overridden per team
account_costs:
- name: developer-alice
- name: developer-bob
owner: bob@gaggle.net
Solution: Budget Automation
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
from account_budget import AccountBudget
class BudgetsStack(core.Stack):
def __init__(self) -> None:
for account in accounts:
b = AccountBudget(
self,
account_id=account.id,
daily_limit=daily_limit,
emails=[team.owner,account_cost.owner]
)
# create chatbot channel
aws_chatbot.SlackChannelConfiguration(
self,
slack_channel_id=config.org.channel,
slack_workspace_id=config.org.workspace,
notification_topics=[b.topic]
)
Solution: Budget Automation
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Solution: Budget Automation
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Results...
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
% Efficiency = (# Engineers) / (WIP)
WIP = (Lead Time) x (Deploy Frequency)
Kickoff Transformation
Thank you!
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Casey Lee
@nektos
Survey Link 
Please complete
the session survey
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.

More Related Content

PDF
AWS Summit DC 2021: Improve the developer experience with AWS CDK
PDF
re:Invent OPN306 AWS Lambda Powertools Lessons 10M downloads.pdf
PPTX
London Microservices Meetup: Lessons learnt adopting microservices
PDF
Speed up your Machine Learning workflows with build-in algorithms
PDF
CRACKED AZ-204 Exam in Just 4 Hours! | Developing Solutions for Microsoft Azu...
PDF
AZ-400 Exam Dumps Online – Proven by Learners Worldwide
PPTX
DevConfZA 2020 : Automating your cloud: What are the building blocks
PPTX
Azure from scratch part 4
AWS Summit DC 2021: Improve the developer experience with AWS CDK
re:Invent OPN306 AWS Lambda Powertools Lessons 10M downloads.pdf
London Microservices Meetup: Lessons learnt adopting microservices
Speed up your Machine Learning workflows with build-in algorithms
CRACKED AZ-204 Exam in Just 4 Hours! | Developing Solutions for Microsoft Azu...
AZ-400 Exam Dumps Online – Proven by Learners Worldwide
DevConfZA 2020 : Automating your cloud: What are the building blocks
Azure from scratch part 4

Similar to 2022 SF Summit - Improving Developer Experience with CDK (15)

PDF
63494602307319107992_VC25_adb_migration_04_MASTER.pdf
PDF
20201013 - Serverless Architecture Conference - How to migrate your existing ...
PDF
Ace AZ-400 in 2025: Updated Dumps PDF, Practice Tests & Expert Tips Included
PDF
COM311 Migrating 600 Databases To AWS
PDF
AWS DATABASE USER GROUP - LAUNCH EVENT (LONDON) December 7, 2022 - COM311 Mi...
PPTX
DoWhy-at-AAAI-ContinualCausality-compressed.pptx
 
PPTX
AWS DevDay Vienna - Automating building blocks choices you will face with con...
DOCX
PRG 420 Week 3 Individual Assignment Netbeans Project (annual co.docx
PPTX
AEM target Integration
PDF
How to build unified Batch & Streaming Pipelines with Apache Beam and Dataflow
PDF
AEM responsive
PDF
CIRCUIT 2015 - Responsive Websites & Grid-Based Layouts
PDF
Responsive Websites and Grid-Based Layouts by Gabriel Walt
PDF
The Business Benefits of GitOps
PDF
AWS Community Day Ireland - Building roads and bridges in the last decade of ...
63494602307319107992_VC25_adb_migration_04_MASTER.pdf
20201013 - Serverless Architecture Conference - How to migrate your existing ...
Ace AZ-400 in 2025: Updated Dumps PDF, Practice Tests & Expert Tips Included
COM311 Migrating 600 Databases To AWS
AWS DATABASE USER GROUP - LAUNCH EVENT (LONDON) December 7, 2022 - COM311 Mi...
DoWhy-at-AAAI-ContinualCausality-compressed.pptx
 
AWS DevDay Vienna - Automating building blocks choices you will face with con...
PRG 420 Week 3 Individual Assignment Netbeans Project (annual co.docx
AEM target Integration
How to build unified Batch & Streaming Pipelines with Apache Beam and Dataflow
AEM responsive
CIRCUIT 2015 - Responsive Websites & Grid-Based Layouts
Responsive Websites and Grid-Based Layouts by Gabriel Walt
The Business Benefits of GitOps
AWS Community Day Ireland - Building roads and bridges in the last decade of ...
Ad

More from Casey Lee (10)

PPTX
The Last Bottleneck of Continuous Delivery
PPTX
Using AWS to Achieve Both Autonomy and Governance at 3M
PPTX
AWS DOs and DONTs
PPTX
AWS re:Invent 2018
PDF
Continuous Delivery on AWS with Zero Downtime
PPTX
Container based CI/CD on GitHub Actions
PPTX
WORKSHOP: Microservices as Containers on AWS
PPTX
Microservices as Containers on AWS . . . for Fun and Profit
PDF
Serverless Delivery
PPTX
Top10 Characteristics of Awesome Apps
The Last Bottleneck of Continuous Delivery
Using AWS to Achieve Both Autonomy and Governance at 3M
AWS DOs and DONTs
AWS re:Invent 2018
Continuous Delivery on AWS with Zero Downtime
Container based CI/CD on GitHub Actions
WORKSHOP: Microservices as Containers on AWS
Microservices as Containers on AWS . . . for Fun and Profit
Serverless Delivery
Top10 Characteristics of Awesome Apps
Ad

Recently uploaded (20)

PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
top salesforce developer skills in 2025.pdf
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
Nekopoi APK 2025 free lastest update
PPTX
Transform Your Business with a Software ERP System
PPTX
Operating system designcfffgfgggggggvggggggggg
PPTX
ai tools demonstartion for schools and inter college
PDF
medical staffing services at VALiNTRY
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
PTS Company Brochure 2025 (1).pdf.......
Internet Downloader Manager (IDM) Crack 6.42 Build 41
top salesforce developer skills in 2025.pdf
How Creative Agencies Leverage Project Management Software.pdf
wealthsignaloriginal-com-DS-text-... (1).pdf
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Odoo Companies in India – Driving Business Transformation.pdf
2025 Textile ERP Trends: SAP, Odoo & Oracle
Which alternative to Crystal Reports is best for small or large businesses.pdf
Reimagine Home Health with the Power of Agentic AI​
Upgrade and Innovation Strategies for SAP ERP Customers
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Nekopoi APK 2025 free lastest update
Transform Your Business with a Software ERP System
Operating system designcfffgfgggggggvggggggggg
ai tools demonstartion for schools and inter college
medical staffing services at VALiNTRY
Odoo POS Development Services by CandidRoot Solutions
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PTS Company Brochure 2025 (1).pdf.......

2022 SF Summit - Improving Developer Experience with CDK

  • 1. S A N F R A N C I S C O | A P R I L 2 0 , 2 0 2 2
  • 2. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Improving developer experience with CDK Casey Lee D E V 2 0 2 Chief Technology Officer Gaggle
  • 3. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Gaggle’s Transformation Story Blocked Items 190,616,612 105% Messages 5,155,335,282 350% Files 6,276,549,392 489% PSS 20,395 61% Human Items 38,815,291 34% Lives Saved 1,338 50%
  • 4. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Challenge: “The tech team never gets anything done...when they do, it is months late!”
  • 5. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. % Efficiency = (# Engineers) / (WIP) WIP = (Lead Time) x (Deploy Frequency) High WIP, Low Efficiency
  • 6. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Challenge: Inability to work in isolation results in long feedback loops
  • 7. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Solution: Provision separate AWS accounts per developer
  • 8. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Challenge: Unable to use existing CI/CD to deploy into dev account
  • 9. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Solution: Use CDK for each application
  • 10. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Solution: Use CDK for each application from gaggle_cdk.core import S3Website, S3JsonFile, apply_permissions_boundary class AppStack(core.Stack): def __init__() -> None: s3_website = S3Website( self, hosted_zone=hosted_zone, website_sources=s3deploy.Source.asset(artifact) ) config = S3JsonFile( bucket=s3_website.bucket, object_key="assets/config.json", values={ "version": os.getenv("CODEBUILD_RESOLVED_SOURCE_VERSION","-"), "identityProviderId": user_pool_idp, "baseApiUrl": base_url, } )
  • 11. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Solution: Automate IAM Permission Boundary from gaggle_cdk.core import apply_permissions_boundary class AppStack(core.Stack): def __init__(self) -> None: apply_permissions_boundary(self)
  • 12. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Solution: Automate Tag Policy tags = GaggleTags( application=application, environment=environment, team=team, some_random_tag=”foo", ) # Create a stack, add resources to it stack = core.Stack(app, "my-stack") # Apply the tags to the stack tags.apply(stack) # Additionally you can apply tags to the entire app tags.apply(app)
  • 13. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Challenge: Deploying dependencies
  • 14. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Solution: Automate build/deploy of dependencies from source
  • 15. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Solution: Automate build/deploy of dependencies from source # Define the commands needed to build build: - npm run build # Define the dependencies to load dependencies: - repo: gaggle-net/service-a.git ref: main # Define the applications to run locally - basedir: infrastructure stacks: ui-stack context: my-context-key: my-context-value
  • 16. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Challenge: QA is now a bottleneck to delivery process
  • 17. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Solution: Separate integration accounts per team
  • 18. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Solution: Create pipeline for each service
  • 19. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Solution: Create pipeline for each service from aws_cdk import core from gaggle_cdk.core.pipelines import DeploymentPipeline class ExamplePipelineStack(core.Stack): def __init__(self,scope: core.Construct): pipeline = DeploymentPipeline( self, github_repo="sample-api", github_org="gaggle-net", integration_account="100000000000", staging_account="200000000000", production_account="300000000000", )
  • 20. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Challenge: Many accounts can be expensive!!
  • 21. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Solution: Budget Automation
  • 22. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. # The 'org' sections defines settings for the entire organization org: owner: org-owner@gaggle.net workspace: T0000000 channel: ZZZZZZZ default_daily_limit: 5 # Teams are containers for accounts. # 'owner' - email address to notify for overages # 'channel' - slack channel to notify for overages teams: - name: FOO owner: alice@gaggle.net channel: YYYYYYYYYYY # Accounts are matched by 'name'. # - 'owner' an additional 'owner' can be specified to be included in overage emails. # - 'daily_limit' can be overridden per team account_costs: - name: developer-alice - name: developer-bob owner: bob@gaggle.net Solution: Budget Automation
  • 23. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. from account_budget import AccountBudget class BudgetsStack(core.Stack): def __init__(self) -> None: for account in accounts: b = AccountBudget( self, account_id=account.id, daily_limit=daily_limit, emails=[team.owner,account_cost.owner] ) # create chatbot channel aws_chatbot.SlackChannelConfiguration( self, slack_channel_id=config.org.channel, slack_workspace_id=config.org.workspace, notification_topics=[b.topic] ) Solution: Budget Automation
  • 24. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 25. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Solution: Budget Automation
  • 26. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Results...
  • 27. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 28. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. % Efficiency = (# Engineers) / (WIP) WIP = (Lead Time) x (Deploy Frequency) Kickoff Transformation
  • 29. Thank you! © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Casey Lee @nektos Survey Link 
  • 30. Please complete the session survey © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Editor's Notes

  • #4: Duration: 120 seconds Talk Track Casey: Talk about who Gaggle is
  • #5: Duration: 30 seconds Talk Track Casey: The challenge

  • #6: Duration: 60 seconds Talk Track Casey: Describe problem: * Lead time = 47 days * Deploy frequency = 2/day * WIP 87 * Efficiency = 12%
  • #7: Duration: 90 seconds Talk Track Casey: Inability to work in isolation -> long feedback loops * developers can’t run everything locally (lambdas, kinesis, sqs, etc) * Forced use of shared account and release branches. * QA owns shared environment and deployed to shared account. SLOW FEEDBACK. → DEV and QA are coupled to get feedback.
  • #8: Duration: 30 seconds Talk Track Casey: Use Control tower to provision each developer their own account
  • #9: Duration: 90 seconds Talk Track Casey: How do they deploy to new accounts? Can’t use bamboo 
  • #10: Duration: 120 seconds Talk Track Casey: Wrap existing CFN templates with CDK where possible. Create shared resources.
  • #11: Duration: 120 seconds Talk Track Casey: Create higher order constructs S3Website – S3 Bucket, CloudFront, Route53, Deploy code S3JsonFile – dynamic values from CFN pushed to JSON file in bucket
  • #12: Duration: 60 seconds Talk Track Casey: IAM Permission Boundary to allow creating IAM policies in CDK, but automatically add the appropriate perm boundary to avoid privilege escalation
  • #13: Duration: 60 seconds Talk Track Casey: We enforce certain tags – make it easy to add those tags to the stack or app
  • #14: Duration: 90 seconds Talk Track Casey: How do I deploy my dependencies?
  • #15: Duration: 120 seconds Talk Track Casey: Define dependencies in code, pull/build/deploy deps Quickly converge any environment to run an app and its deps
  • #16: Duration: 120 seconds Talk Track Casey: CDKR tool. Define deps in YAML. Run deploy Clones dependencies and deploys
  • #17: Duration: 60 seconds Talk Track Casey: Still waiting on QA for all testing – and now devs are providing pressure! Still have shared account and release branches. Bottleneck is now QA. They own shared environment and deployed to shared account. SLOW FEEDBACK. → COUPLING between ALL dev teams to test/release changes. ONLY 1 path to production!
  • #18: Duration: 60 seconds Talk Track Casey: MOAR accounts! New account per team This account allows teams to handle their integration testing in parallel of other teams
  • #19: Duration: 60 seconds Talk Track Casey: Each service gets CodePipeline Explain how dependencies are deployed into team accounts but not to higher accounts
  • #20: Duration: 120 seconds Talk Track Casey: CDK - high level construct for a pipeline Creates build job - use buildspec Creates deploy to integration and runs tests “ Staging “ prod
  • #21: Duration: 60 seconds Talk Track Casey: Hard to manage costs across dozens of accounts Devs trying new things Devs scaling old things Need visibility
  • #22: Duration: 120 seconds Talk Track Casey: Approach: decentralized view into budgets...give ownership to others Automate provisioning of budget per member account Attach SNS top to budget Subscribe slack and email
  • #23: Duration: 120 seconds Talk Track Casey: # 'owner' - email address to notify for overages # 'workspace' - slack workspace id # 'channel' - slack channel to notify for overages # 'default_daily_limit' - a default daily limit for any account that isn't included in a team
  • #24: Duration: 120 seconds Talk Track Casey: Run in master account. Loop through all accounts and create an account budget construct Budget construct does the budget, notifications, and sns topic Include daily limit and emails for notifications Include chatbot from budget SNS topic
  • #25: Duration: 30 seconds Talk Track Casey: Leverage existing AWS tools (budget in console)
  • #26: Duration: 30 seconds Talk Track Casey: Slack message
  • #27: Duration: 5 seconds Talk Track Casey: transition

  • #28: Duration: 12= seconds Talk Track Casey: New process
  • #29: Duration: 90 seconds Talk Track Casey: Results after transformation * Lead time = 47 days -> 12 days * Deploy frequency = 2/day -> 6/day * WIP 72 (40% increase in headcount) Efficiency = 12% -> 61% Pipelines launched efficiency and throughput