Commit Graph
2049 Commits
Author SHA1 Message Date
David 628952ecf0 feat(glue): catalog resource policy and Data Catalog encryption settings (#4027)
* feat(glue): catalog resource policy and Data Catalog encryption settings

Add PutResourcePolicy, GetResourcePolicy, GetResourcePolicies and
DeleteResourcePolicy with the PolicyExistsCondition and
PolicyHashCondition checks Terraform relies on, and Get/Put
DataCatalogEncryptionSettings with the documented defaults.

ConnectionPasswordEncryption is applied rather than stored: while it is
on, CreateConnection and UpdateConnection encrypt PASSWORD and the four
Kafka passwords with the configured KMS key and keep them under their
documented ENCRYPTED_* names, so reads return the ciphertext and a
missing key is GlueEncryptionException.

Closes #4023

* docs(glue): cite the source for connection password encryption timing and drop an unsourced claim

The developer guide states that whether a password is encrypted was
decided when the connection was created or updated, which is the
source for connections keeping their plaintext; the missing-key error
is described as the error CreateConnection and UpdateConnection list
rather than as AWS behaviour. Also replaces a var in the compat test
with the explicit type.
2026-09-20 17:32:36 -04:00
Priamo Germosen 2d56d85e9e fix(cognito): accept USER_SRP_AUTH in AdminInitiateAuth (#3973)
AdminInitiateAuth documents USER_SRP_AUTH as a valid AuthFlow, but only the ADMIN_USER_SRP_AUTH spelling, which is not an AuthFlowType value, was mapped. Accept the SDK spelling alongside it.
2026-09-20 16:56:58 -04:00
Matheus André db2e0ab8d7 fix(cognito): omit AvailableChallenges from RespondToAuthChallenge responses (#4025)
AvailableChallenges is declared on InitiateAuthResponse and
AdminInitiateAuthResponse only, but the SELECT_CHALLENGE path copied it
onto the RespondToAuthChallenge and AdminRespondToAuthChallenge
responses as well. Keep it on the InitiateAuth responses and drop it
from the challenge responses issued when answering SELECT_CHALLENGE.

Closes #4003
2026-09-20 16:46:07 -04:00
Matheus André 173854cdeb fix(lifecycle): run afterReset on every Resettable when a beforeReset throws (#4024)
performReset stops every managed container first, then walks the
Resettable list and adds each service to `prepared` right before calling
its beforeReset(). When one beforeReset() threw, the loop stopped and
every later service was never added, so the finally block skipped their
afterReset(). Their teardown had already run, though: the SageMaker
training runner and endpoint manager had shut their worker pools down
and EcsService had stopped its reconciler, and those are only restored
in afterReset() (#3937). After such a reset every CreateTrainingJob,
CreateEndpoint and UpdateEndpoint returned 500 with
RejectedExecutionException and ECS services were never reconciled again
until the process restarted.

The finally block now runs afterReset() over the full service list in
reverse order, dropping the `prepared` list. afterReset() already had to
tolerate a reset that failed before clear(); tolerating one that failed
before beforeReset() is the same contract, and the Resettable Javadoc
now says so. A controller test registers a Resettable whose
beforeReset() throws between two others and asserts that the error is
rethrown, the wipe and clear() are skipped, and afterReset() still runs
on all three, including the one whose beforeReset() never ran.

Closes #3952
Closes #3796
2026-09-20 16:41:37 -04:00
vamsiakandVamsi Akavarapu 4c64f2e397 fix(stepfunctions): preserve object details in PutEvents (#4022)
Co-authored-by: Vamsi Akavarapu <16164447+vamsiak@users.noreply.github.com>
2026-09-20 16:39:03 -04:00
XuJian eb18b4ab1f fix(cloudfront): preserve policy configurations (#4009)
* fix(cloudfront): preserve policy configurations

* fix(cloudfront): align policy config edge cases
2026-09-20 16:33:18 -04:00
XuJian b791e04566 fix(transfer): preserve server detail structures (#3928)
* fix(transfer): preserve server detail structures

* fix(transfer): preserve endpoint detail value types
2026-09-20 16:29:58 -04:00
Hector Ventura dd60fefc4b refactor(cloudformation): move ApiGatewayV2 types into ApiGatewayV2CfnProvisioner (#4021)
Extracts the six AWS::ApiGatewayV2::* types (Api, Authorizer, Deployment, Integration, Route, Stage) and the OpenAPI body subsystem out of the CloudFormationResourceProvisioner monolith into a dedicated ApiGatewayV2CfnProvisioner, continuing the per-service provisioner migration.

Behavior is preserved for the attributes the monolith already set (Ref and each Fn::GetAtt). Moving AWS::ApiGatewayV2::Api into the registry subjects it to the schema-coverage gate, which surfaced the readOnly ExecuteApiArn attribute the monolith never published; it is now set to arn:<partition>:execute-api:<region>:<account>:<apiId>, the prefix a Lambda permission builds its SourceArn from.

The monolith's failed-update tracking now delegates to the registry owner through a new mergeFailedUpdateResourceTracking hook, so the provisioner carries its body-materialized route, integration, and authorizer tracking forward itself.
2026-09-20 16:27:08 -04:00
Abhigya e1ae6b3b1f refactor(ecs): take request objects and split out the response writer (#4016)
* feat(docker): add cpu limits and readonly rootfs to container specs

ECS expresses CPU as units where 1024 units is one vCPU, and a task
definition can ask for a container's own filesystem to be read only.
Neither reached the Docker host config.

ContainerSpec gains nanoCpus, cpuShares and readonlyRootfs, the builder
gains withCpuUnits, withCpuShares and withReadonlyRootfs, and
ContainerLifecycleManager maps them onto withNanoCPUs, withCpuShares and
withReadonlyRootfs. Existing convenience constructors keep their old
shapes and default the three new components, so no current caller
changes behaviour.

Docker refuses a NanoCpus above the host's CPU count, while ECS accepts a
task cpu of up to 196608 units, so a 16 vCPU task asked for verbatim
would fail to start on a smaller machine. The quota is held to the
daemon's reported NCPU, read once and left alone when the daemon does not
report one.

ContainerLifecycleManagerCpuLimitTest builds a spec through the builder,
captures the HostConfig on create and pins the unit conversion, the
zero/negative guards, the cpuShares passthrough, readonlyRootfs and both
sides of the clamp.

* refactor(ecs): take request objects and split out the response writer

ECS's launch operations were reached through positional argument lists
that had grown past what a signature can carry: registerTaskDefinition
took ten parameters, createService thirteen, and the handler had started
setting members on the returned object afterwards because there was
nowhere in the signature to put them. EcsJsonHandler had grown the same
way, with request parsing and response rendering, roughly half the file
each, interleaved.

CreateClusterRequest, RegisterTaskDefinitionRequest, RunTaskRequest,
CreateServiceRequest, UpdateServiceRequest, CreateTaskSetRequest and
ListTasksRequest carry what their operation was already given. Each
positional overload stays, building the request and delegating, so the
CloudFormation, EventBridge, Scheduler and Step Functions call sites are
untouched. RegisterTaskDefinition's volumes and runtimePlatform move
into the request, which removes the post-hoc mutate-and-persist the
handler needed to get them onto the stored definition.

EcsResponseWriter takes the node builders out of the handler verbatim.
The handler keeps a taskNode delegate, which is what the Step Functions
ecs:runTask integration renders through, and a constructor that builds
its own writer for the tests that assemble it without CDI.

No behaviour changes: every response is byte-for-byte what it was, and
the existing ECS, CodeDeploy, EventBridge and Step Functions suites pass
unchanged apart from the handler unit tests, which stub the request-object
overload instead of the positional one.
2026-09-20 16:23:08 -04:00
danielvanza 94976360ac fix(iam): use SecureRandom for secret credentials and tokens (#3960) 2026-09-20 16:17:50 -04:00
Hector Ventura e648b6b934 refactor(cloudformation): move IAM ManagedPolicy into IamManagedPolicyCfnProvisioner (#3972)
Move AWS::IAM::ManagedPolicy, the last IAM type in the monolith, into a new IamManagedPolicyCfnProvisioner over IamService. Ref and Fn::GetAtt PolicyArn return the policy ARN. On UpdateStack with an unchanged name PolicyDocument is applied as a new default version in place, pruning the oldest versions under IAM's five-version cap and detaching roles no longer listed, and a mid-update failure restores the version and attachment state this pass changed. Delete detaches the roles before DeletePolicy, tolerating an already-gone attachment.

Stacked on #3971 (inline Policy); merge that first. The move resolves PolicyArn and DefaultVersionId as Fn::GetAtt keys and records the five other read-only attributes (AttachmentCount, CreateDate, UpdateDate, IsAttachable, PermissionsBoundaryUsageCount) as gaps, since leaving LEGACY_SWITCH subjects the type to CfnSchemaCoverageTest. The small managed-policy delete helpers are duplicated with IamPolicyCfnProvisioner's legacy path for now, to be collapsed into a shared helper once both land.
2026-09-20 12:04:15 -05:00
Simone Primarosa aede31c99c fix(eks): store and return encryptionConfig and logging on clusters (#4007)
* fix(eks): store and return encryptionConfig and logging on clusters

* docs(eks): retain access policies in unsupported features list
2026-09-20 12:40:42 -04:00
David a793776c1a feat(glue): Data Catalog connections (#3939)
* feat(glue): Data Catalog connections

Add CreateConnection, GetConnection, GetConnections, UpdateConnection,
DeleteConnection, BatchDeleteConnection and TestConnection. A connection
precedes every job and crawler in a Glue stack and Terraform reads it on
each plan, so without it a stack with an aws_glue_connection could not
get past its first plan.

Behaviour follows the Glue API reference: HidePassword omits PASSWORD
and ENCRYPTED_PASSWORD, UpdateConnection redefines the connection rather
than merging into it, ConnectionInput is validated against the documented
limits and enumerations, credentials are accepted and never returned,
and TestConnection accepts a well-formed request with an empty body
without opening a socket.

Closes #3938

* feat(glue): cap BatchDeleteConnection at 25 names and document HidePassword's scope

The API reference caps ConnectionNameList at 25 entries; a longer list
is now InvalidInputException. HidePassword's coverage of the Kafka
credential keys is not documented by AWS, so the docs page states that
Floci removes PASSWORD and ENCRYPTED_PASSWORD only.
2026-09-20 12:29:28 -04:00
vamsiakandVamsi Akavarapu 957542d172 feat(eventbridge): start Step Functions targets (#4006)
Co-authored-by: Vamsi Akavarapu <16164447+vamsiak@users.noreply.github.com>
2026-09-20 11:36:26 -04:00
Priamo Germosen 0e02d34c6b fix(apigatewayv2): pin the checked address and cover WebSocket HTTP integrations (#3978)
Connect http:// hostname targets to the address that was checked instead of resolving the name a second time, and apply the link-local and metadata check to the WebSocket HTTP and HTTP_PROXY integrations. The pinned socket path now returns an empty body for HEAD, 204, 304 and 1xx responses.
2026-09-20 09:13:50 -05:00
Priamo Germosen 2697868e86 fix(codeartifact): populate resourceId/resourceType on error responses (#3977)
Every ConflictException, ResourceNotFoundException, and ServiceQuotaExceededException
the service threw carried a message only, but the wire model declares
resourceId/resourceType on all three, and the AWS SDK exposes them as typed
accessors. Populate them consistently using the resource's locally-unique name
(domain name, repository name, package version, or asset name) as resourceId.

Populating resourceId this way exposed a real crash: Map.of() rejects null
values, so any request missing a required identifier (domain, repository,
package, packageVersion, asset) turned what used to be a wrong-status
ResourceNotFoundException into a raw NullPointerException / HTTP 500. Fixed
by validating required identifiers up front (returning ValidationException,
matching AWS) and by making the extendedData-building helper itself
null-safe against a missing resourceId, so no single overlooked call site
can reintroduce a 500.
2026-09-20 09:13:46 -05:00
Priamo Germosen 8af15a71c4 fix(cloudformation): remove the login profile when deleting an IAM user (#3975)
Since login profiles became real state, DeleteUser returns DeleteConflict while one exists, so deleting a stack whose AWS::IAM::User was given a password out of band ended in DELETE_FAILED. The provisioner now deletes the login profile before the user, tolerating a user that has none. The resource-type table notes that the template LoginProfile and PermissionsBoundary properties are ignored.
2026-09-20 09:13:36 -05:00
Priamo Germosen 803d0ed0ed feat(cognito): support the USER_AUTH choice-based auth flow (#3930)
Implements InitiateAuth/AdminInitiateAuth AuthFlow=USER_AUTH (#3926):
USERNAME plus optional PREFERRED_CHALLENGE, offering PASSWORD,
PASSWORD_SRP, EMAIL_OTP and SMS_OTP depending on what the user has
(password hash, SRP verifier, verified email, verified phone). With
no PREFERRED_CHALLENGE, the response carries AvailableChallenges and
ChallengeName=SELECT_CHALLENGE; with one, it goes straight to that
challenge. RespondToAuthChallenge handles SELECT_CHALLENGE (ANSWER
names the chosen factor, and may already carry that factor's own
answer to complete in one round trip), PASSWORD, PASSWORD_SRP, and
EMAIL_OTP/SMS_OTP.

PASSWORD and PASSWORD_SRP reuse authenticateWithPassword and
handleUserSrpAuth unchanged rather than reimplementing verification:
a USER_AUTH client responding with PASSWORD/SRP_A needs exactly the
same checks those flows already perform, so PASSWORD_SRP hands off to
the existing PASSWORD_VERIFIER challenge with zero new SRP logic.
EMAIL_OTP/SMS_OTP reuse the existing VerificationCodeService/
CognitoMessageDispatcher pair already used for SignUp/ForgotPassword
codes, adding EMAIL_OTP/SMS_OTP as new VerificationCode.Purpose
values distinct from SMS_MFA so a sign-in code can't be replayed
against another purpose's consume() call.

Also gates USER_AUTH on the pool's tier: AWS requires Essentials or
higher, and UserPool.userPoolTier already models this (defaulting to
ESSENTIALS), so a LITE-tier pool is rejected. SMS_OTP uses
SmsAuthenticationMessage, the template AWS documents for "SMS OTP and
MFA authentication" (CreateUserPool docs), not the signup/
verification template.

Security and correctness fixes found in review:
- handleUserAuth now validates SECRET_HASH before looking up the user
  or issuing a challenge, closing a hole where a caller with no
  secret could trigger a real OTP send and read the masked
  destination without proving it holds the client secret.
- issueSignInOtp now maps VerificationCodeException through
  mapVerificationCodeException (so a rate-limited retry surfaces as
  LimitExceededException, not a generic CodeDeliveryFailureException
  that hid the real cause), and invalidates the just-issued code
  before reporting a real dispatch failure, so the rate limiter
  doesn't lock out a retry for a code the user never received,
  matching signUp's existing rollback pattern.

Deliberately not implemented, tracked as follow-ups:
- WEB_AUTHN (passkeys): a much bigger piece per the issue's own
  scoping note, no credential storage/ceremony exists in floci yet.
- The Session from ConfirmSignUp accepted as a first-factor shortcut:
  needs ConfirmSignUp to start minting a redeemable session, a
  separate mechanism from the challenge flow this PR adds.
- Pool-level sign-in policy (AllowedFirstAuthFactors): floci does not
  model per-pool factor restrictions at all today; availability here
  is purely per-user (does the user have this factor configured).
- Session is not looked up on RespondToAuthChallenge: each handler
  independently reverifies its own factor from the request body, the
  same shape the existing NEW_PASSWORD_REQUIRED handler already uses,
  so there is no bypass, just an opaque correlation token rather than
  server-held state.

Verified against botocore's cognito-idp service-2.json (AuthFlowType,
ChallengeNameType, AvailableChallengeListType, the AuthParameters
documentation for USER_AUTH) and the real InitiateAuth/CreateUserPool
API reference pages, including InitiateAuth's worked examples and
CreateUserPool's SmsAuthenticationMessage description.
2026-09-20 09:11:01 -05:00
TATSUNO “Taz” Yasuhiro 3958be1d0e fix(dynamodb): enforce the 400KB item limit on every update surface (#3991)
* fix(dynamodb): enforce the 400KB item limit on every update surface

* docs(dynamodb): correct the update size exception javadoc
2026-09-20 10:08:50 -04:00
vamsiakandVamsi Akavarapu 748f71c943 feat(stepfunctions): support Scheduler DeleteSchedule (#3983)
* feat(stepfunctions): support scheduler deleteSchedule

* style(stepfunctions): use explicit result types

---------

Co-authored-by: Vamsi Akavarapu <16164447+vamsiak@users.noreply.github.com>
2026-09-20 09:56:44 -04:00
Vinod Kumar Bengaluru 37ac2505e8 fix(ec2): validate CreateSecurityGroup required parameters (#3888) 2026-09-20 09:20:47 -04:00
XuJian d348763345 feat(glue): add crawler classifier APIs (#3985) 2026-09-20 08:59:27 -04:00
Aniket Shukla dfb294a79a fix(autoscaling): reconcile groups in every account (#3824) 2026-09-20 08:55:39 -04:00
Simone Primarosa 51467dbc23 fix(eks): populate clusterSecurityGroupId on cluster responses (#3924)
* fix(eks): populate clusterSecurityGroupId on cluster responses

Real AWS EKS automatically provisions a cluster security group and
returns its identifier in resourcesVpcConfig.clusterSecurityGroupId
on CreateCluster and DescribeCluster responses.

- Create a security group in Ec2Service with the pattern
  eks-cluster-sg-<cluster-name>-<suffix> using 8 hex characters.
- Set standard AWS description and tags (Name, kubernetes.io/cluster/<cluster-name>,
  and aws:eks:cluster-name).
- Set clusterSecurityGroupId to empty string when cluster has no VPC.
- Delete the cluster security group on DeleteCluster, tolerating
  InvalidGroup.NotFound for idempotency.
- Backfill cluster security groups for pre-existing clusters on startup.

* fix(eks): address cluster security group review feedback

* fix(eks): add self-referencing egress rule and cleanup on SG setup failure
2026-09-20 08:52:40 -04:00
Vũ Thế Huy 9379fa1179 feat(redshift): support S3 COPY JSON and manifest, and DynamoDB zero-ETL backfill (#3889)
* feat(redshift): support S3 COPY FORMAT AS JSON 'auto' and MANIFEST

* fix(redshift): resolve column discovery via pg_catalog and guard against empty columns

* feat(redshift): track zero-ETL backfill progress and syncing status

* feat(redshift): backfill existing DynamoDB items into zero-ETL landing table

* test(redshift): prove zero-ETL backfill and syncing-to-active status

* fix(redshift): reject JSON 'auto' COPY without columns over Extended Query clearly

Catalog-based column discovery only runs over the Simple Query protocol, so
a column-less COPY ... FORMAT AS JSON 'auto' sent over Extended Query failed
with an obscure error. Name the cause and remedy in the error, document the
limitation, and run the discovery tests over Simple Query.

* docs(redshift): document zero-ETL DynamoDB backfill and syncing status

* fix(redshift): address review feedback on COPY JSON, manifest and zero-ETL backfill

* fix(redshift): pass user column list as written and clarify syncing status in docs

* fix(redshift): wrap long condition in identifier unquoting

* fix(redshift): keep user columns as written in runCopyFrom and verify backfill account scope

* test(redshift): use assertNotNull for last evaluated key assertion
2026-09-20 00:23:54 -04:00
XuJian 1088187cb3 fix(transcribe): honor list pagination tokens (#3927)
* fix(transcribe): advance list pagination tokens

* fix(transcribe): keep pagination stable across mutations
2026-09-19 23:53:23 -04:00
XuJian 9c4cd8c9e1 feat(batch): support canceling and terminating jobs (#3922)
* feat(batch): support canceling and terminating jobs

* fix(batch): close job termination race
2026-09-19 23:50:48 -04:00
Priamo Germosen c5de8331b7 fix(ec2): remove tags on the default resources deleted with the VPC (#3917)
DeleteVpc already removes the default security group, its rules, the main
route table and the default network ACL, but their tags stayed in
DescribeTags. Delete them with the resources.
2026-09-19 23:17:07 -04:00
danielvanza ca98384b4a fix(core): return UnknownOperationException when X-Amz-Target is missing (#3925) 2026-09-19 23:10:19 -04:00
TATSUNO “Taz” Yasuhiro 68425d942a fix(kms): match the AWS error codes, messages and check order (#3968)
* fix(kms): reject Sign and Verify on keys that are not SIGN_VERIFY

* fix(kms): validate SigningAlgorithm and key spec

* refactor(kms): keep only comments the code cannot show

* fix(kms): check the DIGEST length for every signing algorithm

* fix(kms): refuse disabled and pending deletion keys

* fix(kms): answer a failed Verify with KMSInvalidSignatureException

* fix(kms): fix MAC key usage and invalid MAC errors

* fix(kms): validate MacAlgorithm

* fix(kms): use the key spec error for an unsupported MAC algorithm

* fix(kms): only treat a malformed signature as invalid in Verify

* fix(kms): answer a key pending import with its ARN and state

* fix(kms): name the key ARN when it is pending deletion

* fix(kms): refuse a key pending deletion in key management operations

* fix(kms): check the key state in GetPublicKey

* test(kms): drop the real AWS notes from test comments

* fix(kms): send no message when GetPublicKey gets a symmetric key

* fix(kms): check the key state before changing key rotation

* fix(kms): send no message when the key spec does not rotate

* fix(kms): accept DisableKeyRotation on a key spec that does not rotate

* fix(kms): name the key ARN and origin when the origin is not valid

* fix(kms): ask for new key material when rotating an EXTERNAL key on demand

* fix(kms): validate RotationPeriodInDays

* fix(kms): use the AWS wording for IncorrectKeyException

* fix(kms): send no message with InvalidCiphertextException

* fix(kms): list EncryptionAlgorithm values in the AWS order

* fix(kms): validate the data key KeySpec and NumberOfBytes

* fix(kms): require either KeySpec or NumberOfBytes for a data key

* fix(kms): make an AES_128 data key 16 bytes long

* fix(kms): use the AWS error for a data key under an asymmetric key

* fix(kms): name GenerateDataKeyWithoutPlaintext in its key usage error

* fix(kms): report the GenerateRandom bound that NumberOfBytes breaks

* fix(kms): say NumberOfBytes is required in GenerateRandom

* fix(kms): list the MessageType values in its validation error

* fix(kms): answer NotFoundException with status 400

* fix(kms): use the AWS wording when a key does not exist

* fix(kms): use the AWS wording when an alias does not exist

* fix(kms): reject a key or alias ARN from another region

* fix(kms): validate a missing, empty or non-ASCII KeyId

* fix(kms): validate blob members before looking up the key

* fix(kms): reject an alias in operations that need a key

* test(compat): stop scheduling a KMS key for deletion twice
2026-09-19 23:00:30 -04:00
Hector Ventura ee74fd0a49 refactor(cloudformation): move IAM inline Policy into IamPolicyCfnProvisioner (#3971)
Move AWS::IAM::Policy out of the CloudFormationResourceProvisioner monolith into a new IamPolicyCfnProvisioner over IamService. AWS::IAM::Policy is an inline policy embedded in the named roles, users and groups, so Ref is the policy name with no ARN, the name is stable across updates unless the template changes it, and a failed update rolls back the partially applied puts and records anything it could not undo for the next provision to drain. A physical id that is a managed policy ARN is the pre-inline upgrade path, migrated and deleted here as before.

The shared PolicyDocument resolver is hoisted onto ProvisionContext so the managed-policy provisioner can reuse it when it moves. Leaving LEGACY_SWITCH subjects the type to CfnSchemaCoverageTest: its only readOnly attribute, Id, is recorded as a gap row because Floci uses the policy name for Ref where AWS returns an opaque identifier it does not model. ManagedPolicy stays in the monolith for the following PR, so its delete and the legacy-managed helpers are duplicated between the two until then.
2026-09-19 22:52:06 -04:00
Abhigya 0f76840ef4 feat(docker): add cpu limits and readonly rootfs to container specs (#3893)
ECS expresses CPU as units where 1024 units is one vCPU, and a task
definition can ask for a container's own filesystem to be read only.
Neither reached the Docker host config.

ContainerSpec gains nanoCpus, cpuShares and readonlyRootfs, the builder
gains withCpuUnits, withCpuShares and withReadonlyRootfs, and
ContainerLifecycleManager maps them onto withNanoCPUs, withCpuShares and
withReadonlyRootfs. Existing convenience constructors keep their old
shapes and default the three new components, so no current caller
changes behaviour.

Docker refuses a NanoCpus above the host's CPU count, while ECS accepts a
task cpu of up to 196608 units, so a 16 vCPU task asked for verbatim
would fail to start on a smaller machine. The quota is held to the
daemon's reported NCPU, read once and left alone when the daemon does not
report one.

ContainerLifecycleManagerCpuLimitTest builds a spec through the builder,
captures the HostConfig on create and pins the unit conversion, the
zero/negative guards, the cpuShares passthrough, readonlyRootfs and both
sides of the clamp.
2026-09-19 21:50:35 -05:00
Vũ Thế Huy dc0cbaf6b1 refactor(stepfunctions): move library usages to imports (#3904) 2026-09-19 21:14:28 -05:00
Vũ Thế Huy 5a59456b2e refactor(pipes): move library usages to imports (#3901) 2026-09-19 21:14:11 -05:00
Vũ Thế Huy 8e709b908b refactor(acm): move library usages to imports (#3900)
* refactor(acm): move library usages to imports

* refactor(acm): move library usages to imports and eliminate var declarations
2026-09-19 21:14:08 -05:00
Vũ Thế Huy 22bff32e19 refactor(elasticache): move library usages to imports (#3899)
* refactor(elasticache): move library usages to imports

* refactor(elasticache): move library usages to imports and eliminate var declarations

* refactor(elasticache): extract entity variable in query handler test
2026-09-19 21:12:52 -05:00
Hector Ventura 3a36b8c85c fix(cloudformation): reconcile and replace IAM leaf resources on update and delete (#3933)
Follow-up to #3913 addressing pgermosen's review of the IAM leaf provisioners.

AWS::IAM::AccessKey: UserName and Serial are both createOnly, so an update that changes neither reuses the existing key (a user is capped at two keys, so recreating on every update failed with LimitExceeded and orphaned the earlier keys), and a change to either rotates the key by replacement, creating a new one and deleting the displaced one after the update commits through ReplacementCleanup, matching how AWS rotates a key by incrementing Serial. A missing UserName is rejected. Delete recovers the owning user from the key id (findUserNameByAccessKeyId), so both the stack-delete and the replacement-cleanup paths delete by physical id alone.

AWS::IAM::InstanceProfile: Roles is a no-interruption update, so the declared roles are reconciled in place (undeclared roles removed, then declared roles added) instead of only ever added, which had made a role swap fail with LimitExceeded. A missing Roles is rejected (AWS requires it), and a Path change on an existing profile is rejected as an unsupported replacement rather than silently ignored, since Path is createOnly and a same-named profile cannot be replaced in place. Roles are detached before delete because IAM refuses to delete a profile that still holds one.

Known edge: ReplacementCleanup.rollback restores only non-internal attributes, so after a rolled-back key rotation the stored Serial can lag by one; the next update re-evaluates. Full InstanceProfile name-plus-path replacement and AccessKey Status handling remain follow-ups.
2026-09-19 22:03:28 -04:00
Chris Jovanovski d9a4db0290 fix(cloudformation): provision Cognito user pool groups (#3695)
* fix(cloudformation): provision Cognito user pool groups

Create and reconcile user pool groups, and namespace custom schema attributes while preserving standard attributes.

* fix(cloudformation): keep a generated Cognito group name across updates

GroupName is optional, and provision generated a fresh stand-in on every call. Because
provision is also the update path, the second UpdateStack derived a different name, took
the create branch and left the group the stack already owned orphaned behind it.

Use ProvisionContext.stablePhysicalName so the prior physical id is reused when the
template does not name the group, and reusesPriorEntity for the create-or-update choice,
which is the pairing that keeps a stable name from turning an update into a duplicate
create.
2026-09-19 20:06:58 -05:00
Niels Kootstra 91de9e452e fix(cloudformation): bound operation executor (#3761)
* fix(cloudformation): bound operations and restore stacks safely

Limit concurrent stack operations, return the AWS LimitExceeded error code,
and restore rejected mutations under the stack lock.

* fix(cloudformation): prevent nested delete deadlocks

Use the AWS LimitExceededException wire code and delete nested stacks inline
so bounded operation workers cannot wait on child tasks queued behind them.
2026-09-19 20:06:26 -05:00
Priamo Germosen eef69445cc feat(iam): enforce DeleteUser prerequisites and carry access keys and group membership through a rename (#3918)
DeleteUser now returns DeleteConflict while the user still has inline policies or access keys, matching AWS. UpdateUser rename moves the user's access keys and group membership to the new name, so a renamed user keeps them and a user recreated under the old name does not inherit them.
2026-09-19 19:54:55 -05:00
Priamo Germosen 5f4aea20d5 fix(apigatewayv2): block link-local and metadata targets in HTTP_PROXY integrations (#3962)
Resolve the integration target before connecting and reject link-local and cloud instance-metadata addresses on both the HttpClient path and the Host-override socket path. Loopback and private ranges stay reachable so local backends keep working.
2026-09-19 19:53:20 -05:00
Priamo Germosen 5a11e7f6fb fix(ec2): return DependencyViolation from DeleteVpc while dependents remain (#3916)
DeleteVpc now refuses while the VPC still has a subnet, a security group,
route table or network ACL other than the defaults, or an attached
internet gateway, as AWS does. Creating a subnet, group, route table or
network ACL, or attaching an internet gateway, re-checks the VPC under the
region topology lock, so a concurrent DeleteVpc can no longer leave one
pointing at a VPC that is gone. AttachInternetGateway now rejects a VPC
that does not exist.
2026-09-19 19:38:53 -05:00
Priamo Germosen 61f67cc834 fix(cognito): reject unrecognized AuthFlow instead of issuing tokens (#3923)
The default arm of InitiateAuth and AdminInitiateAuth looked the user up by name and issued signed tokens for any AuthFlow value it did not recognize, with no credential check. Reject those values with InvalidParameterException. ADMIN_NO_SRP_AUTH is a valid AdminInitiateAuth flow that previously only worked through that arm, so it now goes through password authentication.
2026-09-19 19:38:40 -05:00
Priamo Germosen 15ed62f8cb fix(codeartifact): enforce domains-per-account and repositories-per-domain quotas (#3949)
CreateDomain and CreateRepository accepted an unlimited number of domains and
repositories, but AWS caps an account at 10 domains per Region and a domain at
1,000 repositories, returning ServiceQuotaExceededException once reached.
2026-09-19 19:38:27 -05:00
David 1e8485830c fix(cognito): refuse DeleteUserPool while deletion protection is active (#3961)
DeletionProtection was stored and round-tripped but never read on the
delete path, so a protected pool was deleted like any other and a
CloudFormation DeleteStack owning one succeeded. AWS refuses with
InvalidParameterException until UpdateUserPool switches the flag to
INACTIVE, and the stack reports DELETE_FAILED with that reason.

The check reads the pool store directly: describeUserPool would turn a
delete of a missing id into ResourceNotFoundException (a separate
divergence) and generate signing keys as a side effect.

Closes #3948
2026-09-19 19:53:48 -04:00
Stuart Lang 7d9f499f2d feat(sns): add the MaximumMessageSize topic attribute for 1 MiB payloads (#3953)
* feat(sns): add the MaximumMessageSize topic attribute for 1 MiB payloads

AWS raised the SNS payload ceiling from 256 KiB to 1 MiB behind a new
per-topic MaximumMessageSize attribute. The default stays 262144, so an
unconfigured topic is unchanged.

CreateTopic and SetTopicAttributes validate the 1024-1048576 range, Publish
and PublishBatch size against the topic's value, and a topic above 262144 is
held to its subscription constraints: sqs, firehose or lambda only, and at
most 100 subscriptions. AWS::SNS::Topic forwards the property too.

Two things the same code path had wrong, both checked against the live API:
Subject was counted towards the publish limit when AWS does not count it, and
PublishBatch returned the SQS wording rather than the SNS one.

* fix(sns): ignore an out-of-range persisted MaximumMessageSize

Validation only guards new writes. A topic stored before the attribute was
known carries whatever the old generic setter accepted, so the read path
could hand back a value above 1 MiB and wave a publish past the AWS ceiling,
or one at zero and reject every publish. Out of range now falls back to the
default, exactly as a nonnumeric value already did.

Also covers the attribute end to end on both wire protocols -- create, set,
get, and the oversized Publish and PublishBatch errors on Query and JSON 1.1
-- since the existing suite drives SnsService directly and cannot catch a
regression in parameter extraction or error serialization.
2026-09-19 19:05:22 -04:00
Matheus André 5ac07733e9 chore(iam): report enforcement state at startup and cover IAM management actions (#3935)
* chore(iam): report enforcement state at startup and cover IAM management actions

Issue #3931 reported that an IAM user with an S3-only policy could call
CreateUser, CreateGroup, AttachUserPolicy and DeleteUser. The reporter had
set FLOCI_IAM_STRICT_VALIDATION, which is not a Floci flag, so enforcement
was never on; with FLOCI_SERVICES_IAM_ENFORCEMENT_ENABLED=true those calls
already return AccessDenied, including under an explicit Deny on iam:*.

Make that state visible: the startup banner now prints whether IAM policy
enforcement is enabled and names the correct variable when it is off. The
IAM docs state that management actions are enforced too and that any other
flag spelling is silently ignored. A regression test pins the issue's
scenario (group-attached S3-only policy, plus a direct explicit-deny
policy) against the four actions over HTTP with enforcement enabled.

* chore(iam): use explicit types and imports in the enforcement regression test

* chore(iam): stub the IAM config in EmulatorLifecycleTest and cover the enforcement banner line
2026-09-19 19:01:03 -04:00
Matheus André 52941e90ef fix(sagemaker): restore the worker pools in afterReset, not clear() (#3937)
* fix(sagemaker): restore the worker pools in afterReset, not clear()

A state reset runs every container teardown, and the SageMaker training
runner and endpoint manager shut their worker pools down there. Since
#3797 they create a new pool in clear(), but the reset controller skips
clear() as soon as the storage wipe or an earlier service's clear()
throws, so one failed reset still left both pools terminated and every
later CreateTrainingJob, CreateEndpoint and UpdateEndpoint returned 500
with RejectedExecutionException until Floci restarted.

Both beans now recreate the pool in afterReset(), which the controller
runs from a finally block for every service it prepared, whether or not
the wipe or a clear() succeeded. Shutdown still never runs it, so the
pools stay down there. clear() keeps only its stopRequested wipe, and
the ContainerTeardown Javadoc names afterReset() as the hook to use.

Refs #3796

* fix(ecs): restart the reconciler in afterReset, not clear()

EcsService restarted the reconciler its reset teardown had stopped in
clear(), the same one-way path the SageMaker pools had: a reset whose
storage wipe or earlier clear() threw skipped it and left ECS without a
reconciler until the emulator restarted. The restart now lives in
afterReset(), which the reset controller runs for every prepared service
regardless of that failure, matching the rule the ContainerTeardown
Javadoc states and what the SageMaker beans now do.

Refs #3796
2026-09-19 18:30:57 -04:00
vamsiakandVamsi Akavarapu bc018afad0 feat(scheduler): start Step Functions targets (#3936)
Co-authored-by: Vamsi Akavarapu <16164447+vamsiak@users.noreply.github.com>
2026-09-19 16:48:07 -04:00
lex00 3c251b2343 fix(iam): authorize a virtual-hosted bucket request against the bucket ARN (#3942)
S3VirtualHostFilter rewrites a bucket-level virtual-hosted request (GET /)
to the path /bucket/, and ResourceArnBuilder.buildS3Arn turned that into
arn:aws:s3:::bucket/ with a trailing slash. A policy naming the bucket as
arn:aws:s3:::bucket then failed to match, so an allowed ListBucket was
denied for every SDK that defaults to virtual-hosted addressing while the
identical path-style call was allowed.

Drop the separator when nothing follows it. A key that itself ends in a
slash (a folder marker such as folder/) keeps it, because there the slash
is key data rather than a separator.

Refs lex00/floci#213

(cherry picked from commit 8624701021f2c6374b6e5d627218eeaa961ce751)
2026-09-19 16:30:13 -04:00