Skip to content

[Bug]: swift AssumeRole example gives missing region authError #6992

@ramink

Description

@ramink

Expected behavior

I expected to either get a list of S3 buckets, or to get some sort of authentication error.

Actual behavior

The program errored out, because of a "Missing region in auth scheme parameters for SigV4 auth scheme."

Steps to reproduce

1. cloned examples repo
2. cd <repo>/swift/example_code/sts/AssumeRole
3. swift run AssumeRole arn:anything_here_the_arn_seems_not_to_matter
4. I also tried with CL options for access-key, secret-key, and even session-token associated with a real ARN, but got the same result.

Also, sorry, I can't tell what version of the SDK gets pulled by the `swift run` command.

Logs / stacktrace (if applicable)

▿ Smithy.ClientError.authError
  - authError: "Missing region in auth scheme parameters for SigV4 auth scheme."
ERROR: Error assuming role in runAsync: authError("Missing region in auth scheme parameters for SigV4 auth scheme.")
Error: assumeRoleFailed

Which SDK were you using?

Swift

Which OS were you using?

macOS

SDK version

latest

OS version

macOS Sequoia 15.0.1

Metadata

Metadata

Assignees

Labels

BugAn update to fix incorrect code or typos.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions