Skip to content

Add S3-specific endpoint to generated AWS profile - #473

Open
anisaoshafi wants to merge 1 commit into
mainfrom
support-s3-to-aws-profile
Open

Add S3-specific endpoint to generated AWS profile#473
anisaoshafi wants to merge 1 commit into
mainfrom
support-s3-to-aws-profile

Conversation

@anisaoshafi

@anisaoshafi anisaoshafi commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Motivation

aws --profile localstack used directly (not through lstk's own proxies) sent S3 requests to the profile's general endpoint, breaking S3's virtual-host-style bucket addressing.

Solution

lstk setup aws now writes an S3 endpoint override in a [services localstack] block, referenced via services = localstack in the profile. It reuses the existing endpoint.S3Addressing helper already used by the Terraform/CDK proxies. This block follows the same idempotency and --force overwrite rules as the rest of the profile.

Review

Small, self-contained, covered by unit and integration tests. Self-merge candidate.

Closes DEVX-755

@anisaoshafi anisaoshafi added semver: patch docs: skip Pull request does not require documentation changes labels Aug 27, 2026
@anisaoshafi
anisaoshafi force-pushed the support-s3-to-aws-profile branch 3 times, most recently from a55a980 to 295b8ed Compare August 31, 2026 14:42
@anisaoshafi
anisaoshafi force-pushed the support-s3-to-aws-profile branch 3 times, most recently from 96c9c85 to 3f4efd8 Compare September 5, 2026 13:39
@anisaoshafi
anisaoshafi force-pushed the support-s3-to-aws-profile branch from 3f4efd8 to d9e5d98 Compare September 5, 2026 13:41
@anisaoshafi
anisaoshafi marked this pull request as ready for review September 5, 2026 16:23
@anisaoshafi
anisaoshafi requested review from a team and peter-smith-phd as code owners September 5, 2026 16:23
@anisaoshafi
anisaoshafi enabled auto-merge (squash) September 5, 2026 16:24

@joe4dev joe4dev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to see S3 compatibility addressed in the AWS profile. That's particularly important to cdk. I really like the non-destructive edit in ~/.aws/profile 👏 ✨

A couple of non-blocking questions/suggestions:

❓ Do we want to offer a fallback for customers being blocked by DNS rebind protection, similar to the probing we do in the LocalStack Toolkit https://github.com/localstack/localstack-toolkit-vscode/pull/51?

This block follows the same idempotency and --force overwrite rules as the rest of the profile.

❓ What is the intended behavior of --force?
Given an existing ~/.aws/profile, both non-force and --force performed a non-destructive edit. Does --force simply skip the interactive "[Y/n]" prompt?

nit: The confirmation message "✔︎ Created LocalStack profile in ~/.aws/config" does not distinguish between Create and Update.

Sidenotes

Not directly related, just FYI:

  • The lstk aws proxy command does not respect the --profile localstack. Is this intentional or is there a workaround?
  • The AWS VSCode Extension cannot parse the service-specific section and spams verbose logs (their bug):
    Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs: skip Pull request does not require documentation changes semver: patch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants