Add S3-specific endpoint to generated AWS profile - #473
Conversation
a55a980 to
295b8ed
Compare
96c9c85 to
3f4efd8
Compare
3f4efd8 to
d9e5d98
Compare
joe4dev
left a comment
There was a problem hiding this comment.
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:

Motivation
aws --profile localstackused 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 awsnow 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--forceoverwrite rules as the rest of the profile.Review
Small, self-contained, covered by unit and integration tests. Self-merge candidate.
Closes DEVX-755