How To Use GitHub Actions • Automate Your AWS Deployments

Поделиться
HTML-код
  • Опубликовано: 25 июн 2024
  • Learn how to automate your code deployments with GitHub actions.
    In this project, I'll show you how to use GitHub actions to automate the deployment (CI/CD) of an AWS project. The project is a simple Python API hosted on AWS Lambda (managed with AWS CDK).
    We'll learn how to set up a simple GitHub action workflow to deploy the project to our AWS account on each commit. We'll also look at how to add a version number that increments automatically with each commit, and how to cache workflow steps (so we don't have to do the same things over and over again).
    🔗 Links
    Project Code: github.com/pixegami/aws-cicd-...
    GitHub Actions: github.com/features/actions
    AWS CLI: aws.amazon.com/cli/
    AWS CDK: docs.aws.amazon.com/cdk/v2/gu...
    📚 Chapters
    00:00 Introduction
    00:38 What is CICD?
    01:51 Create an AWS CDK Project
    05:46 Create GitHub Actions Workflow for CDK Deploy
    10:18 Automate Version Bump with Git Hooks
    12:42 Caching Workflow Steps
    14:35 Deploy a Major Infrastructure Update

Комментарии • 24

  • @JohnVold
    @JohnVold 10 месяцев назад +3

    Great stuff! I really appreciate how you started simple and then added more complexity. Makes it easier to follow :)

    • @pixegami
      @pixegami  10 месяцев назад

      Thanks! That's what I intended, so glad to hear it's worked for you :)

  • @VincentFulco
    @VincentFulco 5 месяцев назад +2

    You are a great and thorough teacher.

  • @Hellbending
    @Hellbending 9 месяцев назад +2

    You’re absolutely awesome bro!
    It’s good to see a RUclipsr that is clear, concise and really explains those little questions that end up in the back of your head when you watch videos. And better still; really explores and fleshes out some of them with real-world use cases.
    Also nice to see another Aussie out here on the platform 👌
    Never change brother, absolutely do not believe that you only have 11 K subs 🤣🤣🤣 so high quality content and not just the “high-level concept” stuff.
    Keep up the grind man you’re content is great and I love the style ❤

    • @pixegami
      @pixegami  9 месяцев назад

      Thank you 🙏 I really appreciate the message. I do put a fair bit of thought into structuring the videos and keeping them lean as possible, so it's encouraging to hear feedback like yours - especially from a fellow Aussie! 🦘

  • @ramiroalegre8183
    @ramiroalegre8183 Месяц назад +1

    useful information! thanks

    • @pixegami
      @pixegami  Месяц назад

      Glad it was helpful!

  • @luke8818
    @luke8818 9 месяцев назад +2

    very useful, thanks!

    • @pixegami
      @pixegami  9 месяцев назад

      Glad it was helpful!

  • @geebsayshi
    @geebsayshi 10 месяцев назад +2

    Great video thank you. You got a new subscriber. Can you do a similar video on deploying a Llama 2 model to AWS sage maker using GA?

    • @pixegami
      @pixegami  9 месяцев назад +1

      Thanks! I haven't used SageMaker or Llama yet but it looks like an interesting idea. I'll note it down for future video ideas. Thank you :)

  • @anzakx
    @anzakx 4 дня назад

    Did something change with the deployment process. I am going through this and running into an issue where I get an error about an empty zip file but I did not see any steps about zipping the package.

  • @prajganesh
    @prajganesh 9 месяцев назад +2

    Do you use Typescript for CDK and Python for Lambda? Have you tried Golang by any chance?

    • @pixegami
      @pixegami  8 месяцев назад

      Yup! I like both Typescript and Python, so I will use TS whenever it's the native language (CDK, React, NextJS etc) , but I'm more comfortable with Python so I lean towards that for all other cases.
      I've used GoLang before, and it's quite nice to work in. It's faster than Python, but unless you really want that extra speed and type-safety, Python's wide adoption (libraries, SDKs, etc) is a stronger selling point for me.

  • @rhinethetauren
    @rhinethetauren 3 месяца назад +1

    Great video! I am slightly stuck -- I have VS Code set up and connected to GH , and GH setup with AWS through secrets / actions. However, I don't have a .git folder in my VS Code repo in order to locate the pre-commit hook. How's your VS Code have that, is it a separate plugin or did I init Git incorrectly? ~11min30s
    Edit: I was able to fix that by updating JSON Settings for exclude .git: false

    • @pixegami
      @pixegami  3 месяца назад

      Glad you solved it :)

  • @mateuszbieda3189
    @mateuszbieda3189 24 дня назад

    Where to create AWS key and secret key into the environment variable for your GitHub Actions page? Is it in the Secret Manager on AWS?

    • @pixegami
      @pixegami  19 дней назад

      Nah, for this one, to keep it simple I just store all my environment variables on GitHub's secret manager (not the AWS one). Even if you store secrets in AWS, you'll still need some secrets in GitHub anyway, so your GitHub workflow can access AWS.

  • @eclecticism
    @eclecticism 5 месяцев назад

    im first.
    Unable to resolve AWS account to use. It must be either configured when you define your CDK Stack, or through the environment error

    • @pixegami
      @pixegami  5 месяцев назад +1

      Hmm, did you set your AWS key and secret key into the environment variable for your GitHub Actions page?

    • @eclecticism
      @eclecticism 5 месяцев назад

      @@pixegami fix thanx

  • @lelandconn
    @lelandconn Месяц назад +1

    Deploying it the first time worked but now am facing error "Cannot find module './aws-cicd-tutorial-stack.ts'

    • @pixegami
      @pixegami  Месяц назад

      Hmm, sorry - it's a bit hard for me to debug or help, without seeing the full context of the project :( But if it worked the first time, can you compare what's changed between then and now?