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

Safe Lambda Deployments - San Francisco - 2019-...

sullis
June 13, 2019

Safe Lambda Deployments - San Francisco - 2019-06-13

AWS Lambda
safe deployments
Serverless Nights San Francisco
June 13, 2019

sullis

June 13, 2019
Tweet

More Decks by sullis

Other Decks in Programming

Transcript

  1. @Drake I probably relate more to the casual developer who

    writes JavaScript and is not super athletic
  2. @Drake I try to make production deployments look easy, but

    the behind-the-scenes stuff is a challenge
  3. Losing game 1 to the Raptors was frustrating, but not

    as frustrating as the bad production deployments that I've seen
  4. “Your deploys should be as boring, straightforward, and stress-free as

    possible” Zach Holman March 2016 https://zachholman.com/posts/deploying-software
  5. “You don't need release managers, you don't need special deploy

    days, you don't need all hands on deck for every single deploy.” Zach Holman March 2016 https://zachholman.com/posts/deploying-software
  6. “We love to deploy new code incrementally hundreds of times

    a day. And there's good reason for that: it's safer overall. Incremental deploys are easier to understand and fix” https://zachholman.com/talk/move-fast-break-nothing/ Zach Holman October 2014
  7. I never wanted to play basketball, I just wanted to

    write code and deploy to production
  8. HBC email types • order acknowledgement • order shipment partial

    • order shipment full • order cancel • ready for pickup in store
  9. Queue consumer Event queue Email Dashboard UI Email Sender Email

    Render External Email Provider Feature Flag service
  10. Move Fast and Break Things Move Slow and Don’t Break

    Things Move Fast and Don’t Break Things Move Purposefully and Fix Things
  11. You can now shift incoming traffic between two AWS Lambda

    function versions based on pre-assigned weights. You can now also use AWS CodeDeploy to automatically manage the rollout of new function versions. This allows you to gradually shift traffic between two versions source: aws.amazon.com
  12. $ brew update $ brew tap aws/tap $ brew install

    aws/tap/aws-sam-cli $ brew install aws-cli
  13. aws cloudformation package \ --template-file my-template.yaml \ --s3-bucket mycorp-codedeploy \

    --s3-prefix my-lambda-func/jars \ --output-template-file package/2325bd1e.yaml
  14. aws cloudformation deploy \ --template-file package/2325bd1e.yaml \ --stack-name mylambda-func—xyz \

    --parameter-overrides Stage=xyz \ --parameter-overrides DeploymentPref=Canary10Percent5Minutes \ --region us-east-1 \ --capabilities CAPABILITY_IAM \ --notification-arns arn:aws:sns:us- east-1:123456789:myteam-cf-notifications
  15. additional validation logic in Pre Traffic hook implement Post Traffic

    hook utilize AWS Cloud9 IDE Future work at HBC
  16. I'd rather be hated for the code that I’ve deployed

    than loved for winning an NBA title
  17. To win MVP was a dream come true for sure,

    but I'd rather deploy code to production