Athena's GetDataCatalog, ListDatabases, ListTableMetadata and
GetTableMetadata handlers read the catalog name with has() and
asText(), so a JSON null became a catalog named `null`: GetDataCatalog
then answered InvalidRequestException rather than the AwsDataCatalog
it answers for a request naming none. They now read it through the
handler's text(), as GetWorkGroup and StartQueryExecution read
WorkGroup, so a JSON null names no catalog.
Under IAM enforcement, a GetDataCatalog naming no catalog was checked
on `*` though Floci answers AwsDataCatalog, so a grant on that catalog
was refused and a deny on it did not apply, and the three catalog
reads given a JSON null CatalogName were checked on `datacatalog/null`
as well as on AwsDataCatalog. The request-resources table now reads a
request naming none, or a JSON null, as naming AwsDataCatalog for all
four, as it reads Athena's primary workgroup.
The table's regeneration also takes up drift in AWS's Service
Reference since the last sync, which the online check of both IAM
tables fails on: AWS now lists cognito-idp:DescribeTermsByClient among
the actions it authorizes DescribeTermsByClient as, so the
authorized-actions map no longer maps it to DescribeTerms and the
request-resources table checks it as its own action, and the map
gains MediaConnect's new BatchGetDestinationEndpoint and
BatchGetSourceEndpoint. Floci serves none of these operations.
A SigningAttributes member that is not a JSON object answered a
Floci-only BadRequestException. The operation now runs the shared
SES v2 shape check first, so a member of the wrong JSON type is a
SerializationException with AWS's deserializer message, ahead of the
origin check and the identity lookup, as AWS answers it. A missing
identity now answers AWS's "The specified email identity, <id>, does
not exist."
* fix(cloudformation): clear an AppSync property the new template drops on update
An update whose template drops a property the previous template declared now clears it on the five AppSync types, and one the stack never declared keeps the value set outside it. ProvisionContext.droppedProperties names the dropped properties.
* test(cloudformation): move the AppSync removal case into AppSyncCfnIntegrationTest
The case reuses the class's helpers, now built on CfnRequests.cfn, instead of a second copy. Documents the AppSync update rule next to the AWS::NoValue section.
* fix(ec2): propagate transit gateway attachments to the default propagation route table
* refactor(ec2): build transit gateway route table propagations in one helper
The default-propagation path in storeNewAttachment and
enableTransitGatewayRouteTablePropagation built the same propagation
record field for field. Both now call storePropagation.
* test(ec2): assert the resource id of a default-created propagation
The create-site VPC id argument to the propagation helper was not checked
by any test; only the resource type was.
* fix(ec2): apply DescribeIpamPools filters
* fix(ec2): resolve DescribeIpamPools scope filters from the pool owner's IPAM
- ipam-scope-type, ipam-scope-arn, ipam-arn and ipam-region now resolve the
scope through the pool's own IPAM across account partitions, so a
RAM-shared pool described by id matches them.
- pool-depth stops at a deleted ancestor instead of failing the request
with InvalidIpamPoolId.NotFound; an orphaned pool counts as top-level.
- The scope lookup runs only for filters that need it, once per scope per
request, so pool-field filters no longer scan the IPAM store.
* fix(ec2): log the tolerated NotFound in IPAM pool scope and depth lookups
AGENTS.md requires a tolerated exception to be logged. Both catches can
only see InvalidIpamId.NotFound / InvalidIpamPoolId.NotFound (create
rejects a blank source id), so they stay unnarrowed and log at debug.
* refactor(ec2): reuse Ec2Service.matchesTagFilter for IPAM pool tag filters
matchesTagFilter holds no instance state, so make it static and
package-private and let matchesPoolFilter call it instead of repeating
the tag:<key> / tag-key branch. The shared helper also treats a null tag
list as no tags, so a pool restored with tags=null no longer fails
DescribeIpamPools with a NullPointerException.
Clear managed endpoint and token state only after strict container removal succeeds. Retain ownership on failure for cleanup retry and preserve external endpoints.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
* fix(redshift): discard the final snapshot when DeleteCluster fails
DeleteCluster took the final snapshot before tearing the cluster down. When the teardown then failed, the cluster survived but the snapshot stayed behind, so retrying with the same FinalClusterSnapshotIdentifier failed with ClusterSnapshotAlreadyExists. Remove the snapshot when the cluster is still present after a failed removal.
* fix(redshift): keep the final snapshot once container teardown has started
The cleanup added for failed DeleteCluster also ran when containerManager.stop threw. That call removes the container and its volumes before closing the log stream, so a late failure leaves the cluster record behind with the database already gone, and the cleanup then deleted the only remaining copy. Limit the cleanup to the proxy-stop failure, which happens before anything is torn down, and cover both the kept-snapshot and the suppressed-cleanup-failure paths.
Resolve the shared signing scope to API Gateway when no explicit service route owns the request. Preserve IoT route ownership and custom-domain authentication across existing invocation paths.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
* feat(route53): add reusable delegation set APIs
* feat(route53): associate reusable delegation sets with hosted zones
* fix(route53): preserve delegation ownership and assignments
* fix(route53): authorize delegation set operations by matched route
* fix(route53): filter hosted zones by reusable delegation set
* fix(iam): select REST XML denials from the service catalog
* perf(test): reuse Route53 IAM enforcement fixtures
* fix(ec2): report NAT gateways as zonal and honor PrivateIpAddress
The Terraform AWS provider reads network_interface_id, private_ip and
public_ip from a NAT gateway only when it is reported with
availabilityMode zonal. Floci never sent availabilityMode, so all three
stayed null. Every gateway Floci creates sits in one subnet, so the
responses now say zonal.
Floci has no regional NAT gateways. A regional request that named only
its VPC failed on the missing subnet, and one that also named a subnet
got a zonal gateway, through both CreateNatGateway and
AWS::EC2::NatGateway. Both now refuse AvailabilityMode regional with
UnsupportedOperation. Any other value except zonal, such as Regional,
fails with InvalidParameterValue instead of creating a zonal gateway.
Once Terraform reads private_ip back, the gateway has to hold the
address it was asked for. private_ip forces a new gateway, and
CreateNatGateway ignored PrivateIpAddress, so a config that set it
would plan a replacement on every run. CreateNatGateway and
AWS::EC2::NatGateway now give the gateway's interface the requested
address, checked by the same rules as RunInstances: inside the subnet,
not reserved and not in use. A changed PrivateIpAddress replaces the
CloudFormation resource, as it is createOnly. A gateway has its primary
address only, so SecondaryAllocationIds, SecondaryPrivateIpAddresses
and SecondaryPrivateIpAddressCount are refused with
UnsupportedOperation instead of being dropped.
AWS::EC2::NatGateway also sets EniId, the gateway's primary interface,
which Fn::GetAtt resolved to the literal "Nat.EniId" although the
gateway has had a real interface since #5622.
Closes#6767
* fix(ec2): take no VPC network lease for a NAT gateway's requested address
DeleteNatGateway never returns a lease, so the one CreateNatGateway took
for its PrivateIpAddress kept the address from automatic allocation
after the gateway was gone. Check that the address is free the way
CreateNetworkInterface does, without the lease; automatic allocation
already steps around addresses a stored NAT gateway holds.
Ec2NatGatewayAddressIntegrationTest now sends its requests through the
shared Ec2Requests.ec2 instead of its own copy.
* fix(applicationautoscaling): target-tracking alarms watch the real metric, not the policy type name
CustomizedMetricSpecification passes Namespace, MetricName, Dimensions,
Statistic and Unit onto the AlarmHigh and AlarmLow alarms as given, and
the ECSServiceAverageCPUUtilization, ECSServiceAverageMemoryUtilization
and ALBRequestCountPerTarget predefined types map onto the documented
AWS/ECS and AWS/ApplicationELB metric identities, so the alarms see data
published the way AWS (or the caller) publishes it.
Closes#6853
Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
* fix(applicationautoscaling): read ALB target-tracking alarms through Sum
RequestCountPerTarget data points already carry the per-minute average
across the target group, and CloudWatch names Sum as the only valid
statistic for the metric, so an Average alarm compares the target
against a second average and misses scale-outs (two samples of 600
read 600 instead of 1200 against a target of 1000). The statistic now
travels with each predefined metric mapping, keeping Average for the
ECS utilisation gauges.
Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
---------
Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
Co-authored-by: Priamo Germosen <6233424+pgermosen@users.noreply.github.com>
* fix(cloudformation): apply EnabledMfas on AWS::Cognito::UserPool
* docs(cloudformation): move the EnabledMfas note to the resource-type table source
* fix(cloudformation): drop the MFA factors EnabledMfas no longer lists on update
* fix(cognito): apply EnabledMfas mode and factors in one write
* fix(cloudformation): roll back EnabledMfas with the rest of the user pool
* fix(cognito): serialize whole-pool writes behind a per-pool lock
replaceUserPoolMfaConfig stores a copy of the pool, so a TagResource that
landed between the copy and the write was lost. Tag and untag locked the
pool instance, which the copy replaces, so they did not exclude it.
Every write that reads a pool and stores it back whole now holds a lock
keyed by the pool id and reads the pool inside it.
* fix(autoscaling): preserve group-owned target cleanup across lifecycle paths
Preserve the reviewed strict shared cleanup, Classic load-balancer detach behavior, and failure ownership for retries. Reconcile current main test SDK dependencies without changing the reviewed Java sources.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
* fix(autoscaling): share Classic cleanup and retain failed members
Use the same Classic load-balancer deregistration helper for detach and every reconciler cleanup path. Preserve members for retry on actual failures, tolerate deleted balancers, and move detach cases to the existing complete fixture.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
---------
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
Reset empties the snapshot store before clear() runs and deleteDumpTree() removes the whole dump directory, so the loop found nothing to delete.
Co-authored-by: Priamo Germosen <6233424+pgermosen@users.noreply.github.com>
* fix(cloudmap): create the Route 53 hosted zone behind a DNS namespace
Private and public DNS namespaces reported a random HostedZoneId that no
Route 53 zone backed. They now create a real zone (private with the
namespace VPC and region, or public) via Route53Service, and DeleteNamespace
deletes it; a zone holding user records refuses with HostedZoneNotEmpty and
the namespace is kept.
A private zone now covers the namespace's names, and the Route 53 DNS source
answers NXDOMAIN for names it has no record for. EmbeddedDnsServer took the
first present answer across sources, so bean order could hide Cloud Map
instances. An NXDOMAIN from one source no longer wins over another source's
real answer.
Reset: zones and namespaces live in separate stores; Route53Service.clear()
only drops in-memory counters, so no Cloud Map reset hook was added.
* test(cloudmap): select the user's zone now that namespaces own a real one
A private DNS namespace now creates a real Route 53 hosted zone, as AWS
does, so the compat projects hold two zones named floci-compat.internal:
the namespace's private zone and the public aws_route53_zone. The bats
lookups took the first zone by name, which picked the namespace zone
whenever its id sorted first, so the record and tag assertions read the
wrong zone. They now select the public zone.
The CloudFormation test pinned the namespace HostedZoneId to 14
characters, the length of Cloud Map's old placeholder. The id now comes
from Route 53, which, like AWS, does not use a fixed length; the test
checks for a bare Z-prefixed id instead.
* fix(dns): let a record source with records win over another's NODATA
Two sources can own one zone (a Cloud Map namespace and its Route 53
zone). An empty NOERROR from the first consulted source was returned
before the other was asked, so a TXT record in the zone hid Cloud Map's
A record at the same name. Empty answers are now fallbacks, an existing
name preferred over NXDOMAIN.
* fix(cloudmap): log a namespace zone that was already deleted
* docs(cloudmap): describe the real hosted zone in the operations table
* test(dns): pin how record sources combine REFUSED and negative answers
Another source's records now beat a REFUSED, and REFUSED beats NXDOMAIN
in either source order; nothing pinned either, so returning REFUSED
immediately went unnoticed. Also pin, as current behaviour, that a plain
NODATA beats an NXDOMAIN carrying an SOA authority.
The packet test now deletes the TXT records it adds to the namespace's
hosted zone, so the zone is left deletable.
---------
Co-authored-by: Priamo Germosen <6233424+pgermosen@users.noreply.github.com>
A mount point or volumes-from entry registered without readOnly described
back with readOnly=false, and the Terraform AWS provider then diffed the
shape and replaced aws_ecs_task_definition on every apply. readOnly is an
optional boxed boolean in the ECS model: absence stays absent, explicit
true and false echo as sent, and the container runtime still mounts
absence as read-write.
Closes#6909
Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
Co-authored-by: Priamo Germosen <6233424+pgermosen@users.noreply.github.com>
* feat(ecs): stop service tasks off the reconciler thread so slow graceful stops don't serialize unrelated services (#6619)
The service scheduler ran each task's Docker stop on the single
reconciler thread, holding the reconciliation pass lock and the task's
monitor. A stop waits out every container's stopTimeout, up to two
minutes a container, so one slow task held up every other task and
service, and several stopped one after another.
The reconciler still marks the task STOPPING and deregisters it at once,
then hands the Docker stop to a bounded task stopper: eight daemon
threads named ecs-task-stopper-N, created only while there is something
to stop. When Docker is done the stop lands the task STOPPED under its
monitor, with the same exit codes, finish times, network release,
cluster count and event ladder as before, and in the task's own account;
a failed stop leaves it STOPPING for a later tick to retry, as it always
has. A per-task registry keeps the ticks in between from submitting the
same stop again. Grace periods are unchanged. Rollouts count only
RUNNING tasks, so a task that stays STOPPING longer starts no extra
replacement, and a DAEMON replacement still waits for STOPPED.
StopTask keeps its synchronous contract. On a task the scheduler is
already stopping it waits, outside the task's monitor, for that stop to
land instead of stopping the same containers a second time. A container
teardown lets the stopper drain before it claims the remaining handles,
and afterReset() replaces the stopper along with the reconciler.
Stopper threads now change a cluster's running task count while the
reconciler launches tasks, so the count is read and written under the
cluster's monitor.
With real Docker and three services whose containers ignore SIGTERM
(stopTimeout 10 seconds), stopping the three old tasks took one 31 second
tick, one task after another, before this change, and 13 seconds with
all three stopping side by side after it.
* fix(ecs): make StopTask wait for a tick's retry of a background stop that failed
A background stop that failed can be retried by a reconcile tick before the
waiting StopTask takes the task monitor back. StopTask now rechecks for a
running stop in a loop, waiting outside the monitor each time, so it never
returns STOPPING while Docker is still stopping the task.
The background-stop integration test now reads STOPPED under the task
monitor, so it also sees the exit codes and cluster count the stop lands.
* test(ecs): use the shared InMemoryStorageFactory in the graceful-stop concurrency test
---------
Co-authored-by: Priamo Germosen <6233424+pgermosen@users.noreply.github.com>
* fix(dynamodb): refuse a PartiQL table alias as DynamoDB does
* fix(dynamodb): check the PartiQL DELETE returning clause after the whole statement parses
---------
Co-authored-by: Priamo Germosen <6233424+pgermosen@users.noreply.github.com>
* feat(glue): data quality rulesets
CreateDataQualityRuleset, GetDataQualityRuleset, UpdateDataQualityRuleset
and DeleteDataQualityRuleset answered InvalidAction, and
ListDataQualityRulesets always returned an empty list, so Terraform's
aws_glue_data_quality_ruleset failed at its first apply.
Rulesets are now stored per account and Region by name, with their
description, DQDL text, target table, security configuration and created
and last modified times, and tagged through the shared tag store by their
dataQualityRuleset ARN. Update replaces only the members the request sets.
List returns them in name order with RuleCount, filtered by name,
description, target table, created and last modified times and tags, and
paged by MaxResults and NextToken. Errors follow the model:
AlreadyExistsException for a duplicate, EntityNotFoundException for an
unknown name, InvalidInputException for a missing or oversized member.
Rulesets are stored, not evaluated.
Closes#6830
* fix(glue): match a ruleset's catalog and take its store from the caller
The ListDataQualityRulesets target table filter compared only TableName and
DatabaseName, so filtering for one catalog also returned a ruleset on the
same table in another. A CatalogId in the filter now has to match too, with
a target table that names no catalog in the account's own.
The package-private GlueService constructor built the ruleset store itself;
it now takes it as an argument, as it does every other store.
* fix(glue): reuse hasTags and AwsJsonTimestamp for ruleset listing
The ruleset tag filter now goes through hasTags, as jobs, crawlers and
triggers do, and the list filter's timestamps through
AwsJsonTimestamp.epochSeconds, so a timestamp sent as a string is refused
with InvalidInputException as the SDKs never send one.
---------
Co-authored-by: Priamo Germosen <6233424+pgermosen@users.noreply.github.com>
* fix(ec2): CreateNetworkInterface honours the PrivateIpAddresses entry marked Primary
The Terraform AWS provider sends private_ips as PrivateIpAddresses.N.PrivateIpAddress
plus Primary=true. The handler dropped the Primary flag, so the ENI got an
auto-allocated primary and the requested address became a secondary. The entry
marked Primary is now the primary (checked and reserved like PrivateIpAddress),
other entries are secondaries and are refused with InvalidIPAddress.InUse when
held. PrivateIpAddress together with a Primary entry is InvalidParameterCombination.
* test(ec2): cover duplicate Primary entries and secondaries equal to the primary in CreateNetworkInterface
* fix(ec2): check CreateNetworkInterface secondaries in canonical form before allocating the primary
A refused secondary no longer leaves the auto-assigned primary leased on the
VPC network, and a zero-padded secondary can no longer slip past the in-use
and duplicate checks or be stored padded.
* test(ec2): cover an auto-assigned primary that equals a requested secondary
* fix(rds): rotate cluster managed credentials and secret versions together
* test(rds): load the PostgreSQL driver before the first DriverManager call
DriverManager only offers drivers the caller's class loader can see. After a
Quarkus restart, the first getConnection in
RdsPostgresStartupParametersIntegrationTest found none ("No suitable driver
found"), which has been failing CI shard 1 on main. Load PgJDBC through the
test's own loader first, as RdsBackendEndpointRefreshIntegrationTest already
does, and do the same in the new managed-password rotation Docker test.
---------
Co-authored-by: Priamo Germosen <priamo.germosen@starling.co>
* fix(cloudfront): return the decoded function code from GetFunction
GetFunction wrote the stored base64 text into the response body where
AWS returns the code the request carried, so reading back what you sent
gave different bytes. The body is the decoded code now, with the
octet-stream content type and the ETag header unchanged; the
CloudFormation provisioner base64-encodes the template's plain code so
the stored form stays the wire form, and GetFunction is the single
decode point.
Closes#6749
Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
* fix(cloudfront): read a plain-code record persisted by an older Floci version
GetFunction served a 400 for a stored code that was not base64, and an
upgrade over persistent storage kept the records older Floci writes
wrote the CloudFormation provisioner as plain text, so those functions
stopped serving their code. A non-base64 record now reads back as its
stored bytes, and the next UpdateFunction rewrites it into the uniform
base64 form. The compat round-trip test captures the updated etag
before asserting so a failed assertion cannot hijack the cleanup's
delete.
Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
* test(cloudfront): read the ETag update header the model names and rebase the decoded-code management tests
The decoded-code round trip asserts UpdateFunction answers the version
in the ETag header the SDK models name, so it reads the value it was
extracted from instead of null. The compat round-trip test uses AssertJ
like the rest of the compatibility module.
Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
---------
Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
* fix(route53resolver): set endpoint HostVPCId from its subnets and allocate IPs from subnet CIDR
HostVPCId was derived from the endpoint id, naming a VPC that does not exist.
An IpAddress given only a SubnetId had no Ip. Resolve the subnets through EC2,
use their VPC, and allocate a free address (skipping the first four and last
of the CIDR) when Ip is omitted. Subnets EC2 does not know are still accepted.
* fix(route53resolver): follow-ups for endpoint subnet resolution
Take HostVPCId from the first subnet in request order, reuse Cidr4 for
address math, import instead of fully qualifying names, document the
unknown-subnet fallback and allocation limits, and cover replay, delete
and mixed explicit/allocated addresses.
* fix(route53resolver): allocate endpoint IPs per subnet and reject an exhausted subnet
Addresses were tracked account-wide, so two VPCs with the same subnet CIDR
skipped each other's addresses. Track them per subnet instead.
When a subnet had no free address, allocateIps stored null and the endpoint
still came back OPERATIONAL. Allocate before writing the endpoint and throw
InvalidRequestException so nothing is stored.
* fix(route53resolver): back each endpoint address with an EC2 network interface
Replaces the endpoint's own address allocator with EC2's, as AWS does
("Resolver creates a network interface for each subnet and IP address") and
as ECS already does for awsvpc tasks. Each address in a subnet EC2 knows
becomes one interface created with ec2Service.createNetworkInterface, with
the request's Ip (or one EC2 picks) and the endpoint's security groups, then
held with holdNetworkInterfaceForService. Instances, other interfaces and
other endpoints can no longer get the same address, and EC2 refuses an
explicit Ip already in use, which CreateResolverEndpoint raises as
InvalidRequestException (the model lists it and names no closer error; a
full subnet maps the same way, other EC2 refusals to
InvalidParameterException). A refusal deletes the interfaces already made.
DeleteResolverEndpoint releases and deletes the endpoint's interfaces.
ListResolverEndpointIpAddresses reports each interface's address, reading
the record once, and a JSON null Ip no longer hides it. Subnets EC2 does not
know are still accepted without an interface, and records written before
this change list and delete as before. HostVPCId still comes from the
subnets.
* fix(route53resolver): close two interface-leak windows in endpoint create and delete
DeleteResolverEndpoint was not synchronized while CreateResolverEndpoint
was. Create stores the endpoint before its record, so a delete between the
two found no interfaces to delete and the create then stored the record,
leaving an orphan record and the endpoint's interfaces behind. Delete now
takes the same lock.
The create rollback caught only AwsException, so any other failure from EC2
partway through left the interfaces already made. It now rolls back on any
RuntimeException and rethrows it; EC2 refusals are still translated.
* fix(route53resolver): create an endpoint's explicit addresses before its automatic ones
Interfaces were created in the stored (sorted) order of the address list.
An explicit IPv4 Ip happens to sort before an entry that leaves the address
to EC2, but nothing guaranteed it, and an automatic entry created first could
take the address a later entry asks for, failing the create with
InvalidRequestException though both fit. Interfaces with an explicit Ip are
now created first; the stored list keeps the request order.
* fix(route53resolver): log an endpoint interface cleanup failure instead of dropping it
The cleanup that deletes an endpoint's interfaces swallowed every EC2
error. Only an interface that is already gone is expected and stays silent;
any other failure is now logged as a warning, and the remaining interfaces
are still deleted.
* test(route53resolver): wait on the racing delete with ThreadStates and use Ec2Requests for EC2 calls
* test(route53resolver): assert the racing delete finished and route EC2 calls through one Ec2Requests helper
* feat(redshift-serverless): copy snapshots into the configured destination region
A SnapshotCopyConfiguration used to be stored and echoed, with nothing copied.
A background sweep now carries each AVAILABLE snapshot of the namespace, taken
at or after the configuration was created, into the destination Region with its
dump and metadata. The copy is an ordinary snapshot there, so describe, restore,
delete and expiration work on it unchanged.
- The source records the Regions it has been copied to, so a deleted or expired
copy is not made again and a retry or restart after a crash makes no second
copy. A copy made for an earlier snapshot of the same name is replaced.
- Retention and KMS key come from the configuration. A name already taken by
an unrelated snapshot in the destination is kept and logged.
- Rules carry the account and namespace id, so accounts never collide and a
recreated namespace does not inherit its predecessor's configuration.
- The destination must be a known Region in the namespace's partition.
- ResetAll now removes every snapshot dump, which it used to leak.
- New switches: snapshot-copy-enabled and snapshot-copy-sweep-interval-seconds.
* fix(redshift-serverless): keep the earlier snapshot copy restorable when a replacement fails
Each copy now gets its own dump file and the replaced copy's dump is removed
only after the new record is saved. Drop the slow, partition-bound
compatibility test; the in-repo engine and integration tests cover the copy.
* fix(redshift-serverless): name a snapshot copy's dump by id so long snapshot names still copy
* fix(rds): return Source and ApplyMethod from DescribeDBParameters
DescribeDBParameters and DescribeDBClusterParameters now render Source=user
and the ApplyMethod sent on modify (default immediate). Apply methods are
stored per group, copied on copy, dropped on reset, and absent in older
persisted state.
* test(rds): cover apply-method copy, reset and reload for parameter groups
* test(rds): assert reset clears stored apply methods
* fix(rds): refuse ApplyMethod values outside immediate | pending-reboot
ModifyDBParameterGroup and ModifyDBClusterParameterGroup echoed back any
ApplyMethod string. The RDS model declares the ApplyMethod enum as
immediate | pending-reboot, so any other value (including a different
case) now fails with InvalidParameterValue (400) before the group is
touched. A missing ApplyMethod still defaults to immediate.
The value and apply-method loops shared everything but the member name,
so both now go through one parseParameterMember(params, member) helper.
Promote the original two-file fork #93 change onto current main. Carry the stored execution account through timeout, child policy and parent notification writes without mutating request context. Original source and metadata are retained separately.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
* fix(storage): propagate buffered WAL failures before publication
Rebase the focused WAL correction onto official main after the independent SQS rollback and snapshot fix merged as #7008. Retain buffered ordinary writes, atomic batch sync, safe rollback and exception propagation before publication.
* fix(storage): reject an unavailable buffered WAL path
Retain the existing unavailable-log and closed-writer fault controls while reconciling the signed WAL contribution with the merged SQS rollback dependency. No WAL behavior change from the previously validated contribution.
* fix(cloudfront): serve custom origins that name Floci itself in-process
* fix(cloudfront): keep self-origin requests inside the origin path and accept the TLS AWS port
Resolve the viewer's dot segments before prepending the origin path, as
CloudFront does, so a path like /x/../../other-bucket/key can no longer
reach another bucket. Recognize the extra listener the TLS proxy binds on
floci.tls.aws-https-port as Floci's own port.
* docs(cloudfront): explain why self-origin dot segments are resolved first
CloudFront forwards the raw path; the guard is needed because Floci's
listener resolves dot segments. Give the ignored exception in selfHost
its reason.
* fix(sqs): roll back failed queue saves and detach stored snapshots
Persist candidate lists before publication and restore failed receive or visibility mutations. Share deep Message.copy snapshots with copyForRedrive and extend the existing GuardedMessageQueueTest fixture. Extracted from PR #6533 as requested; independent of WAL write policy.
* perf(sqs): avoid detached message copies for memory backends
Reuse existing memory backend detection for shallow list snapshots. Retain deep loaded and saved snapshots for persistent, hybrid, WAL and unknown backends. Preserve candidate publication and rollback semantics; add zero-copy and backend-specific regression coverage in GuardedMessageQueueTest.
AWS lets an Advanced-tier parameter carry one resource-based policy, used to
share it with other accounts. PutResourcePolicy returns a PolicyId and a
PolicyHash, and updating or deleting the policy takes both: a hash that is no
longer current is ResourcePolicyConflictException, an unknown id is
ResourcePolicyNotFoundException, and an unknown parameter is
ResourceNotFoundException. Floci answered all three actions with
UnsupportedOperation.
The parameter now stores its policy with an id and a hash of the document.
PutResourcePolicy rejects a Standard-tier parameter, a policy over 1024 bytes
and a document that is not a JSON object with the documented errors.
GetResourcePolicies pages with MaxResults (1 to 50) and NextToken. An
overwriting PutParameter keeps the policy and deleting the parameter removes
it. The policy is not evaluated against callers, and no AWS RAM resource share
is created.
* feat(rds): automated backups, kept after a delete and restored from
DescribeDBInstanceAutomatedBackups, DeleteDBInstanceAutomatedBackup,
DescribeDBClusterAutomatedBackups, DeleteDBClusterAutomatedBackup,
StartDBInstanceAutomatedBackupsReplication and
StopDBInstanceAutomatedBackupsReplication answered UnsupportedOperation, and
DeleteDBInstance and DeleteDBCluster ignored DeleteAutomatedBackups, so a
deleted database could not be restored to a point in time.
A live standalone instance with backups on now reports an active automated
backup. A delete with DeleteAutomatedBackups=false keeps a retained one, with
the PostgreSQL data saved outside mock mode, and RestoreDBInstanceToPointInTime
(by DbiResourceId or backups ARN) and RestoreDBClusterToPointInTime (by
DbClusterResourceId) restore from it. Replication to another Region is
metadata only: the replica is listed as replicating, the source lists it under
DBInstanceAutomatedBackupsReplications, and a stop or the source's delete keeps
it as retained.
Closes#6828
* fix(rds): restart stopped replication, use the replica's window, match the source ARN
A stopped replica kept as retained refused a second start of replication to
its Region; only a replica that is still replicating refuses it now, and a
retained one is replaced. A restore from a replicating backup checked the
time against the live source's window; it checks the replica's own window
now and still copies the live source. A replication source ARN naming
another account or service found this account's instance by identifier; the
whole ARN must now match the instance's.
The RDS count in the docs service matrix is 117, for the six new actions.
* fix(ec2): remove a VPC's network after a restart too
deleteVpcNetwork removed a VPC's Docker network only when this process had
materialised it (vpc.created), which happens when an instance in the VPC
starts. After a restart, a VPC that kept its network from the previous
run but had no instance started since was deleted without its network:
the bridge outlived the VPC and held its CIDR, so the next VPC declaring
that CIDR collided with it. Reproduced by: run an instance in a VPC, restart
with persisted state, terminate it, delete the VPC, create one with the
same CIDR.
Startup reconciliation already lists this deployment's VPC networks and
keeps those whose VPC is still declared; it now remembers them, and
deleting such a VPC removes its network. The listing runs whether or not
reconcile-on-startup is on (only reaping orphans is behind that flag), so
the fix does not depend on it. Upstream #5869 already detaches Floci
before removal; this keeps that path.
* fix(ec2): remove a restored VPC's network by the name it has
Startup reconciliation remembered only which VPCs kept a network from a
previous run, and deleting such a VPC then removed the name this version
computes, floci-aws-vpc-.... A network created before the floci-aws-
prefix is named floci-vpc-...; removing the computed name found nothing,
the NotFound was ignored, and the old bridge kept holding the CIDR.
Reconciliation now records each surviving network's own name and the
deletion removes that one, along with the computed one if this run
materialised it.
* test(ec2): cover deleting a VPC this run materialised after a restart
A VPC an instance started in after the restart has both the network this
run created and the one its predecessor left. Deleting it removes both
when the predecessor's carries a legacy name, and removes one network
once when this run reused the predecessor's.
* fix(ec2): remember every surviving network of a VPC after a restart
Startup reconciliation kept one network name per VPC, so when both the
legacy-named and the current-named bridge survived, deleting the VPC
before this run materialised it left one behind with its CIDR reserved.
DescribeAlarms read only AlarmNames, AlarmNamePrefix and AlarmTypes. It
ignored StateValue, ActionPrefix, ChildrenOfAlarmName and
ParentsOfAlarmName, so each of them answered every alarm of the
requested types, and combining them was never refused.
StateValue and ActionPrefix now narrow metric and composite alarms
alike. ActionPrefix matches an alarm, OK or insufficient-data action,
since the API reference calls it a prefix for any action.
ChildrenOfAlarmName lists the alarms a composite alarm's rule names, by
name or ARN, and ParentsOfAlarmName the composite alarms whose rules
name an alarm. Neither lists the alarm it names, and both return only
the members the API reference lists: name, ARN, StateValue and
StateUpdatedTimestamp for children, name and ARN for parents.
As the API reference says, either one combined with any member except
MaxRecords and NextToken is refused with ValidationError. A StateValue
outside the enum and an empty or over-long ActionPrefix or alarm name
are refused with Smithy's validation messages, reported together with
an invalid AlarmTypes. Both handlers pass the request's filters to the
service as one AlarmFilter, so Query, JSON and CBOR answer alike, and a
JSON null member counts as left out, AlarmNamePrefix included, which
read as the prefix "null" before.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>