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

[Terraform Support] Error Linking Layer to Function Using Local Variable #4396

Open
mildaniel opened this issue Nov 9, 2022 · 1 comment
Labels
area/terraform terraform support issue stage/needs-feedback Needs feedback from the community (are you also interested in/experiencing this?)

Comments

@mildaniel
Copy link
Contributor

mildaniel commented Nov 9, 2022

AWS SAM CLI support for Terraform is in preview as of today. The team has worked hard to implement a solid minimum viable product (MVP) to get feedback from our community. However, there are a few caveats. Please +1 on individual items to help us prioritize these.

AWS SAM CLI does not currently support linking a Lambda Layer to a Lambda Function using Terraform local variables. Doing this will result in a LocalVariablesLinkingLimitationException. Follow this issue for updates on this feature.

@mildaniel mildaniel added the stage/needs-feedback Needs feedback from the community (are you also interested in/experiencing this?) label Nov 9, 2022
@mildaniel mildaniel changed the title [PLACEHOLDER] Incoming Issue B [Terraform Support] Error Linking Layer to Function Using Local Variable Nov 15, 2022
@mildaniel mildaniel reopened this Nov 15, 2022
@moelasmar moelasmar added the area/terraform terraform support issue label Nov 15, 2022
@moelasmar
Copy link
Contributor

moelasmar commented May 12, 2023

You can now try to run terraform apply for your project as a workaround for this limitation issue. You do not need to apply the project with every change you made to the project like updating the lambda function code, but you need it if you added a new Lambda function or a new Lambda Layer to your project, and you faced this limitation. This workaround is supported in SAM CLI stating from version 1.83.0.

Please share with us your feedback about this workaround, and if it is a visible solution for you or not. Also, we are looking for your feedback about if you would like that SAM CLI run terraform apply on behalf of you if it detects that the project is not applied. You will be prompted for sure before applying it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/terraform terraform support issue stage/needs-feedback Needs feedback from the community (are you also interested in/experiencing this?)
Projects
None yet
Development

No branches or pull requests

2 participants