Slide 1

Slide 1 text

© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. Automating CI/CD on AWS with GitHub Actions Derek Bingham (he / him) Developer Advocate Amazon Web services DEVOPS TALKS CONFERENCE 2022

Slide 2

Slide 2 text

© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 2 Speaker.Who() ; Derek Bingham 20 + Years as a Software Developer Specialising in Cloud Native Applications 4+ Years at AWS Originally from Ireland, now living in Australia

Slide 3

Slide 3 text

© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. The ‘Joy’ of infrequent releases 3

Slide 4

Slide 4 text

© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. Introduce Automation 4 Merge, test and release code more frequently

Slide 5

Slide 5 text

© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. Automate everything ? 5 1. Code Merge 2. Lint Code 3. Build/compile code 4. Run tests 5. Provision architecture 6. Run Security and compliance checks 7. Deployment – either immediately or after approval 8. Testing

Slide 6

Slide 6 text

© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. We need choices 6

Slide 7

Slide 7 text

© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. Today’s Automation Challenge 7 Flask app running in a container We need to deploy to the AWS cloud Deploy regular releases Using our preferred orchestrator GitHub Actions Deployment mechanism needs to be flexible

Slide 8

Slide 8 text

© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. Meet the services 8 There are lots you CAN use – but these are what I have chosen

Slide 9

Slide 9 text

© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 9 Container Registry Amazon ECR A place to store container images, every time we want to build and deploy code

Slide 10

Slide 10 text

© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 10 Orchestration Operationalizes the effort to run, manage, and scale containerized workloads AWS Fargate

Slide 11

Slide 11 text

© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 11 Infra as Code • Use the expressive power of a higher- level programming language rather than json, yaml, or a proprietary format • Use programming idioms like parameters, conditionals, loops, composition, and inheritance to model your system • Unit test this code using common test frameworks AWS CDK

Slide 12

Slide 12 text

© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 12 GitHub Actions Implement complex orchestration and CI/CD functionality in GitHub by initiating a workflow on any GitHub event

Slide 13

Slide 13 text

© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 13 Anatomy of an Action

Slide 14

Slide 14 text

© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. Demo 14

Slide 15

Slide 15 text

© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. Automate 15

Slide 16

Slide 16 text

© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 16

Slide 17

Slide 17 text

© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. Demo 17

Slide 18

Slide 18 text

© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. That’s good but … 18

Slide 19

Slide 19 text

© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 19 Build AWS CodeBuild • I want to create tasks that run inside AWS • I don’t want to run my tests in GitHub • I want to reduce my security blast radius • I want to be flexible.

Slide 20

Slide 20 text

© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 20

Slide 21

Slide 21 text

© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. Demo 21

Slide 22

Slide 22 text

© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 22 Key Takeaways Automation IS everything Embrace the choices and challenges it creates AWS and GitHub Actions can solve many of these challenges Don’t assume there is only ONE way ever again Go Build

Slide 23

Slide 23 text

© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. Thank you! Derek Bingham Senior Developer Advocate AWS DEVOPS TALKS CONFERENCE 2022