Deployment fails
axisotherwise opened this issue · comments
Hello. The main.yml worked normally until 3 days ago. However, when I just ran it, an error screen such as "result" was printed and the deployment failed. Modified is the logic of the lambda function, not the main.yml script and environment variables. Can you tell me the answer? Note that if you clear and run the role property, it will run normally.
main.yml
jobs:
hotfix:
runs-on: ubuntu-20.04
if: ${{ contains(github.event.head_commit.message, 'hotfix') }}
defaults:
run:
working-directory: ./hotfix
strategy:
matrix:
node-version: [16.x]
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Cache node_modules
uses: actions/cache@v2
id: cache
with:
path: node_modules
key: npm-packages-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
- name: Lambda function zip
run: zip -r hotfix-resized.zip ./index.js ./package.json ./package-lock.json ./node_modules
- name: Deploy lambda function
uses: appleboy/lambda-action@master
with:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_KEY }}
aws_region: ${{ secrets.AWS_REGION }}
function_name: default-test
zip_file: ./hotfix/hotfix-resized.zip
dry_run: true
debug: true
memory_size: 512
role: arn:aws:iam::636928289631:role/service-role/default-deploy-role-5jy2h7si
timeout: 30
handler: index.handler
runtime: nodejs16.x
result
duplicate issue: #46