Skip to content

data/aws_lambda_function fails to get container image based lambda #16945

@mousiefasil

Description

@mousiefasil

Hi everyone,

I have a project where I am using container images to build Lambdas, in a second project I am want to retrieve them via data aws_lambda_function, but i get a 400 with the error Code signing is not supported for functions created with container images.

I was able narrow the issue down to the data aws_lambda_function part, this issue prevails over mutliple version of terraform so I guess it is a bug in the provider.aws.

Thx in advance.

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform CLI and Terraform AWS Provider Version

Terraform v0.12.6

  • provider.aws v3.22.0

Your version of Terraform is out of date! The latest version
is 0.14.3. You can update by downloading from www.terraform.io/downloads.html

and

Terraform v0.14.2

  • provider registry.terraform.io/hashicorp/aws v3.22.0

Your version of Terraform is out of date! The latest version
is 0.14.3. You can update by downloading from https://www.terraform.io/downloads.html

Affected Resource(s)

  • data aws_lambda_function

Terraform Configuration Files

Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.

please see below

Debug Output

Panic Output

Expected Behavior

return of an aws_lambda_function object.

Actual Behavior

Error: error getting Lambda Function (XXX) Code Signing Config: InvalidParameterValueException: Code signing is not supported for functions created with container images.

{
  RespMetadata: {
    StatusCode: 400,
    RequestID: "************"
  },
  Message_: "Code signing is not supported for functions created with container images.",
  Type: "User"
}

Steps to Reproduce

Simplest use case:

main.tf
---
provider "aws" {
    region = "eu-central-1"
}

data "aws_lambda_function" "lambda" {
    function_name = "foo"
}
---
  1. terraform init
  2. terraform plan

Important Factoids

References

I saw that the aws documentation mentions that code signer ist not working with container image based lambdas.
Link

  • #0000

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAddresses a defect in current functionality.service/lambdaIssues and PRs that pertain to the lambda service.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions