Skip to content

Conversation

@sasidhar-aws
Copy link
Contributor

@sasidhar-aws sasidhar-aws commented Nov 20, 2025

Rollback Plan

If a change needs to be reverted, we will publish an updated version of the library.

Changes to Security Controls

No changes to security controls.

Description

Adding support of tenant isolation for lambda function creation and invocation.

Relations

Closes #45166

References

AWS Lambda announces new tenant isolation mode to simplify building tenant-aware applications
Announcement
Blog post
Requires AWS SDK for Go v2 Release 2025-11-19: #45144.

Output from Acceptance Testing

make testacc TESTS=TestAccLambdaFunction_tenancyConfig PKG=lambda
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
make: Running acceptance tests on branch: 🌿 main 🌿...
TF_ACC=1 go1.24.10 test ./internal/service/lambda/... -v -count 1 -parallel 20 -run='TestAccLambdaFunction_tenancyConfig'  -timeout 360m -vet=off
2025/11/20 12:20:33 Creating Terraform AWS Provider (SDKv2-style)...
2025/11/20 12:20:34 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN   TestAccLambdaFunction_tenancyConfig
=== PAUSE TestAccLambdaFunction_tenancyConfig
=== RUN   TestAccLambdaFunction_tenancyConfigForceNew
=== PAUSE TestAccLambdaFunction_tenancyConfigForceNew
=== CONT  TestAccLambdaFunction_tenancyConfig
=== CONT  TestAccLambdaFunction_tenancyConfigForceNew
--- PASS: TestAccLambdaFunction_tenancyConfig (256.51s)
--- PASS: TestAccLambdaFunction_tenancyConfigForceNew (357.63s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/lambda     363.611s


make testacc TESTS=TestAccLambdaFunctionDataSource_tenancyConfig PKG=lambda
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
make: Running acceptance tests on branch: 🌿 main 🌿...
TF_ACC=1 go1.24.10 test ./internal/service/lambda/... -v -count 1 -parallel 20 -run='TestAccLambdaFunctionDataSource_tenancyConfig'  -timeout 360m -vet=off
2025/11/20 12:28:12 Creating Terraform AWS Provider (SDKv2-style)...
2025/11/20 12:28:12 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN   TestAccLambdaFunctionDataSource_tenancyConfig
=== PAUSE TestAccLambdaFunctionDataSource_tenancyConfig
=== CONT  TestAccLambdaFunctionDataSource_tenancyConfig
--- PASS: TestAccLambdaFunctionDataSource_tenancyConfig (123.03s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/lambda     128.680s

make testacc TESTS=TestAccLambdaInvocation_tenantID PKG=lambda
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
make: Running acceptance tests on branch: 🌿 main 🌿...
TF_ACC=1 go1.24.10 test ./internal/service/lambda/... -v -count 1 -parallel 20 -run='TestAccLambdaInvocation_tenantID'  -timeout 360m -vet=off
2025/11/20 12:15:44 Creating Terraform AWS Provider (SDKv2-style)...
2025/11/20 12:15:44 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN   TestAccLambdaInvocation_tenantID
=== PAUSE TestAccLambdaInvocation_tenantID
=== CONT  TestAccLambdaInvocation_tenantID
--- PASS: TestAccLambdaInvocation_tenantID (181.47s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/lambda     189.285s


make testacc TESTS=TestAccLambdaInvocationDataSource_tenantId PKG=lambda
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
make: Running acceptance tests on branch: 🌿 main 🌿...
TF_ACC=1 go1.24.10 test ./internal/service/lambda/... -v -count 1 -parallel 20 -run='TestAccLambdaInvocationDataSource_tenantId'  -timeout 360m -vet=off
2025/11/20 12:32:47 Creating Terraform AWS Provider (SDKv2-style)...
2025/11/20 12:32:47 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN   TestAccLambdaInvocationDataSource_tenantId
=== PAUSE TestAccLambdaInvocationDataSource_tenantId
=== CONT  TestAccLambdaInvocationDataSource_tenantId
--- PASS: TestAccLambdaInvocationDataSource_tenantId (147.44s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/lambda     154.634s

make testacc TESTS=TestAccLambdaInvokeAction_tenantId PKG=lambda
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
make: Running acceptance tests on branch: 🌿 f_lambda_tenancy 🌿...
TF_ACC=1 go1.24.10 test ./internal/service/lambda/... -v -count 1 -parallel 20 -run='TestAccLambdaInvokeAction_tenantId'  -timeout 360m -vet=off
2025/11/20 12:53:47 Creating Terraform AWS Provider (SDKv2-style)...
2025/11/20 12:53:47 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN   TestAccLambdaInvokeAction_tenantId
=== PAUSE TestAccLambdaInvokeAction_tenantId
=== CONT  TestAccLambdaInvokeAction_tenantId
    invoke_action_test.go:221: Terraform CLI version 1.6.4 is below minimum version 1.14.0: skipping test
--- SKIP: TestAccLambdaInvokeAction_tenantId (0.71s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/lambda     6.392s

@sasidhar-aws sasidhar-aws requested a review from a team as a code owner November 20, 2025 17:40
@github-actions
Copy link
Contributor

Community Guidelines

This comment is added to every new Pull Request to provide quick reference to how the Terraform AWS Provider is maintained. Please review the information below, and thank you for contributing to the community that keeps the provider thriving! 🚀

Voting for Prioritization

  • Please vote on this Pull Request by adding a 👍 reaction to the original post to help the community and maintainers prioritize it.
  • Please see our prioritization guide for additional information on how the maintainers handle prioritization.
  • Please do not leave +1 or other comments that do not add relevant new information or questions; they generate extra noise for others following the Pull Request and do not help prioritize the request.

Pull Request Authors

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 20, 2025

✅ Thank you for correcting the previously detected issues! The maintainers appreciate your efforts to make the review process as smooth as possible.

@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/lambda Issues and PRs that pertain to the lambda service. size/XL Managed by automation to categorize the size of a PR. partner Contribution from a partner. labels Nov 20, 2025
@ewbankkit ewbankkit added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Nov 21, 2025
@ewbankkit ewbankkit self-assigned this Nov 21, 2025
@github-actions github-actions bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Nov 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. partner Contribution from a partner. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. service/lambda Issues and PRs that pertain to the lambda service. size/XL Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lambda tenant isolation mode

2 participants