PutReportDefinition now stores its Tags on the report definition, and
TagResource, UntagResource and ListTagsForResource read and change them
by ReportName instead of answering empty stubs. ModifyReportDefinition
keeps the tags, a missing report answers ResourceNotFoundException, and
the TagList and TagKeyList constraints from the model are checked.
Closes#7952
PutReportDefinition and TagResource now fail with ValidationException when the report would hold more than 50 tags, when Tags is not a list, or when a tag key, value or TagKeys entry is not a string.
tools/aws/regen_cur_shapes.py vendors the TagResource, UntagResource and ListTagsForResource input constraints from botocore, and CurRequestShapes checks them, and the Tags of PutReportDefinition, through RequestConstraintCheck in place of the hand-written limits.
MemoryDbService threw ClusterNotFoundFault, UserNotFoundFault and
ACLNotFoundFault with HTTP 404. The MemoryDB API Reference lists 400
for each, and botocore has no status for them. AWS's Smithy model
gives them httpError(404), but botocore calls MemoryDB over awsJson1_1,
which ignores HTTP binding traits.
Use 400 at all eleven places that throw them: the Describe, Update and
Delete actions, CreateACL with an unknown user, CreateCluster with an
unknown ACL, and the three tag operations.
Closesfloci-io/floci#8007
Persist whether a standalone instance has never initialized its database. Protect engine versions before backend startup so runtime loss and proxy failures cannot expose existing storage to a metadata-only version change. Update SDK compatibility assertions to reject unsupported upgrades and verify resizing separately.
Apply supported minor upgrades using the version-specific image on the existing volume and endpoint. Keep major upgrades, downgrades, and pinned-image changes blocked before mutation. Preserve the never-started case, report failed restarts honestly, and restore successful minor-upgrade coverage in the Java SDK compatibility suite.
* fix(glue): preserve existing partitions on duplicate creation
Reject CreatePartition for values already stored in the table before
mutating partition metadata. Keep the existing BatchCreatePartition
error and allow explicit updates through UpdatePartition.
Port the independent duplicate check and regression from
AndreKurait/floci commit f6905c8ced6c21fd9aeca013beb4ac511e5c1469.
Add SDK coverage for single and batch creation, preserved metadata,
per-item batch errors, and subsequent explicit updates.
Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* fix(glue): serialize concurrent partition creation
Synchronize single and batch creates so duplicate detection and writes share
one service critical section. Cover all four concurrent single/batch combinations,
preserving the first metadata and per-item batch errors.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* test(glue): isolate catalog fixtures from Athena readers
Share the existing floci-duck resource lock with Athena and Firehose tests.
Their catalog setup must not read temporary Glue metadata whose S3 locations
are placeholders while the catalog test is running.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
---------
Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
Co-authored-by: Andre Kurait <akurait@amazon.com>
Closes#7979
Resolve symlinks on the working directory's path, relative or absolute,
and check every directory on the resolved path. Stop the check at a
function's EFS mount path, which Lambda enters as the access point's user.
Build the Dockerfile-only build context in one place,
DockerBuildContext.ofDockerfile, for the helper image and the two Docker
tests that built it by hand.
It created an application named test-app, which AppConfigIntegrationTest looks up by name when both run in one shard.
* feat(dynamodb): serve DescribeLimits and DescribeEndpoints
DynamoDB reports the default quotas of 80,000 read and write capacity
units per account and 40,000 per table. It names its Regional endpoint
with a cache period of 1,440 minutes.
* fix(dynamodb): name Floci's own address in DescribeEndpoints
With endpoint discovery on, the AWS SDK for Java 2.x sends later
requests to the address DescribeEndpoints names, even when the client
sets an endpoint. The Regional AWS host sent them to real DynamoDB.
Stream records through CopyBulkLoader.Cursor in loadRecords and reuse writeRecord, eliminating duplicate decompression, line skipping, record reading, heap tracking and blank line filtering.
Verify Cursor record iteration, line tracking and raw byte capture, along with writeRecord chunking across PostgreSQL CopyData wire frames.
GetSnapshot and ListSnapshots with an ownerAccount other than the caller's now read the
owner's snapshots and return only the ones the snapshot resource policy shares with the
caller. A snapshot is never shared across partitions.
* fix(bedrock-agentcore): use runtime IDs and endpoint names in ARNs
Keep runtime ARNs stable across versions and use the parent runtime ID and endpoint name for endpoint ARNs. Update API responses, ARN lookups, tagging dispatch and CloudFormation references together.
* fix(bedrock-agentcore): preserve legacy and harness runtime lookups
RedshiftQueryHandler wrote the same Tags/Tag loop in eight resource
builders: clusters, snapshots, cluster parameter groups, cluster
subnet groups, snapshot schedules, event subscriptions, snapshot copy
grants and integrations. They now call one tagsXml helper.
The XML is unchanged. Clusters, snapshot copy grants and integrations
still leave out an empty Tags list, and the other five still write
one. A new RedshiftQueryHandlerTest case pins both shapes for all
eight; it passes before and after the change.
Validate the compact UTF-8 JSON environment before function creation or configuration mutation. Both paths previously accepted the 5,000-character value reported in #7995. Cover exact byte boundaries, aggregate variables, Unicode, JSON escaping, and rejected-update atomicity through the AWS SDK.
Stop quota serialization through a bounded UTF-8 counting sink without allocating complete JSON and byte-array copies. Keep unchanged legacy environments out of CloudFormation configuration updates while validating changed variables and preserving environment removal. Add early-stop, one-megabyte input, Unicode buffer-boundary, and legacy-stack rollback regressions.
Include AWS's String measured diagnostic while retaining at most 5,120 UTF-8 bytes and terminating larger input early. Drop incomplete trailing UTF-8 characters before adding an ellipsis. Keep the 1 MB robustness request on CreateFunction, and assert every SDK configuration-update body stays below the separate 5,120-byte request limit. Cover complete measured JSON and bounded Unicode previews.
CreateUser and CreateACL never read their Tags member, and ListTags,
TagResource and UntagResource resolved every ARN as a cluster, so a
user or ACL ARN answered ClusterNotFoundFault and neither resource
could be tagged at all.
User and Acl now keep a tag map, set from Tags on create as
CreateCluster already does. The three tag operations pick the
resource from the ARN: user/ and acl/ look the name up in the current
Region and require the stored ARN to match, answering
UserNotFoundFault or ACLNotFoundFault, and any other ARN goes through
clusterByArn as before. The built-in default user and open-access ACL
are not stored, so they still answer the not-found fault. Users and
ACLs saved before this change have no tags field and load with an
empty map.
Fixes#7956
Validate the description before replacing stored upstreams so a refused
UpdateRepository request leaves the repository unchanged. Cover rejected
replacement and clearing requests through the AWS SDK, including successful
updates at the accepted description-length boundary.
Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
Co-authored-by: Andre Kurait <akurait@amazon.com>
Take the execution monitor when an action, stage or condition records a
failure. A concurrent stop can no longer replace a Failed write between
its terminal check and its Stopping transition.
Port the remaining failure transitions and regression coverage from
AndreKurait/floci#710. The stop handler already landed in upstream #7939.
Hold the execution monitor across the approval completion check, result
updates and persistence so stop cannot interleave with a rejected result.
Share the held-monitor stop helper and cover rejection before a waiting
stop. Wait for approval polling after token persistence in the existing
stop-completion fixture.
Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
Co-authored-by: Andre Kurait <akurait@amazon.com>
Accept SDK credentials in AwsTestClients so session identities use the same
endpoint and transport setup as basic credentials. Reuse the overload in
federation, token-duration and principal-tag fixtures.
Follow up on the shared client setup requested in PR #7839.
Use AwsTestClients for the remaining STS duration, S3 resource-account and
EC2 signature fixtures. Expose its credentials-and-transport overload so
EC2 keeps Apache, and pass S3's path-style builder through the common path.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
CreateClusterParameterGroup and CreateClusterSnapshot both take Tags,
but the handler never parsed them, so the new parameter group or
snapshot came back untagged: in the create response, in
DescribeClusterParameterGroups and DescribeClusterSnapshots, and in
DescribeTags on its ARN.
Tags are now parsed (Tags.Tag.N and Tags.member.N) and stored on the
resource, as CreateClusterSubnetGroup already does, and the
ClusterParameterGroup and Snapshot elements carry a Tags list, as AWS
returns them. DeleteCluster's final snapshot and automated snapshots
are still created without tags.
* feat(sns): trust FLOCI_TLS_EXTRA_CA_PATH for HTTPS subscriptions
SnsService built its delivery HttpClient without an SSLContext, so an
HTTPS subscription whose endpoint has a certificate from a private CA
never got the SubscriptionConfirmation or any notification. Floci only
logged "Failed to reach SNS endpoint".
The @Inject constructor now passes ContainerCaBundle.sslContext(config)
down to the constructor that builds the client, as EventBridgeInvoker
does. The SubscriptionConfirmation and notification delivery share that
one client. It stays pinned to HTTP/1.1, and hostname verification
stays on. The other constructors build the client as before.
Closes#8033
* test: share the /hook HTTPS endpoint between the extra CA delivery tests
LocalHttpsServer.hook starts a localhost HTTPS server that passes each
request to /hook to a callback and answers 200, and hookUrl gives its
URL. EventBridgeInvokerApiDestinationTest and the new SNS test use them
instead of each writing the endpoint out.
Recreate the reviewed Rekognition changes on the existing upstream main base using a verified commit. The complete file tree is identical to PR head 19f259b43e1ec8a3ce5fd2a50eb9c21e4ed604df, preserving the collection, pagination, persistence and model-validation fixes while removing the unsigned merge.
Generate constraints for every modeled operation with constraints=True. Select the served operation in the handler, validate its request once, then dispatch. Preserve UnknownOperationException for unserved actions.
Move constraint tests to the handler boundary and verify newly modeled operations are detected without maintaining an allowlist. Verified 189 Java tests, 55 generator tests, Checkstyle, generated-data, documentation and partition checks. Addresses review 5865133468.
Every check Floci makes on an S3 bucket or object named its ARN itself: the direct path (ResourceArnBuilder), presigned URLs and the bucket policy checks (S3PublicAccessEvaluator), the Redshift COPY (RedshiftRoleAccess, S3CopySimulator), the Redshift audit log delivery and its logging setup, the Spectrum scratch object, the Step Functions s3:PutObject task, and the S3 resources CloudTrail records on a data event. S3ResourceArns now mints both, and S3ConditionKeys names s3:prefix and the listing context for S3Service, the COPY path and the condition resolver. Behaviour is unchanged.
S3 stays built by hand rather than read from iam-request-resources.json: the generator's rule fills no variable of the object type from Bucket and Key, and ListObjects maps to no s3:ListBucket, so a direct GetObject would fall to *.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
CloudFront's REST routes were not in the vendored route table and its namespace's resources were not read, so under IAM enforcement no CloudFront request was checked: a caller with no permissions could create, change and delete distributions, cache policies, functions and the rest. Its botocore model is now in regen_rest_routes.MODELS and its namespace in regen_iam_request_resources.NAMESPACES, so each request is checked as the action of the operation its route names, on the resources the request names.
regen_iam_request_resources read requests of the JSON, Query, CBOR and REST-JSON protocols only, so a REST-XML request named no resource. It now reads a REST-XML request's path labels and query parameters, which RequestResources reads whatever the protocol, and not its body, which is not one it reads.
Creation tags stay unread: CloudFront wraps them in a Tags structure holding Items, which regen_iam_tag_on_create does not read yet.
Three CloudFront operation shapes were still checked on `*` or as no
IAM action:
- `stem` drops a trailing `config`, so a bare `Id` names the resource
whose config an operation reads (GetDistributionConfig and the other
...Config reads, and GetFieldLevelEncryption, whose type is
field-level-encryption-config).
- A member whose pattern takes only an ARN counts as an ARN when it is
named `Resource`, as well as when it is an identifier, so the tagging
calls are checked on the resource their ?Resource names. Members
naming another resource (a role, a monitor, a target) still do not.
- An operation whose own name is no action, and which several actions
authorize, is the one its name starts with as a word:
CreateDistributionWithTags is checked as cloudfront:CreateDistribution.
The same rule maps Keyspaces' CreateKeyspace, CreateTable, CreateType
and RestoreTable to cassandra:Create and cassandra:Restore, and
QuickSight's CreateTopicV2 and UpdateTopicV2 to quicksight:CreateTopic
and quicksight:UpdateTopic. A plural is no such word: S3's
DeleteObjects is checked for each object it deletes.
GetManagedScalingPolicy returned the policy of a cluster that was
shutting down or had ended. AWS answers ValidationException "A job flow
that is shutting down, terminated, or finished may not be modified."
there, as Terraform's acceptance runs recorded, and Terraform's provider
reads that answer as the policy being gone. Floci kept returning it, so
a refresh after termination kept a policy AWS reports gone.
A TERMINATING, TERMINATED or TERMINATED_WITH_ERRORS cluster now gets
that answer. emr.md no longer says no answer is recorded for the managed
scaling calls: Terraform's provider also expects it from
RemoveManagedScalingPolicy.
Preserve the complete focused change from fork #713 on current main, including exact report expiry boundaries and password timestamp regressions.
Signed-off-by: Andre Kurait <akurait@amazon.com>
* fix(codepipeline): preserve and manage custom action type tags
CreateCustomActionType copied its whole request into the stored action
type, so its tags sat inside actionType instead of on the resource, and
the response had no top-level tags. TagResource, UntagResource and
ListTagsForResource only looked up pipeline ARNs, so an actiontype ARN
answered ResourceNotFoundException and a custom action type could not
be tagged.
Keep the tags on the action type's stored item and return them at the
top level of the CreateCustomActionType response, as the API model
does. The three tag operations now resolve an actiontype ARN
(actiontype:Owner/Category/Provider/Version) before falling back to a
pipeline ARN. Action types saved before this change load with no tags.
Fixes#7950
* fix(codepipeline): guard custom action type writes and cap merged tags
CreateCustomActionType checked for an existing type before storing it,
and the tag operations read, edited and stored a type's tag map, all
without a lock. Two creates of one type could both succeed, a tag write
could restore a type deleted meanwhile, and the map was edited in place
while ListTagsForResource and the store serializer iterated it. Create,
delete and tag writes of an action type now share a per-type lock,
pipeline tag writes take the lock pipeline writes already use, and a
tag write stores a new map instead of editing the stored one.
TagResource checked only the size of the incoming tag list, so a
resource with 50 tags accepted a 51st key. It now checks the merged set
and answers TooManyTagsException, for pipelines too; replacing the
value of an existing key at 50 tags still works.
ModifyCluster, the four Set* setters, and Put and Remove of a cluster's
managed scaling, auto-termination and automatic scaling policies all
changed a TERMINATED cluster, and AddTags and RemoveTags its tags.
AWS documents these for running clusters, but no answer for an ended
one is recorded. So they give the one AWS gives AddJobFlowSteps and
ModifyInstanceFleet, "A job flow that is shutting down, terminated, or
finished may not be modified.", in the code each operation's model
points at, as AddInstanceGroups and AddInstanceFleet already did for a
TERMINATING cluster: InvalidRequestException with ErrorCode
INVALID_JOB_SHUT_DOWN for ModifyCluster, ValidationException for the
others, whose models declare no InvalidRequestException. A Set* request
naming such a cluster changes none of the clusters it names.
AddInstanceGroups and AddInstanceFleet now answer a TERMINATED cluster
that way too, in place of "Cluster <id> is terminated.", which no source
has.
The Management Guide says "you cannot add, edit, or remove tags from a
terminated cluster" and names no error. AddTags and RemoveTags refuse an
ended cluster with InvalidRequestException "Tags cannot be modified on
terminated clusters.", the message a tagging tool matches from AWS.
StopApplication stopped an application whose runs had not finished,
where the API reference says "All scheduled and running jobs must be
completed or cancelled before stopping an application."
A run that has not finished, a STREAMING or CANCELLING one included, now
refuses the stop with ValidationException, the one error the model
declares for it, carrying that sentence, as AWS's own message is not
recorded. The check holds the job runs' lock, as StartJobRun's admission
does, so no run starts between it and the stop. Step Functions'
stopApplication goes the same way.
A distribution could name a certificate in ACMCertificateArn and in
IAMCertificateId at once, and could name one in either of them without the
MinimumProtocolVersion and SSLSupportMethod that go with it. It could also
carry a security policy or a viewer support method outside the values those
members admit, carry SSLv3 alongside sni-only, and claim
CloudFrontDefaultCertificate while naming a certificate of its own. The
ViewerCertificate entry states every one of those rules, and nothing here
read any of them, so a configuration AWS refuses was taken and the
distribution went on to serve it.
They are read now on the distribution create and the distribution update,
and the shape of the protocol members before any of it, so a request that
breaks a rule is refused for the rule and not for a certificate nothing
matches. A member carried blank counts as no value, the way a blank location
member already names no certificate, and a distribution on the CloudFront
domain name needs neither location member.
Two of the refusals are published. A MinimumProtocolVersion outside its
enumeration is InvalidMinimumProtocolVersion, whose own sentence is that the
minimum protocol version specified is not valid. SSLv3 alongside sni-only is
InvalidProtocolSettings, whose sentence names that pair and nothing else and
which is the same rule as the floor the member states for SNI, "you must
specify TLSv1 or higher", SSLv3 being the only value below TLSv1. That code
is declared on CreateDistribution, CreateDistributionWithTags and
CopyDistribution and has never been declared on UpdateDistribution, which
has declared InvalidMinimumProtocolVersion since 2015, so the update answers
the pair with the code it declares and keeps the pair's published sentence.
The declared code is the one a caller's SDK can map, an undeclared one
reaching it as a generic error, and the sentence keeps the two causes the
update answers under that one code apart.
The others are readings. An SSLSupportMethod outside its enumeration has no
code of its own and answers InvalidArgument, what this service already
answers a member outside its shape with. The three rules about the
certificate itself answer InvalidViewerCertificate 400: InvalidArgument and
InvalidMinimumProtocolVersion are modelled on both writes as well and no
sentence says which one a caller gets, and the Developer Guide page that
enumerates what InvalidViewerCertificate answers reaches none of those
cases, naming the certificate's own trust, its chain, its format and the
names it covers. That code's own documentation is that a viewer certificate
specified is not valid, which is what each of the three carries.
One rule in the group replaces a value instead of refusing the request.
MinimumProtocolVersion's entry says that when CloudFrontDefaultCertificate
is true CloudFront "automatically sets the security policy to TLSv1
regardless of the value that you set here", so the policy such a request
asks for is overwritten and the config reads back TLSv1. A distribution
created with no ViewerCertificate at all already read as the default
certificate and reads TLSv1 with it now, where it had been answering
TLSv1.2_2021.
Two more readings go with the group. The claim itself is a member declared
boolean, so it is held to the four forms XML gives a boolean, true, false, 1
and 0, rather than read for the word true alone: taken for false, a request
saying yes would dodge every rule the member governs, the refusal beside a
named certificate and the replaced policy alike. Anything else answers the
InvalidArgument this service answers a member outside its shape with,
CloudFront modelling no error for a malformed document. And the SSLv3 pair
is read for a distribution on a certificate of its own alone, since on the
CloudFront certificate the policy is replaced and the value that would make
the pair is discarded, so refusing the request for it would contradict the
override. Both enumerations are read either way.
The us-east-1 restriction AWS states for ACM certificates is left
unenforced, as is the /cloudfront upload path before it: refusing either
here could meet a distribution somebody already built. All of the above,
that included, is set out in docs/services/cloudfront.md.
* feat(logs): support saved query definitions
Closes#7999
* fix: preserve saved-query retries and fence reset writes
Keep client-token request snapshots and returned IDs separate from mutable query definitions. Delayed create and update retries preserve newer content, reject conflicting input, and do not resurrect deleted definitions. Persist retry records with the configured account-aware CloudWatch Logs storage until reset.
Gate saves and deletes through beforeReset/afterReset under the service monitor so reset drains active writes and rejects new writes throughout the storage wipe.
Validation: 137 focused service, SDK integration, reset, and existing CloudWatch Logs regression tests passed. Checkstyle, docs-check, partition-check, and git diff --check passed.
* fix: validate saved queries against vendored Logs constraints
Include all three saved-query actions in the existing botocore constraint generator and share RequestConstraintCheck with delivery handlers. Return InvalidParameterException for saved-query constraints while preserving delivery ValidationException messages. Remove duplicated lengths, patterns, enums, list sizes, and type checks from the service and handler; retain domain checks for retries and query-language compatibility.
Reuse AwsTestClients for SDK integration fixtures. Cover modeled errors before service calls, nested parameters, valid maximum sizes, and existing saved-query retry/reset behavior.
Validation: 179 focused Java tests and 50 request-shape generator tests passed. Generated-data freshness, Checkstyle, docs-check, partition-check, and git diff --check passed.
Query and Scan on a KEYS_ONLY or INCLUDE index evaluated FilterExpression,
QueryFilter and ScanFilter against the base-table item, so filters matched
attributes the index does not project.
Query now refuses such a filter on GSIs and LSIs, inside validateQuery so it
runs before the projection check, with the same ValidationException the
PartiQL path returns via a shared helper. Scan evaluates the filter on the
index projection, so non-projected attributes never match.
Closes#7896
Neither REST model was vendored in rest-routes.json and no rule mapped
their routes, so under enforcement every Security Hub and GuardDuty
request resolved to no action and was let through: a user with no
policies could EnableSecurityHub or ListDetectors.
- regen_rest_routes.MODELS reads securityhub and guardduty;
rest-routes.json takes their routes from botocore 1.43.118, and
iam-authorized-actions.json their actions of no resource type
(securityhub 31, guardduty 70). Nothing else changed.
- Both move from NOT_COVERED to NAMESPACES in the table of request
resources: 228 operations, 3350 over 46 namespaces, no other entry
changed. Security Hub's hub actions are checked on the caller's hub
in the Region, hub/default, the ARN Security Hub gives it, and
GuardDuty's detector and publishing destination operations on the
detector their path names.
- The generator gains a rule: an optional top-level member holding the
ARN of a type whose format has no variable of its own also names
that type when the request leaves it out. DescribeHub with no HubArn
is so checked on hub/default, as AWS checks it, rather than on *,
which would refuse a grant scoped to the hub. The rule changes no
other operation.
- Both move to NAMESPACES in the tag-on-create table too: an
EnableSecurityHub carrying tags also needs securityhub:TagResource on
the hub, a GuardDuty create carrying tags guardduty:TagResource, and
the create is checked with aws:RequestTag and aws:TagKeys.
Regenerated from the Service Reference retrieved 2026-11-11. It now
also gives two Lake Formation operations, GetGlueFunctionSessionContext
and GetTemporaryGlueFunctionCredentials, checked as
lakeformation:GetDataAccess; they are left to the next sync, which
--verify reports without failing. Macie is read by #7869.
IamRestRouteEnforcementIntegrationTest checks both services: a caller
with no grant refused, a grant scoped to the hub or detector let
through, another Region's hub and another detector refused, and a deny
holding under an allow on everything. IamTagOnCreateEnforcementIntegrationTest
checks a hub enabled and a detector created with tags: TagResource
needed, a request tag condition applied, and an untagged create
needing its own action alone. All four fail on main. iam.md says so.
Closes#7830