appleboy / lambda-action

GitHub Action for Deploying Lambda code to an existing function

Home Page:https://github.com/marketplace/actions/aws-lambda-deploy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Please provide ImageUri when updating a function with packageType Image.

kerim1510 opened this issue · comments

I got the following error:

2021/02/23 14:47:09 InvalidParameterValueException InvalidParameterValueException: Please provide ImageUri when updating a function with packageType Image.
{
  RespMetadata: {
    StatusCode: 400,
    RequestID: "d5747570-f7e0-4637-9e0a-868c82106c61"
  },
  Message_: "Please provide ImageUri when updating a function with packageType Image.",
  Type: "User"
}

When using the following params:

Run appleboy/lambda-action@v0.1.1
  with:
    aws_access_key_id: ***
    aws_secret_access_key: ***
    aws_region: ***
    function_name: ***
    image_uri: ***
    publish: true
    memory_size: 0
    timeout: 0
  env:
    AWS_DEFAULT_REGION: ***
    AWS_REGION: ***
    AWS_ACCESS_KEY_ID: ***
    AWS_SECRET_ACCESS_KEY: ***

Any advise?

Same issue:

    - with:
        function_name: api-server-container
        image_uri: ${{ steps.ecr.outputs.account }}.dkr.ecr.us-east-1.amazonaws.com/${{secrets.IMAGENAME}}
        aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
        aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
        publish: 'true'
      uses: appleboy/lambda-action@v0.1.1
      name: Update API-Server Lambda
      id: update-lambda

One difference is that I get the error twice in the output:

2021/02/27 18:00:42 InvalidParameterValueException InvalidParameterValueException: Please provide ImageUri when updating a function with packageType Image.
{
  RespMetadata: {
    StatusCode: 400,
    RequestID: "6c6a114c-9a87-4413-b134-18622df592e7"
  },
  Message_: "Please provide ImageUri when updating a function with packageType Image.",
  Type: "User"
}
2021/02/27 18:00:42 InvalidParameterValueException: Please provide ImageUri when updating a function with packageType Image.
{
  RespMetadata: {
    StatusCode: 400,
    RequestID: "6c6a114c-9a87-4413-b134-18622df592e7"
  },
  Message_: "Please provide ImageUri when updating a function with packageType Image.",
  Type: "User"
}

When I look at the code in drone-lambda, https://github.com/appleboy/drone-lambda/blob/master/main.go, it seems to be using "image-uri", so the mismatch could be causing this issue. Commit: appleboy/drone-lambda@9b9a054 Even if you pass image-uri, the rest of the steps don't work, and fail with the same error.

I will take it.

I will take it.

@appleboy, is this commit bf21f0c already a fix for this issue?

@kerim1510 Yes. I will bump the new version of lambda-action