AWS Lambda CI CD | Github Actions | NodeJS | Express | ES6

AWS Lambda CI CD | Github Actions | NodeJS | Express | ES6

Hey Do Code

10 месяцев назад

917 Просмотров

In the following video, I guide you through the steps of deploying your Express server to a Lambda function. I will explain the process to demonstrate how surprisingly straightforward it can be.

► Social Media
GitHub: bit.ly/3WUJ3sf
Linkedin: bit.ly/3jYhRdo

Music by: Bensound.com/royalty-free-music
License code: EVB1WNQBXBJGW5P8

Main.yml

name: Deploy

on:
push:
branches:
- main

jobs:
deploy_lambda:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: "16"

- name: Install dependencies and bundle code
env:
CI: true
run: |
npm ci
zip -r publish.zip ./*
- name: Deploy to AWS Lambda
run: |
aws lambda update-function-code --function-name func-name-replace --zip-file fileb://publish.zip --region your-region-replace
env:
AWS_ACCESS_KEY_ID: key_replace
AWS_SECRET_ACCESS_KEY: key_replace
Ссылки и html тэги не поддерживаются


Комментарии: