Skip to content

Migrate samples to lstk, away from awslocal and tflocal#17

Draft
peter-smith-phd wants to merge 3 commits into
localstack-samples:masterfrom
peter-smith-phd:dpx-503-update-terraform-samples
Draft

Migrate samples to lstk, away from awslocal and tflocal#17
peter-smith-phd wants to merge 3 commits into
localstack-samples:masterfrom
peter-smith-phd:dpx-503-update-terraform-samples

Conversation

@peter-smith-phd

@peter-smith-phd peter-smith-phd commented Jun 8, 2026

Copy link
Copy Markdown

Summary

Standardize all samples on the lstk CLI for starting LocalStack and running Terraform, replacing the awslocal/tflocal wrappers. Modernizing the examples was necessary to get them deploying and passing on CI again.

Fixes applied while migrating

  • API Gateway (REST) deployment orderingaws_api_gateway_deployment now depends on the integration responses, so the deployed snapshot includes them (was returning Internal server error / API_CONFIGURATION_ERROR):
    • apigateway-kinesis-integration, apigateway-kinesis-lambda-integration, apigateway-step-functions-integration
  • HTTP API stages — use the $default stage so the standardized run scripts (no stage prefix) resolve:
    • apigatewayv2-lambda-proxy-integration, apigatewayv2-lambda-request-authorizer-1.0
  • Missing stages / lambda permissions added:
    • apigatewayv2-lambda-proxy, apigatewayv2-lambda-request-authorizer-2.0
  • Authorizer header casing — payload format 2.0 lowercases headers; made the authorizer lambda case-robust (re-zipped) in apigatewayv2-lambda-request-authorizer-2.0
  • Smoke-test assertions corrected (HTTP status vs empty proxy body; relaxed JSON grep)
  • WebSocket integrations — removed invalid request_parameters mappings rejected by LocalStack:
    • apigatewayv2-ws-sample, websocket-deploy
  • MSK — bumped deprecated kafka_version 3.2.03.6.0 in managed-streaming-kafka-cluster
  • Added cluster_info.json (MSK test artifact) to .gitignore

Testing

Each affected sample was deployed against LocalStack and its make test / smoke test run to green; resources were destroyed after verification.

🤖 Generated with Claude Code

peter-smith-phd and others added 2 commits June 8, 2026 13:54
Standardize all samples on the lstk CLI for starting LocalStack and
running Terraform, replacing the awslocal/tflocal wrappers. Modernizing
the examples along the way was necessary to get them deploying and
passing again: fix API Gateway deployment ordering, use $default stages
for HTTP APIs, add missing stages/permissions, and bump deprecated
runtimes and service versions.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Collapse the two root Makefile `lint` targets into one (terraform fmt),
removing the "overriding commands for target lint" warning. The lint
target now skips the sample-archive directory. Replace deprecated
data.aws_region.current.id with .region in apigatewayv2-ws-request-authorizer
to clear the Terraform deprecation warning.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@peter-smith-phd peter-smith-phd force-pushed the dpx-503-update-terraform-samples branch from 0c98d04 to 9cd2e31 Compare June 8, 2026 03:45
Reformat files flagged by `make lint` (whitespace/alignment only).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant