AWS Lambda Deployment Made Easy with GitHub Actions

Great News for the Serverless Community! 🚀

On August 7th, AWS released the aws-actions/aws-lambda-deploy action for GitHub Actions, designed to streamline the deployment and configuration updates for Lambda functions on AWS.

How Di…


This content originally appeared on DEV Community and was authored by Quoc-Hung Hoang

Great News for the Serverless Community! 🚀

On August 7th, AWS released the aws-actions/aws-lambda-deploy action for GitHub Actions, designed to streamline the deployment and configuration updates for Lambda functions on AWS.

How Did Lambda Deployment Work Before?

Previously, developers had to manually define AWS SDK commands (or use IaC tools like Terraform or SAM) to build, package code artifacts, and upload them as zip files or through S3 buckets for Lambda function deployment:

  1. Build code from source
  2. Package into ZIP files or container images
  3. Upload to S3 buckets, ECR, or as zip files
  4. Update Lambda function configuration

The New Solution: Just One Action!

Now you simply need to declare aws-actions/aws-lambda-deploy in your GitHub Actions workflow with parameters like: function-name, code-artifacts-dir (directory containing Lambda function source code), handler, and runtime.

Under the hood, this action leverages the AWS SDK for JavaScript and packages everything into a unified, user-friendly experience.

Check out the detailed release announcement here.

Real-World Implementation

Here's a GitHub Actions workflow from the Instagram Post Extractor project—a Lambda function that extracts metadata from Instagram posts.

name: Lambda CD Pipeline
permissions:
  id-token: write # Required for OIDC authentication

on:
  push:
    branches: [ development ]
  workflow_dispatch:

env:
  AWS_REGION: ap-southeast-1
  S3_BUCKET: ig-post-extractor-artifact
  LAMBDA_NAME: IgPostExtractor

jobs:
  deploy:
    name: Deploy
    runs-on: ubuntu-latest

    steps:
    - name: Checkout
      uses: actions/checkout@v4

    - name: Configure AWS credentials with OIDC
      # Use OpenID Connect (OIDC) to authenticate with AWS to avoid
      # storing AWS credentials as long-lived GitHub secrets
      uses: aws-actions/configure-aws-credentials@v4
      with:
        role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
        aws-region: ${{ env.AWS_REGION }}

    - name: Deploy Lambda Function
      id: deploy
      uses: aws-actions/aws-lambda-deploy@v1
      with:
        function-name: ${{ env.LAMBDA_NAME }}
        code-artifacts-dir: src/functions/
        s3-bucket: ${{ env.S3_BUCKET }}
        # Generate unique S3 key with timestamp and git commit hash
        s3-key: functions/"$(date +%Y%m%d%H%M%S)-${{ github.sha }}"
        handler: ig_post_extractor.lambda_handler
        runtime: python3.12


This content originally appeared on DEV Community and was authored by Quoc-Hung Hoang


Print Share Comment Cite Upload Translate Updates
APA

Quoc-Hung Hoang | Sciencx (2025-08-09T16:13:21+00:00) AWS Lambda Deployment Made Easy with GitHub Actions. Retrieved from https://www.scien.cx/2025/08/09/aws-lambda-deployment-made-easy-with-github-actions/

MLA
" » AWS Lambda Deployment Made Easy with GitHub Actions." Quoc-Hung Hoang | Sciencx - Saturday August 9, 2025, https://www.scien.cx/2025/08/09/aws-lambda-deployment-made-easy-with-github-actions/
HARVARD
Quoc-Hung Hoang | Sciencx Saturday August 9, 2025 » AWS Lambda Deployment Made Easy with GitHub Actions., viewed ,<https://www.scien.cx/2025/08/09/aws-lambda-deployment-made-easy-with-github-actions/>
VANCOUVER
Quoc-Hung Hoang | Sciencx - » AWS Lambda Deployment Made Easy with GitHub Actions. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/08/09/aws-lambda-deployment-made-easy-with-github-actions/
CHICAGO
" » AWS Lambda Deployment Made Easy with GitHub Actions." Quoc-Hung Hoang | Sciencx - Accessed . https://www.scien.cx/2025/08/09/aws-lambda-deployment-made-easy-with-github-actions/
IEEE
" » AWS Lambda Deployment Made Easy with GitHub Actions." Quoc-Hung Hoang | Sciencx [Online]. Available: https://www.scien.cx/2025/08/09/aws-lambda-deployment-made-easy-with-github-actions/. [Accessed: ]
rf:citation
» AWS Lambda Deployment Made Easy with GitHub Actions | Quoc-Hung Hoang | Sciencx | https://www.scien.cx/2025/08/09/aws-lambda-deployment-made-easy-with-github-actions/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.