Skip to content

Ministack: Free, open-source local AWS emulator - 60+ services, Terraform compatible, real databases. Free forever. MIT licensed.

release v1.5.29 (#2252)

Nahuel Nucera593838dad4fc
diff --git a/CHANGELOG.md b/CHANGELOG.md
index df4c7c49..25a8051b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,8 @@ Versioning follows [Semantic Versioning](https://semver.org/).
## [Unreleased]
+## [1.5.29] — 2026-10-17
+
### Added
- **Managed Service for Apache Flink — control plane** — `kinesisanalyticsv2` applications for the `FLINK-*` runtimes: create, describe, update and delete, start and stop with the model's status transitions, snapshots, CloudWatch logging options and tags, per account and region. Updates bump `ApplicationVersionId` and the `ConditionalToken`, and a stale one returns `ConcurrentModificationException`. CloudFormation creates, updates and deletes `AWS::KinesisAnalyticsV2::Application`, `AWS::KinesisAnalyticsV2::ApplicationCloudWatchLoggingOption` and `AWS::Logs::LogStream`, so a CDK Flink stack deploys. Contributed by @Jolley71717.
- **Managed Service for Apache Flink — job execution** — with Docker available, starting a `FLINK-1_19` or `FLINK-1_20` application runs its jar from MiniStack S3 in the official Apache Flink image (1.19.1 or 1.20.5, Java 11) with a JobManager and a TaskManager, its runtime properties at `/etc/flink/application_properties.json`, its configured parallelism and checkpointing, and its AWS calls pointed at MiniStack in the application's account. Snapshots are Flink savepoints, restores resume the job's state, and a job that fails to start returns the application to `READY`. Jars in `/opt/ministack/flink-lib` (for example a mounted `aws-kinesisanalytics-runtime`) are added to every cluster. Without Docker the control plane behaves as before. Contributed by @Jolley71717.
@@ -22,11 +24,12 @@ Versioning follows [Semantic Versioning](https://semver.org/).
- **SQS — an empty policy removes it** — `SetQueueAttributes` with an empty `Policy` or `RedriveAllowPolicy` stored the empty string, and an empty `RedrivePolicy` was refused; each now removes the attribute, as Terraform's policy resources expect. Contributed by @kinoh.
- **AppSync Events — `event` is a string** — subscribers' `data` messages carried `event` as a one-element array; it is now the JSON-encoded string, as AWS sends it. Contributed by @edbramwell.
- **S3 — Object Lock is per version** — retention and legal holds were stored per key, so a lock on one version blocked permanent deletes of the key's other versions; they now belong to the version they were set on, `GetObjectRetention`, `PutObjectRetention` and the legal-hold calls take `versionId`, and a `DeleteObject` or `DeleteObjects` without a `VersionId` on a locked key adds a delete marker instead of answering 403. Reported by @bettiah.
-- **S3 — Object Lock headers need an Object Lock bucket** — `PutObject` and browser POST uploads with `x-amz-object-lock-*` headers on a bucket created without Object Lock applied the lock; they now answer 400 `InvalidRequest` `Bucket is missing ObjectLockConfiguration`. Reported by @bettiah.
+- **S3 — Object Lock headers need an Object Lock bucket** — `PutObject`, `CopyObject`, `CreateMultipartUpload` and browser POST uploads with `x-amz-object-lock-*` headers on a bucket created without Object Lock applied the lock; they now answer 400 `InvalidRequest` `Bucket is missing ObjectLockConfiguration`. Reported by @bettiah.
- **KMS — `ScheduleKeyDeletion` window** — a `PendingWindowInDays` outside 7–30 was accepted; it now answers `ValidationException` `PendingWindowInDays must be between 7 and 30`. Reported by @bettiah.
- **KMS — RSASSA-PSS salt** — signatures used a maximum-length salt; they now use a salt as long as the digest, as AWS does, and `Verify` expects the same. Reported by @bettiah.
-- **KMS — RSA encryption algorithms** — `Encrypt` and `Decrypt` used OAEP SHA-256 whatever `EncryptionAlgorithm` named; they now use `RSAES_OAEP_SHA_1` or `RSAES_OAEP_SHA_256` as named, so a mismatched `Decrypt` answers `InvalidCiphertextException`, and an algorithm the key doesn't support answers `InvalidKeyUsageException`. Reported by @bettiah.
-- **KMS — `Sign` and `Verify` input checks** — a digest of the wrong length or an algorithm the key spec doesn't support crashed with a 500; they now answer 400 `ValidationException` (`Digest is invalid length for algorithm …`) and `InvalidKeyUsageException`. Reported by @bettiah.
+- **KMS — RSA encryption algorithms** — `Encrypt` and `Decrypt` used OAEP SHA-256 whatever `EncryptionAlgorithm` named; they now use `RSAES_OAEP_SHA_1` or `RSAES_OAEP_SHA_256` as named, so a mismatched `Decrypt`, or one without `EncryptionAlgorithm`, answers `InvalidCiphertextException`, and an `Encrypt` with an algorithm the key doesn't support answers `InvalidKeyUsageException`. Reported by @bettiah.
+- **KMS — `Sign` and `Verify` input checks** — a digest of the wrong length or an algorithm the key spec doesn't support crashed with a 500; they now answer 400 `ValidationException` (`Digest is invalid length for algorithm …`) and `InvalidKeyUsageException`, and an unknown algorithm name answers the enum `ValidationException`. Reported by @bettiah.
+- **CloudFormation — `AWS::S3::MultiRegionAccessPoint` `Ref` when the access point exists** — a create that found an existing Multi-Region Access Point of the same name returned its alias as the physical id; `Ref` now returns the name in that case too.
## [1.5.28] — 2026-10-16
diff --git a/README.md b/README.md
index 769ea37b..33ee58bb 100644
--- a/README.md
+++ b/README.md
@@ -522,6 +522,10 @@ subnet = ec2.create_subnet(
| `AWS::Lambda::EventSourceMapping` | UUID | — |
| `AWS::Lambda::EventInvokeConfig` | Unique function/qualifier identifier | — |
| `AWS::S3::BucketPolicy` | Bucket name | — |
+| `AWS::S3::AccessPoint` | Access point name | Alias, Arn, Name, NetworkOrigin |
+| `AWS::S3::MultiRegionAccessPoint` | Multi-Region Access Point name | Alias, CreatedAt |
+| `AWS::S3ObjectLambda::AccessPoint` | Object Lambda Access Point name | Alias.Status, Alias.Value, Arn, CreationDate |
+| `AWS::S3ObjectLambda::AccessPointPolicy` | Object Lambda Access Point name | — |
| `AWS::SQS::QueuePolicy` | Policy ID | — |
| `AWS::SNS::TopicPolicy` | Policy ID | — |
| `AWS::ApiGateway::RestApi` | API ID | RootResourceId |
diff --git a/ministack/services/cloudformation/provisioners.py b/ministack/services/cloudformation/provisioners.py
index b181bc20..2ce536a2 100644
--- a/ministack/services/cloudformation/provisioners.py
+++ b/ministack/services/cloudformation/provisioners.py
@@ -1426,8 +1426,7 @@ def _s3_mrap_create(logical_id, props, stack_name):
existing = _s3.find_mrap(name)
if existing is not None and existing.get("Name") == name:
- return existing["Alias"], {"Alias": existing["Alias"],
- "CreatedAt": existing["CreatedAt"]}
+ return name, {"Alias": existing["Alias"], "CreatedAt": existing["CreatedAt"]}
# strict=False: the provisioner has never applied the S3 Control bucket checks.
record = _s3.create_mrap(name, buckets, props.get("PublicAccessBlockConfiguration") or {}, strict=False)
diff --git a/ministack/services/kms.py b/ministack/services/kms.py
index 87aeab0e..00acae02 100644
--- a/ministack/services/kms.py
+++ b/ministack/services/kms.py
@@ -836,10 +836,24 @@ def _verify(data):
})
+_SIGNING_ALGORITHM_ENUM = (
+ "RSASSA_PSS_SHA_256", "RSASSA_PSS_SHA_384", "RSASSA_PSS_SHA_512", "RSASSA_PKCS1_V1_5_SHA_256",
+ "RSASSA_PKCS1_V1_5_SHA_384", "RSASSA_PKCS1_V1_5_SHA_512", "ECDSA_SHA_256", "ECDSA_SHA_384", "ECDSA_SHA_512",
+ "ED25519_SHA_512", "ED25519_PH_SHA_512", "SM2DSA", "ML_DSA_SHAKE_256",
+)
+
+
def _algorithm_error(rec, algorithm, field):
"""InvalidKeyUsageException for an algorithm the key spec doesn't support."""
if algorithm in rec.get(field, []):
return None
+ if field == "SigningAlgorithms" and algorithm not in _SIGNING_ALGORITHM_ENUM:
+ return error_response_json(
+ "ValidationException",
+ f"1 validation error detected: Value '{algorithm}' at 'signingAlgorithm' failed to satisfy constraint: "
+ f"Member must satisfy enum value set: [{', '.join(_SIGNING_ALGORITHM_ENUM)}]",
+ 400,
+ )
return error_response_json(
"InvalidKeyUsageException",
f"Algorithm {algorithm} is incompatible with key spec {rec.get('KeySpec', '')}.",
@@ -1192,9 +1206,9 @@ def _decrypt(data):
if err:
return err
algorithm = data.get("EncryptionAlgorithm", "SYMMETRIC_DEFAULT")
- err = _algorithm_error(rec, algorithm, "EncryptionAlgorithms")
- if err:
- return err
+ if algorithm not in rec.get("EncryptionAlgorithms", []):
+ # Observed on AWS: RSA Decrypt without a matching algorithm is an opaque invalid ciphertext.
+ return error_response_json("InvalidCiphertextException", "", 400)
try:
plaintext = rec["_private_key"].decrypt(ciphertext, _oaep_padding(algorithm))
except ValueError:
diff --git a/ministack/services/s3.py b/ministack/services/s3.py
index a8b4281e..e026e4c8 100644
--- a/ministack/services/s3.py
+++ b/ministack/services/s3.py
@@ -5828,6 +5828,9 @@ def _copy_object(bucket_name: str, dest_key: str, headers: dict):
dest_bucket = _ensure_bucket(bucket_name)
if dest_bucket is None:
return _no_such_bucket(bucket_name)
+ lock_err = _object_lock_header_error(bucket_name, headers)
+ if lock_err:
+ return lock_err
# A canned ACL on the copy applies to the destination, as it does on a
# put; an unknown value rejects the whole request rather than being
@@ -7544,6 +7547,9 @@ def _create_multipart_upload(bucket_name: str, key: str, headers: dict):
bucket = _ensure_bucket(bucket_name)
if bucket is None:
return _no_such_bucket(bucket_name)
+ lock_err = _object_lock_header_error(bucket_name, headers)
+ if lock_err:
+ return lock_err
storage_class, sc_err = _resolve_storage_class(headers)
if sc_err:
diff --git a/pyproject.toml b/pyproject.toml
index 2628f447..9c000872 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "ministack"
-version = "1.5.28"
+version = "1.5.29"
description = "Free, open-source local AWS emulator — drop-in LocalStack replacement"
readme = "README.md"
license = { file = "LICENSE" }
diff --git a/tests/test_kms.py b/tests/test_kms.py
index cccecdf6..7f3f170d 100644
--- a/tests/test_kms.py
+++ b/tests/test_kms.py
@@ -2928,3 +2928,26 @@ def test_kms_sign_refuses_a_wrong_digest_length_or_algorithm(kms_client):
with pytest.raises(ClientError) as exc:
kms_client.sign(KeyId=ec_key, Message=b"x" * 32, MessageType="DIGEST", SigningAlgorithm="RSASSA_PSS_SHA_256")
assert exc.value.response["Error"]["Code"] == "InvalidKeyUsageException"
+
+
+def test_kms_sign_unknown_algorithm_is_an_enum_validation_error(kms_client):
+ key_id = kms_client.create_key(KeySpec="RSA_2048", KeyUsage="SIGN_VERIFY")["KeyMetadata"]["KeyId"]
+ with pytest.raises(ClientError) as exc:
+ kms_client.sign(KeyId=key_id, Message=b"x" * 32, MessageType="DIGEST", SigningAlgorithm="NOT_A_SIGNING_ALGORITHM")
+ error = exc.value.response["Error"]
+ assert error["Code"] == "ValidationException"
+ assert error["Message"].startswith(
+ "1 validation error detected: Value 'NOT_A_SIGNING_ALGORITHM' at 'signingAlgorithm' failed to satisfy "
+ "constraint: Member must satisfy enum value set: [RSASSA_PSS_SHA_256, ")
+
+
+def test_kms_rsa_decrypt_without_algorithm_is_invalid_ciphertext(kms_client):
+ key_id = kms_client.create_key(KeySpec="RSA_2048", KeyUsage="ENCRYPT_DECRYPT")["KeyMetadata"]["KeyId"]
+ blob = kms_client.encrypt(KeyId=key_id, Plaintext=b"secret", EncryptionAlgorithm="RSAES_OAEP_SHA_256")["CiphertextBlob"]
+ with pytest.raises(ClientError) as exc:
+ kms_client.decrypt(KeyId=key_id, CiphertextBlob=blob)
+ assert exc.value.response["Error"]["Code"] == "InvalidCiphertextException"
+ with pytest.raises(ClientError) as exc:
+ kms_client.encrypt(KeyId=key_id, Plaintext=b"secret")
+ assert exc.value.response["Error"] == {
+ "Code": "InvalidKeyUsageException", "Message": "Algorithm SYMMETRIC_DEFAULT is incompatible with key spec RSA_2048."}
diff --git a/tests/test_s3.py b/tests/test_s3.py
index cb166590..5fbca136 100644
--- a/tests/test_s3.py
+++ b/tests/test_s3.py
@@ -9503,3 +9503,35 @@ def test_s3_object_lock_applies_to_its_version_only(s3):
s3.delete_object(Bucket=bkt, Key="k", VersionId=locked)
assert exc.value.response["Error"]["Code"] == "AccessDenied"
+
+def test_s3_copy_and_multipart_refuse_object_lock_headers_without_object_lock(s3):
+ from datetime import datetime, timedelta, timezone
+
+ bkt = f"intg-s3-nolock-cp-{_uuid_mod.uuid4().hex[:8]}"
+ s3.create_bucket(Bucket=bkt)
+ s3.put_bucket_versioning(Bucket=bkt, VersioningConfiguration={"Status": "Enabled"})
+ s3.put_object(Bucket=bkt, Key="src", Body=b"x")
+ until = datetime.now(timezone.utc) + timedelta(days=1)
+ calls = (
+ lambda: s3.copy_object(Bucket=bkt, Key="dst", CopySource={"Bucket": bkt, "Key": "src"},
+ ObjectLockMode="COMPLIANCE", ObjectLockRetainUntilDate=until),
+ lambda: s3.copy_object(Bucket=bkt, Key="dst", CopySource={"Bucket": bkt, "Key": "src"},
+ ObjectLockLegalHoldStatus="OFF"),
+ lambda: s3.create_multipart_upload(Bucket=bkt, Key="mpu", ObjectLockMode="COMPLIANCE",
+ ObjectLockRetainUntilDate=until),
+ lambda: s3.create_multipart_upload(Bucket=bkt, Key="mpu", ObjectLockLegalHoldStatus="ON"),
+ )
+ try:
+ for call in calls:
+ with pytest.raises(ClientError) as exc:
+ call()
+ err = exc.value.response
+ assert (err["Error"]["Code"], err["Error"]["Message"], err["ResponseMetadata"]["HTTPStatusCode"]) == (
+ "InvalidRequest", "Bucket is missing ObjectLockConfiguration", 400)
+ assert [o["Key"] for o in s3.list_objects_v2(Bucket=bkt)["Contents"]] == ["src"]
+ assert "Uploads" not in s3.list_multipart_uploads(Bucket=bkt)
+ finally:
+ for v in s3.list_object_versions(Bucket=bkt).get("Versions", []):
+ s3.delete_object(Bucket=bkt, Key=v["Key"], VersionId=v["VersionId"])
+ s3.delete_bucket(Bucket=bkt)
+