Skip to content

Commit bd0f512

Browse files
committed
fix region name
Signed-off-by: Sylvain Hellegouarch <[email protected]>
1 parent 7d271d9 commit bd0f512

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
[Unreleased]: https://github.com/chaostoolkit-incubator/chaostoolkit-aws/compare/0.21.1...HEAD
66

7+
### Fixed
8+
9+
- fixed `chaosaws.s3.controls.upload` region for url
10+
711
## [0.21.1][] - 2022-07-12
812
[0.21.1]: https://github.com/chaostoolkit-incubator/chaostoolkit-aws/compare/0.21.0...0.21.1
913

chaosaws/s3/controls/upload.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,11 @@ def after_experiment_control(
6464
ts = datetime.utcnow().replace(tzinfo=timezone.utc).isoformat()
6565
suffix = f"-{ts}"
6666

67+
dirpath = dirpath.rstrip("/")
6768
path = f"{dirpath}/journal{suffix}.{ext}"
6869

6970
# setting the absolute url of the uploaded journal into the journal itself
70-
region = configuration.get("aws_region")
71+
region = client.meta.region_name
7172
url = f"https://{bucket_name}.s3.{region}.amazonaws.com/{dirpath}/{path}"
7273
extra = state.setdefault("extra", {})
7374
extra_journal = extra.setdefault("journal", {})

0 commit comments

Comments
 (0)