Commit Graph
2058 Commits
Author SHA1 Message Date
Hector Ventura 4906b7deed refactor(cloudformation): move CustomResource into CustomResourceCfnProvisioner (#4044)
Extracts AWS::CloudFormation::CustomResource and every Custom::* type out of the CloudFormationResourceProvisioner monolith into a dedicated CustomResourceCfnProvisioner, completing the per-service provisioner migration: every CloudFormation resource type now lives in a provisioner reached through the registry, and the monolith is a thin dispatcher (registry lookup plus the unsupported-type stub).

CloudFormationResourceRegistry.forType routes any otherwise-unmatched Custom:: type to the CustomResource provisioner, with an exact registry entry still winning so Custom::DynamoDBReplica stays on DynamoDbCfnProvisioner. With that, the monolith's provision switch serves no type, and its LEGACY_SWITCH_TYPES and DELETE_NEEDS_STACK_RESOURCE sets are now empty, kept as the guards their tests check. The now-dead lambdaService, iamService, customResourceResponseStore, and reachableEndpoint dependencies are dropped.

The readOnly Id attribute is recorded as a gap: it is the primary identifier returned by Ref (the physical resource id), not a separate Fn::GetAtt value Floci publishes.
2026-09-20 22:34:16 -04:00
Vũ Thế Huy 44fa114483 refactor(cloudcontrol): move library usages to imports (#3902)
* refactor(cloudcontrol): move library usages to imports

* refactor(cloudcontrol): eliminate var declarations and add explicit type imports
2026-09-20 21:16:51 -05:00
Simone Primarosa 7777a97de9 fix(ecr): serve the registry data plane over TLS (#4040)
- Update ECR host routing regex to support <account>.dkr.ecr.<region>.localhost.floci.io
- Populate regional wildcard SANs (*.dkr.ecr.<region>.localhost.floci.io) for all advertised AWS regions
- Add unit tests for hostname matching, malformed host rejection, immutable tag mutability over TLS, and certificate SAN enumeration
- Add Docker integration test verifying end-to-end TLS image push/pull with root CA verification and plain HTTP regression
- Update ECR and TLS user documentation
2026-09-20 22:11:46 -04:00
Priamo Germosen 9dab36197a fix(elbv2): block link-local and metadata targets (#4031)
Reject link-local and cloud instance-metadata addresses in RegisterTargets with InvalidTarget, and resolve target hosts once in the data plane and health checker, connecting to the checked address. Loopback and private ranges stay reachable so a load balancer can front a neighbouring container.
2026-09-20 21:11:27 -05:00
Priamo Germosen a12bf8c96c feat(cognito): enforce app client ExplicitAuthFlows in InitiateAuth and AdminInitiateAuth (#3974)
ExplicitAuthFlows was stored but never checked, so a client that only allowed SRP still accepted USER_PASSWORD_AUTH. When a client lists flows, reject any flow it does not enable with InvalidParameterException. Legacy values (USER_PASSWORD_AUTH, ADMIN_NO_SRP_AUTH, CUSTOM_AUTH_FLOW_ONLY) are honored, and clients created without a list stay ungated.

The Java compatibility test signed in with ADMIN_USER_PASSWORD_AUTH on a client that never enabled it; add ALLOW_ADMIN_USER_PASSWORD_AUTH to that client.
2026-09-20 21:04:55 -05:00
Austin W e14221fe62 feat(sagemaker): support GPU-backed training jobs (#4015)
* feat(sagemaker): support GPU-backed training jobs

ResourceConfig.InstanceType had no effect on the container Floci launched, so
a training job asking for ml.g5.xlarge ran on CPU. This maps the accelerator
half of an instance type onto a real device request, using the container GPU
primitive added in #3789.

On AWS the instance type *is* the hardware, so nothing is configurable. Floci
has one host with fixed cards, so serving a GPU instance type means
substituting a local device, and which devices may be lent out is a local
decision. The two halves are split accordingly:

- How many accelerators an ml.* type carries is a property of AWS, so it ships
  as data in sagemaker/instance-type-catalog.yaml, mirroring how
  Ec2InstanceTypeCatalog already carries vcpu and memory for EC2 types. It is
  kept separate from that catalog because ml.* is its own namespace and must
  never appear in DescribeInstanceTypes.
- Which of this machine's devices may be used is configuration, under
  floci.services.sagemaker.gpu: enabled, mode and devices.

Nothing changes unless enabled is set. It defaults to false, so existing
deployments keep launching CPU-only containers, including for GPU instance
types.

mode exists because daemons disagree on the wire form. It defaults to cdi:
Podman resolves only CDI and accepts a count request while attaching no device
(containers/podman#22645), so preferring CDI turns a misconfiguration into a
refused start rather than a job that quietly trains on CPU. That principle
drives the failure cases too: an unlisted GPU-family type, too few allowed
devices, an explicit mode with no devices, and InstanceCount above one all
fail with a FailureReason instead of falling back to CPU. A job that reports
Completed after training on the wrong hardware leaves an artifact that looks
legitimate, which is worse than an error.

Only the accelerator is substituted. An instance type also implies vCPU and
memory, which this does not emulate, consistent with the rest of the codebase:
EC2 instance types are metadata for DescribeInstanceTypes and never size a
container, RDS records DBInstanceClass without acting on it, and Lambda, ECS
and Batch apply limits only where an API supplies an explicit number.

Endpoint hosting is unchanged and still CPU-only; the resolver is a separate
bean so it can be reused there in a follow-up.

* test(sagemaker): cover the GPU refusal paths and the hardware path

The GPU feature shipped with unit coverage on the resolver only, so nothing
exercised it through CreateTrainingJob. These add both halves.

SageMakerGpuIntegrationTest runs everywhere. Every path that refuses a request
raises inside SageMakerGpuResolver, before the runner asks the daemon for
anything, and the removeIfExists above it already swallows a missing daemon, so
an unlisted GPU family, InstanceCount above one, and cdi mode with no configured
devices all reach their verdict on a plain runner. A fourth case pins the
contract that enabling the feature leaves CPU instance types alone.

SageMakerGpuDockerIntegrationTest is opt-in behind -Dgpu.integration.enabled,
matching ContainerGpuDockerIntegrationTest, because it needs hardware no CI
runner has. Verified against an RTX 5060 Ti through Podman 5.8.2: the container
saw exactly the device named in gpu.devices and not the host's other card.

The assertion is the container's exit code. nvidia-smi output is redirected
rather than piped: a pipeline exits with the status of its last command, so
'nvidia-smi -L | tee' reports success even when nvidia-smi cannot reach the
driver, which would be this test passing on a CPU container.

* fix(sagemaker): package the instance type catalog in the native image

SageMakerInstanceTypeCatalog reads sagemaker/instance-type-catalog.yaml through
a constant, which Quarkus's static resource analysis cannot follow, and no glob
under quarkus.native.resources.includes matched it. The file was therefore left
out of the native image, so enabling floci.services.sagemaker.gpu.enabled there
would have failed every training job at catalog load with 'Missing catalog
resource sagemaker/instance-type-catalog.yaml'. Ec2InstanceTypeCatalog reads its
own catalog the same way and ec2/*.yaml was already listed for exactly this
reason.

Nothing caught it: JVM tests resolve the file from src/main/resources, and the
hardware verification ran a JVM-mode image, so the gap existed only in the
artifact neither exercised.

NativeImageResourceIncludesTest closes that gap the way
NativeImageRuntimeInitializationTest closes the Random-in-the-image-heap one, by
moving a native-only failure into ordinary CI. It pairs each resource-path
constant passed to getResourceAsStream with the includes globs and fails when
none matches, skipping the IAM catalog that application.yml already documents as
build-time only.

* refactor(sagemaker): match EC2's case handling for instance types

isAcceleratorFamily folded case while gpuCount did not, so ML.G5.XLARGE was
answered as a GPU family and then reported as missing from the catalog, pointing
the caller at the wrong fix.

Ec2InstanceTypeCatalog is the precedent and normalizes in neither position:
find() looks the type up exactly and familyOf() splits on the first dot without
folding. AWS instance types are exact tokens. The repo folds case where AWS
defines a value as case-insensitive, such as ACM domain names, regions and
content types, which an instance type is not.

Dropping the fold rather than adding one to gpuCount keeps both halves agreeing
and keeps the pair behaving like EC2's.

Also drops the @DisplayName from SageMakerGpuResolverTest. The suite does not
use them anywhere else; the method name carries the intent.

* docs(sagemaker): clarify GPU training device reuse
2026-09-20 17:56:43 -04:00
Simone Primarosa 5a8ffd0272 feat(eks): implement pod identity association management (#4012)
* feat(eks): implement pod identity association management

* fix(eks): use instance SecureRandom for native image compatibility
2026-09-20 17:54:41 -04:00
Hector Ventura 648ea26cc9 refactor(cloudformation): move Lambda types into LambdaCfnProvisioner (#4032)
Extracts AWS::Lambda::Function and AWS::Lambda::LayerVersion out of the CloudFormationResourceProvisioner monolith into a dedicated LambdaCfnProvisioner, continuing the per-service provisioner migration. Behavior is preserved: create, in-place configuration and code update, replacement on a FunctionName or PackageType change, reserved concurrency, layer publication, and the legacy name-mode inference all move unchanged.

Moving AWS::Lambda::Function into the registry subjects it to the schema-coverage gate: its readOnly Arn is set as before, and SnapStartResponse is recorded as a gap since Floci does not emulate Lambda SnapStart. InlineZipPackager is made public so the extracted provisioner can reach it. The monolith's now-dead s3Service and lambdaLayerService dependencies are dropped; lambdaService stays for the custom-resource handler.
2026-09-20 17:51:33 -04:00
Abhigya a0089b3548 fix(elbv2): stop mutating immutable fallbacks on the delete paths (#4030)
DeleteListener and DeleteLoadBalancer took their region map with
getOrDefault(region, Map.of()) and then removed from it. For a region
that has no map yet, that removes from the immutable Map.of() sentinel
and throws UnsupportedOperationException, which the Query path reports
as InternalFailure with a null message. The Terraform AWS provider
treats InternalFailure as retryable, so a teardown against an untouched
region polls "Still destroying..." instead of failing.

Both methods now look the region map up and return when it is absent,
which is the same no-op AWS performs for a resource that is not there.
The listener and rule maps that the cascade writes back use
computeIfAbsent, matching the create paths: getOrDefault would have
stored the immutable sentinel as the region's value, so every later
call for that region would fail the same way, including CreateListener.

The two ARN indexes had the same defect with List.of(), so the removal
goes through a helper that looks the list up instead.
2026-09-20 17:38:36 -04:00
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