Add --account flag for account selection in lstk aws - #440
Merged
Conversation
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
peter-smith-phd
force-pushed
the
devx-1039-aws-account-option
branch
from
August 10, 2026 19:11
0498527 to
ea417bc
Compare
Co-Authored-By: Claude <noreply@anthropic.com>
peter-smith-phd
marked this pull request as ready for review
August 10, 2026 19:23
skyrpex
added a commit
that referenced
this pull request
Aug 11, 2026
Co-Authored-By: Claude <noreply@anthropic.com>
anisaoshafi
reviewed
Sep 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Prior to this PR,
lstk terraformandlstk samhad accepted--accountto target a specific LocalStack account, butlstk awsdid not support--account. It did support theAWS_ACCESS_KEY_IDenvironment variable, but that only worked on a fresh machine and then silently stopped oncelstk setup awswas run (to createconfig.toml). This happened because lstk was passing--profile localstack, which caused Botocore to ignore all the environment variables.Solution
This PR adds
lstk aws --account <12 digits>, following the terraform/sam convention.Also included are some smaller fixes found along the way, thanks for exhaustive manual testing:
lstk sam --regionwas silently overridden by aregioninsamconfig.toml; it is now also passed on sam's command line, and only when explicitly given.lstk aws --region X --account Y …used to leak--accountto the AWS CLI, while the reverse order worked.Docs
lstk aws --account <id>— 12 digits, before the AWS service name, falling back toAWS_ACCESS_KEY_IDthen the default000000000000.lstk sam --regionnow takes effect oversamconfig.toml; without the flag,samconfig.tomlstill decides.Help text is updated in place;
lstk docsregenerates from it.Closes DEVX-1039
Co-Authored-By: Claude noreply@anthropic.com