Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest aws provider version (3.17.0) breaks loading of lambdas into localstack #16430

Closed
rayjlinden opened this issue Nov 25, 2020 · 4 comments
Closed
Labels
bug Addresses a defect in current functionality. regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. service/lambda Issues and PRs that pertain to the lambda service.

Comments

@rayjlinden
Copy link

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.13.5

Affected Resource(s)

  • aws_3.17.0

Terraform Configuration Files

resource "aws_lambda_function" "webhook_lambda" {
  function_name = "webhook_lambda"
  filename      = "lambdas/webhook_lambda.zip"
  role          = "fake_role"
  handler       = "webhook_lambda"
  runtime       = "go1.x"
  timeout       = 30
  environment {
    variables = {
      SERVICE_NAME = "webhook_lambda"

      SETTINGSDB_USE_REDIS = "true"
      SETTINGSDB_ENDPOINT = "foo.com:6379"
      SETTINGSDB_PASSWORD = "blah"
      LOG_FLUENT_ENDPOINT = "foo.com:24224"
      LOG_FLUENT_SUFFIX = ".log"
      LOG_AUGMENT_LIST = "ENVIRONMENT"
      ENVIRONMENT = "sandbox"

    }
  }
}

Debug Output

2020-11-25T07:40:09.526Z [DEBUG] plugin.terraform-provider-aws_v3.17.0_x5: 2020/11/25 07:40:09 [DEBUG] [aws-sdk-go] DEBUG: Request lambda/GetFunctionCodeSigningConfig Details:
2020-11-25T07:40:09.526Z [DEBUG] plugin.terraform-provider-aws_v3.17.0_x5: ---[ REQUEST POST-SIGN ]-----------------------------
2020-11-25T07:40:09.526Z [DEBUG] plugin.terraform-provider-aws_v3.17.0_x5: GET /2020-06-30/functions/receipt_lambda/code-signing-config HTTP/1.1
2020-11-25T07:40:09.526Z [DEBUG] plugin.terraform-provider-aws_v3.17.0_x5: Host: localstack:4566
2020-11-25T07:40:09.526Z [DEBUG] plugin.terraform-provider-aws_v3.17.0_x5: User-Agent: aws-sdk-go/1.35.34 (go1.14.5; linux; amd64) APN/1.0 HashiCorp/1.0 Terraform/0.13.5 (+https://www.terraform.io)
2020-11-25T07:40:09.526Z [DEBUG] plugin.terraform-provider-aws_v3.17.0_x5: Authorization: AWS4-HMAC-SHA256 Credential=fake/20201125/us-west-2/lambda/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature=ef877e89a28f3755e9bab9ebee28faf645e78ef2c29d438752f19757e30bc19d
2020-11-25T07:40:09.526Z [DEBUG] plugin.terraform-provider-aws_v3.17.0_x5: Content-Type: application/json
2020-11-25T07:40:09.526Z [DEBUG] plugin.terraform-provider-aws_v3.17.0_x5: X-Amz-Date: 20201125T074009Z
2020-11-25T07:40:09.526Z [DEBUG] plugin.terraform-provider-aws_v3.17.0_x5: Accept-Encoding: gzip
2020-11-25T07:40:09.526Z [DEBUG] plugin.terraform-provider-aws_v3.17.0_x5:
2020-11-25T07:40:09.526Z [DEBUG] plugin.terraform-provider-aws_v3.17.0_x5:
2020-11-25T07:40:09.526Z [DEBUG] plugin.terraform-provider-aws_v3.17.0_x5: -----------------------------------------------------
2020-11-25T07:40:09.575Z [DEBUG] plugin.terraform-provider-aws_v3.17.0_x5: 2020/11/25 07:40:09 [DEBUG] [aws-sdk-go] DEBUG: Response lambda/GetFunctionCodeSigningConfig Details:
2020-11-25T07:40:09.575Z [DEBUG] plugin.terraform-provider-aws_v3.17.0_x5: ---[ RESPONSE ]--------------------------------------
2020-11-25T07:40:09.575Z [DEBUG] plugin.terraform-provider-aws_v3.17.0_x5: HTTP/1.1 404
2020-11-25T07:40:09.575Z [DEBUG] plugin.terraform-provider-aws_v3.17.0_x5: Connection: close
2020-11-25T07:40:09.575Z [DEBUG] plugin.terraform-provider-aws_v3.17.0_x5: Content-Length: 232
2020-11-25T07:40:09.575Z [DEBUG] plugin.terraform-provider-aws_v3.17.0_x5: Access-Control-Allow-Headers: authorization,content-type,content-md5,cache-control,x-amz-content-sha256,x-amz-date,x-amz-security-token,x-amz-user-agent,x-amz-target,x-amz-acl,x-amz-version-id,x-localstack-target,x-amz-tagging
2020-11-25T07:40:09.575Z [DEBUG] plugin.terraform-provider-aws_v3.17.0_x5: Access-Control-Allow-Methods: HEAD,GET,PUT,POST,DELETE,OPTIONS,PATCH
2020-11-25T07:40:09.575Z [DEBUG] plugin.terraform-provider-aws_v3.17.0_x5: Access-Control-Allow-Origin: *
2020-11-25T07:40:09.575Z [DEBUG] plugin.terraform-provider-aws_v3.17.0_x5: Access-Control-Expose-Headers: x-amz-version-id
2020-11-25T07:40:09.575Z [DEBUG] plugin.terraform-provider-aws_v3.17.0_x5: Content-Type: text/html; charset=utf-8
2020-11-25T07:40:09.575Z [DEBUG] plugin.terraform-provider-aws_v3.17.0_x5: Date: Wed, 25 Nov 2020 07:40:09 GMT
2020-11-25T07:40:09.575Z [DEBUG] plugin.terraform-provider-aws_v3.17.0_x5: Server: hypercorn-h11
2020-11-25T07:40:09.575Z [DEBUG] plugin.terraform-provider-aws_v3.17.0_x5:
2020-11-25T07:40:09.575Z [DEBUG] plugin.terraform-provider-aws_v3.17.0_x5:
2020-11-25T07:40:09.575Z [DEBUG] plugin.terraform-provider-aws_v3.17.0_x5: -----------------------------------------------------
2020-11-25T07:40:09.575Z [DEBUG] plugin.terraform-provider-aws_v3.17.0_x5: 2020/11/25 07:40:09 [DEBUG] [aws-sdk-go] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
2020-11-25T07:40:09.575Z [DEBUG] plugin.terraform-provider-aws_v3.17.0_x5: <title>404 Not Found</title>
2020-11-25T07:40:09.575Z [DEBUG] plugin.terraform-provider-aws_v3.17.0_x5: <h1>Not Found</h1>
2020-11-25T07:40:09.575Z [DEBUG] plugin.terraform-provider-aws_v3.17.0_x5: <p>The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.</p>
2020-11-25T07:40:09.575Z [DEBUG] plugin.terraform-provider-aws_v3.17.0_x5: 2020/11/25 07:40:09 [DEBUG] [aws-sdk-go] DEBUG: Validate Response lambda/GetFunctionCodeSigningConfig failed, attempt 19/25, error SerializationError: failed to unmarshal response error
2020-11-25T07:40:09.575Z [DEBUG] plugin.terraform-provider-aws_v3.17.0_x5: 	status code: 404, request id:
2020-11-25T07:40:09.575Z [DEBUG] plugin.terraform-provider-aws_v3.17.0_x5: caused by: UnmarshalError: failed decoding error message
2020-11-25T07:40:09.575Z [DEBUG] plugin.terraform-provider-aws_v3.17.0_x5: 	00000000  3c 21 44 4f 43 54 59 50  45 20 48 54 4d 4c 20 50  |<!DOCTYPE HTML P|
49 43 20 22 2d  2f 2f 57 33 43 2f 2f 44  |UBLIC "-//W3C//D|
2020-11-25T07:40:09.575Z [DEBUG] plugin.terraform-provider-aws_v3.17.0_x5: 00000020  54 44 20 48 54 4d 4c 20  33 2e 32 20 46 69 6e 61  |TD HTML 3.2 Fina|
2020-11-25T07:40:09.575Z [DEBUG] plugin.terraform-provider-aws_v3.17.0_x5: 00000030  6c 2f 2f 45 4e 22 3e 0a  3c 74 69 74 6c 65 3e 34  |l//EN">.<title>4|
2020-11-25T07:40:09.575Z [DEBUG] plugin.terraform-provider-aws_v3.17.0_x5: 00000040  30 34 20 4e 6f 74 20 46  6f 75 6e 64 3c 2f 74 69  |04 Not Found</ti|
2020-11-25T07:40:09.575Z [DEBUG] plugin.terraform-provider-aws_v3.17.0_x5: 00000050  74 6c 65 3e 0a 3c 68 31  3e 4e 6f 74 20 46 6f 75  |tle>.<h1>Not Fou|
2020-11-25T07:40:09.575Z [DEBUG] plugin.terraform-provider-aws_v3.17.0_x5: 00000060  6e 64 3c 2f 68 31 3e 0a  3c 70 3e 54 68 65 20 72  |nd</h1>.<p>The r|
2020-11-25T07:40:09.575Z [DEBUG] plugin.terraform-provider-aws_v3.17.0_x5: 00000070  65 71 75 65 73 74 65 64  20 55 52 4c 20 77 61 73  |equested URL was|
2020-11-25T07:40:09.575Z [DEBUG] plugin.terraform-provider-aws_v3.17.0_x5: 00000080  20 6e 6f 74 20 66 6f 75  6e 64 20 6f 6e 20 74 68  | not found on th|
2020-11-25T07:40:09.575Z [DEBUG] plugin.terraform-provider-aws_v3.17.0_x5: 00000090  65 20 73 65 72 76 65 72  2e 20 49 66 20 79 6f 75  |e server. If you|
2020-11-25T07:40:09.575Z [DEBUG] plugin.terraform-provider-aws_v3.17.0_x5: 000000a0  20 65 6e 74 65 72 65 64  20 74 68 65 20 55 52 4c  | entered the URL|
2020-11-25T07:40:09.575Z [DEBUG] plugin.terraform-provider-aws_v3.17.0_x5: 000000b0  20 6d 61 6e 75 61 6c 6c  79 20 70 6c 65 61 73 65  | manually please|
2020-11-25T07:40:09.575Z [DEBUG] plugin.terraform-provider-aws_v3.17.0_x5: 000000c0  20 63 68 65 63 6b 20 79  6f 75 72 20 73 70 65 6c  | check your spel|
2020-11-25T07:40:09.575Z [DEBUG] plugin.terraform-provider-aws_v3.17.0_x5: 000000d0  6c 69 6e 67 20 61 6e 64  20 74 72 79 20 61 67 61  |ling and try aga|
2020-11-25T07:40:09.575Z [DEBUG] plugin.terraform-provider-aws_v3.17.0_x5: 000000e0  69 6e 2e 3c 2f 70 3e 0a                           |in.</p>.|
2020-11-25T07:40:09.575Z [DEBUG] plugin.terraform-provider-aws_v3.17.0_x5:
2020-11-25T07:40:09.575Z [DEBUG] plugin.terraform-provider-aws_v3.17.0_x5: caused by: invalid character '<' looking for beginning of value

Panic Output

No panic - just hangs.

Expected Behavior

Just trying to use terraform to load a lambda (among other things) to a localstack instance. Been working great for many months. This latest release broke the uploading of lambdas.

It is failing because the provider wants to call the new APIs for signing the lambdas. These endpoints do not exist in localstack.

I expect that even without these APIs implemented terraform could still load lambdas into localstack.

Actual Behavior

Actual, behavior is terraform retries over and over again to the non-existent endpoints. The "apply" never finishes or just hangs.

  1. terraform apply

Just do an apply of any lambda into an instance of localstack.

Running against localstack.

None.

@ghost ghost added the service/lambda Issues and PRs that pertain to the lambda service. label Nov 25, 2020
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Nov 25, 2020
@ewbankkit
Copy link
Contributor

@ewbankkit ewbankkit added bug Addresses a defect in current functionality. regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. and removed needs-triage Waiting for first response or review from a maintainer. labels Nov 25, 2020
@github-actions
Copy link

Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label.

If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!

@github-actions github-actions bot added the stale Old or inactive issues managed by automation, if no further action taken these will get closed. label Nov 15, 2022
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 16, 2022
@whummer
Copy link

whummer commented Dec 16, 2022

For anyone discovering this issue - this should be fixed in the latest version of LocalStack. Please open an issue against the LocalStack main repo if the problem persists: https://github.com/localstack/localstack Thanks!

@github-actions github-actions bot removed the stale Old or inactive issues managed by automation, if no further action taken these will get closed. label Dec 16, 2022
@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. service/lambda Issues and PRs that pertain to the lambda service.
Projects
None yet
Development

No branches or pull requests

3 participants