mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 06:00:46 -05:00
4aaa5cc466a7ff06fe1642c91c8dccbef2b01712
131
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
361b3177b8 | docs(ses): correct the SES and SES v2 operation counts in the service matrix (#6922) | ||
|
|
fee688bd05 | feat(cloudformation): support four AWS::AppConfig resource types (#6791) | ||
|
|
c4ae11c414 | feat(cloudformation): expose RegionalEndpoints of a web function endpoint to Fn::GetAtt (#6907) | ||
|
|
d3c4732b31 |
feat(cloudformation): provision Redshift event subscriptions (#6664)
* feat(redshift): support event history and SNS notifications * fix(redshift): guard stale delivery failures and prune all event scopes * feat(cloudformation): provision Redshift event subscriptions * fix(redshift): scope snapshot events and serialize subscription tag mutations * feat(cloudformation): provision Redshift event subscriptions * fix(cloudformation): resolve Redshift subscription list parameters Use the shared list reader for SourceIds and EventCategories. Cover CommaDelimitedList and List<String> parameters through the AWS SDK and verify concurrent tag requests preserve CloudFormation tag updates. * fix(redshift): honor event disablement and restore rollback attributes Check the EventBridge external service key before publishing API events. Snapshot and restore CloudFormation resource attributes alongside subscription state during in-place rollback. * fix(redshift): drop API event publisher and share subscription setup Remove RedshiftApiEventPublisher, its handler hook, tests and docs, which are not part of the CloudFormation resource and emit CloudTrail-style events without a trail. Route createSubscription and replaceSubscription through one helper that normalizes the subscription fields. |
||
|
|
3d30bbcf7a |
feat(redshift): add event subscriptions with SNS delivery (#6705)
* feat(redshift): add event subscriptions with SNS delivery Add Create, Modify, Delete and DescribeEventSubscriptions, subscription tagging, and publication of matching events to the subscription's SNS topic, honouring the topic policy. * fix(redshift): deliver events from a consistent subscription snapshot and reject nameless subscription ARNs Delivery copied no state under the lock modifySubscription holds, so a concurrent update could change the topic between matching and publishing. Match and publish from a snapshot taken under that lock. A tag ARN ending in eventsubscription: passed an empty name to describeSubscriptions, which lists all subscriptions. Reject it up front. |
||
|
|
e8ef0b147e |
chore(ci): name the Java package in one place for tools and CI (#6596)
The docs tools, the partition gate and their registries each spelled out src/main/java/io/github/hectorvent/floci/. tools/java_sources.py now holds the package path, the tools import it, and services.yaml and service_matrix.yaml list sources relative to the package root, so the move to io.floci.aws changes one line here. A registry entry still in the repo-relative form fails with a message naming the new form. prefetch-images.sh finds TestImages.java by name. Signed-off-by: Hector Ventura <hectorvent@gmail.com> |
||
|
|
f3f8b42200 |
feat(cloudformation): support AWS::Route53::RecordSetGroup (#6676)
A RecordSetGroup writes all its record sets into one hosted zone in a single ChangeResourceRecordSets batch, so a record set that cannot be written, such as a name another owner already holds, leaves the zone unchanged and fails the stack. Each record set keeps what a RecordSet keeps, including the routing-policy fields SetIdentifier, Weight, Region, Failover and HealthCheckId; entries an Fn::If resolves to AWS::NoValue are dropped, and two record sets with one name, type and set identifier are refused. Ref returns the group's logical ID and Fn::GetAtt Id the change ID that GetChange reads, as AWS documents. The zone comes from the group's HostedZoneId or HostedZoneName, or from its record sets when the group names neither. A record set that repeats the group's HostedZoneId is refused, as AWS documents, and so is one that names another zone. An update in the same zone deletes the records the group wrote and creates the new ones in one batch. HostedZoneId and HostedZoneName are create-only, so a change set reports a zone change as a replacement: the records are written into the new zone, and the old ones are deleted once the update commits, or kept under UpdateReplacePolicy: Retain. A failed update puts back the records the group had; after a zone change the group first points at its old records again, then deletes the new zone's. If that delete fails, ContinueUpdateRollback retries it and DeleteStack deletes those records while the rollback is unfinished; anything else leaves them in their zone, since Route 53 cannot tell them apart from an identical record another writer puts there later. Deletes name the values the group wrote, so a record changed outside the stack fails the delete rather than being removed. The docs say what a record set group's failed rollback leaves behind. Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com> |
||
|
|
2a5f734777 | feat: support managed credentials in Redshift restore (#6515) | ||
|
|
6acd90640d |
feat(cloudformation): provision AWS::EC2::PrefixList (#6481)
* feat(cloudformation): provision AWS::EC2::PrefixList An AWS::EC2::PrefixList was stubbed: Ref returned "<LogicalId>-<8 hex>", Fn::GetAtt the literal "<LogicalId>.<Attribute>", and EC2 held no list, so a route given its Ref pointed at nothing. Ec2NetworkCfnProvisioner now creates the customer-managed list through Ec2Service. Ref is its pl- id, and Fn::GetAtt serves PrefixListId, Arn, OwnerId and Version, the attributes the registry schema declares. The schema has no create-only property, and create-only-properties.json now says so. Without the entry, the engine's name heuristic took PrefixListName for create-only, so a rename was planned as a replacement of the list and of the routes and rules that reference it. An update changes the list in place: its name, capacity, entries and tags. Adding or removing entries makes a new version and a rename does not, as the EC2 API reference says. EC2 refuses a request that removes and adds the same CIDR, which is how a description changes (Terraform's aws_ec2_managed_prefix_list records the error), so such an entry is added back by a second ModifyManagedPrefixList call. The first call carries everything EC2 could refuse, and the capacity the second needs is checked before the first, so a change EC2 refuses leaves the list as it was. A rollback puts the prior name, capacity, entries and tags back, and Version follows the list. Two updates fail before anything changes: another AddressFamily, which no EC2 call can change on an existing list, and a new MaxEntries together with changed Entries, which the CloudFormation and EC2 references both say cannot change at once. MaxEntries is required to create a list, as the CloudFormation reference says (aws/aws-cdk#35360 reports the deploy failing without it); an update that leaves it out keeps the capacity. Entries and Tags are brought to the template when it, or the previous one, declares them, so entries or tags no template declared stay. Tags go through CreateTags after the create, as on the other types in the provisioner, so EC2 checks them; a tag it refuses fails the create and removes the new list. A list gone out of band, or a stub an older Floci left, is replaced by a new one, and a stack delete tolerates only InvalidPrefixListID.NotFound. Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com> * test(cloudformation): cover AWS::EC2::PrefixList through boto3 A stack's prefix list is created, resized, given new entries and deleted through the CloudFormation and EC2 clients of the pinned boto3: Ref and Fn::GetAtt name the list EC2 describes, a resize keeps the version, new entries make version 2 of the same list, dropping Tags removes them, and the list is gone after the stack delete. Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com> * refactor(cloudformation): share optionalInt through ProvisionContext Ec2NetworkCfnProvisioner and ElbV2CfnProvisioner each carried the same private optionalInt. An absent, null or AWS::NoValue property stays unset; a value written into the template, a literal blank included, has to be an integer; anything else fails with ValidationError "Value of property <name> must be an integer." It is now ProvisionContext.resolveOptionalInt, beside resolveOptional, and all seven callers use it: the prefix list's MaxEntries, the target group's Port and four health check settings, and the gateway listener's Port. The two copies differed only in Integer.parseInt against Integer.valueOf and in building the error through a helper, so neither provisioner changes behaviour. ProvisionContextTest covers the method directly. Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com> --------- Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com> |
||
|
|
922e36a472 | feat(cloudwatch): support composite alarm lifecycle (#6408) | ||
|
|
deeb3b3075 |
fix(cloudformation): forward Firehose processing and logging configuration (#6277)
* feat(firehose): store and echo CloudWatchLoggingOptions on S3 destinations
CreateDeliveryStream and UpdateDestination silently dropped CloudWatchLoggingOptions because the S3 destination model had no such member. The block is now stored and echoed on both ExtendedS3DestinationDescription and S3DestinationDescription, defaulting to {"Enabled": false} when omitted, as real AWS does. UpdateDestination merges it member-wise, so an update naming only Enabled keeps the stored log group and stream.
* fix(cloudformation): forward Firehose processing and logging configuration
FirehoseCfnProvisioner now reads RoleARN, ErrorOutputPrefix, CloudWatchLoggingOptions and, for the extended S3 destination only, ProcessingConfiguration, resolving intrinsics before handing them to the service. A Lambda transform declared in a template therefore runs on delivery and is echoed by DescribeDeliveryStream, as on AWS. An omitted member stays null so an UpdateStack keeps the stored value, and an unreadable block fails the resource with ValidationError.
* test(cloudformation): cover a stack Firehose stream's Lambda transform end to end
A stack-created extended S3 stream now reads back its role, error prefix, logging options and
Lambda processor, runs that processor on delivery, and picks up a new function on UpdateStack.
* docs(firehose): describe logging options and the CloudFormation members applied
Document how CloudWatchLoggingOptions is stored, defaulted and merged on the S3 destinations, and note which DeliveryStream properties the CloudFormation provisioner applies.
* fix(cloudformation): validate a Firehose stream's forwarded destination like CreateDeliveryStream
The provisioner now runs the same wire-shape validation CreateDeliveryStream applies, so a bad processor or CompressionFormat fails the resource instead of being stored. A structured destination member present as anything but an object also fails rather than being silently dropped.
* docs(cloudformation): name every Firehose property the provisioner applies
* fix(firehose): validate CloudWatchLoggingOptions names against AWS constraints
LogGroupName and LogStreamName are now checked against AWS's 512-character bound and their modeled patterns, reporting both rules when both fail, as probed against real AWS.
* chore: retrigger CI after a transient npm publish race
native arm64 / sdk-test-node ran npm install between the publication of @aws-sdk/lib-storage 3.1156.0 and @aws-sdk/client-s3 3.1156.0, and failed with ERESOLVE.
* test(firehose): share the delivery and Lambda transform helpers in FirehoseRequests
Moves encode, putRecordBatch, firstKey and the record-id driven Lambda transform answer out of CloudFormationFirehoseIntegrationTest and FirehoseLambdaTransformIntegrationTest into one testing fixture both now use.
* fix(firehose): require both log names when CloudWatch logging is enabled
With Enabled true, a missing or empty LogGroupName or LogStreamName is now refused with AWS's InvalidArgumentException, group before stream, on the merged result for UpdateDestination and ahead of the other semantic checks, as probed against real AWS.
* fix(firehose): fill the defaults on a Redshift destination's S3 backup
Create and describe now apply the S3 defaults, including CloudWatchLoggingOptions Enabled false, to a Redshift destination's backup configuration as well as its intermediate one, so persisted streams heal on read.
|
||
|
|
5beb8d47b9 |
fix(cloudformation): keep Route 53 routing policies and provision health checks (#6191)
A Route 53 RecordSet resource now writes Region, Failover, Weight and HealthCheckId into the record, as ChangeResourceRecordSets stores them. A HealthCheck resource creates a health check with its tags, and its Ref and HealthCheckId attribute return the check's id. An unknown Type is refused before any check is created. Changing Type, RequestInterval or MeasureLatency replaces the check, and the old one is deleted once the update commits, or kept under UpdateReplacePolicy: Retain. Any other change updates the check in place, and a failed stack update puts back its earlier settings and tags. |
||
|
|
95bf6df474 |
feat(dsql): add Aurora DSQL's control plane and AWS::DSQL::Cluster (#6048)
* feat(dsql): add Aurora DSQL's control plane and AWS::DSQL::Cluster The first half of #6014. Aurora DSQL's REST JSON control plane, with the answers measured on AWS (eu-west-1): CreateCluster, GetCluster, ListClusters, UpdateCluster, DeleteCluster, GetVpcEndpointServiceName, the cluster policy calls and tagging on cluster ARNs. Identifiers are 26 characters of lowercase base32 as DSQL's are, and malformed or unknown ones are refused with DSQL's messages; a cluster created without deletionProtectionEnabled is protected, and deleting a protected one is refused. CreateCluster answers CREATING and the cluster is ACTIVE right after. AWS::DSQL::Cluster waits for ACTIVE, returns the identifier from Ref and Identifier, ResourceArn, Status, CreationTime, Endpoint, VpcEndpoint and VpcEndpointServiceName through Fn::GetAtt, and a protected cluster makes the stack's deletion fail, as on AWS. A cluster has no database behind it here: its endpoint is named as on AWS, <id>.dsql.<region>.localhost.floci.io, but not served. Serving it is the second half of #6014, its own pull request. * fix(dsql): answer the control plane's edge cases as DSQL does Review of #6048, each answer measured on DSQL (eu-west-1) first: - ListClusters carries on from a page token whose cluster was deleted in between, as AWS does: the token now holds the sort position of the next page's first cluster rather than its identifier. - deletionProtectionEnabled is read as DSQL reads it: text is false when it spells false in any case and true otherwise; empty text, a number, an object and a list fail with SerializationException. - The tag calls refuse another account's cluster ARN with 403 AccessDeniedException instead of reading it in the caller's account. - A client token reused with other parameters answers 409 ConflictException; with the same ones, the earlier cluster. - AWS_OWNED_KMS_KEY names AWS's own key on create and update. AWS::DSQL::Cluster reads DeletionProtectionEnabled and PolicyDocument with AWS::NoValue as left out, and an update that drops the multi-Region properties clears them, as it already reset the key and deletion protection. ListTagsForResource copies the tags under the cluster's lock, and a cluster's lock goes with the cluster. * fix(dsql): answer errors, policies, updates and multi-Region clusters as DSQL does A review asked for the attribute coverage, the reason ValidationException carries, a real untag assertion and tests of the stack-update path. Measuring them on DSQL (eu-west-1, 2026-10-20) found more that did not match, fixed here too. - Attributes are written with resource.getAttributes().put, which the schema coverage test reads; EncryptionDetails, an object an output refuses on AWS, is recorded as a gap. - DSQL leaves reason out of its model-validation errors. Only the page token's refusal carries it, with fieldList naming next-token and its own text. maxResults no longer quotes the value. - Tag calls answer what DSQL answers: 403 for an ARN that is not a cluster ARN, 400 BadRequestException for another Region's, 404 NotFoundException for no cluster. The 403s name the caller. - Policy versions are epoch milliseconds, DeleteClusterPolicy answers the deleted version, and the missing-policy and stale-version errors carry DSQL's texts and resourceType. - Policies are checked and kept as DSQL does: its three refusal texts, a service principal, a principal that names no one, a public grant, and the lockout check when both policy actions are denied to the caller, unless bypassPolicyLockoutSafetyCheck. The kept form is Jackson's pretty printer in DSQL's element order, with condition operators and keys in HashMap order, as measured. - The public check shares its condition keys with Lambda web functions through PublicAccessConditions, and S3 now takes its fixed-value and SourceIp range tests from there. Sharing the whole rule was tried and dropped: DSQL was measured to treat some operators otherwise than LambdaWeb's and S3's rules do (ForAnyValue:, ArnLike "*", StringEquals "*"), so the operator rules stay per service. The lockout check is IamPolicyEvaluator's. - A multi-Region cluster is PENDING_SETUP and lists itself until it and each peer name one another, then ACTIVE; its deletion answers PENDING_DELETE. - AWS::DSQL::Cluster reads its properties through CfnPropertyTypes, so a PolicyDocument object or DeletionProtectionEnabled "yes" fails as on AWS, where Boolean.valueOf made "yes" false. An update leaves a property the template no longer sets as it was, deletion protection, KMS key and multi-Region alike, and removes only the tags and the policy; an earlier change put them back to their defaults, which was not measured and is not what CloudFormation does. A policy the template does not change keeps its version, and create settles on PENDING_SETUP too. DsqlServiceTest, DsqlClusterPoliciesTest and DsqlCfnProvisionerTest cover these in isolation, the integration tests over the wire. * fix(dsql): keep the public access rule to DSQL and forget a deleted policy's version A review asked to leave S3 and Lambda web functions out of this change, and pointed at DSQL's own block public access page. The shared helper is dropped and S3 and Lambda web functions are as on main; folding their copies into one helper belongs to a separate change. DSQL now has its own keys: the trusted ones its page lists, and aws:SourceIp, aws:SourceVpcArn and the three aws:Vpce* keys, which the page leaves out but DSQL accepts (measured, eu-west-1, 2026-10-20). As the page says, a policy variable never restricts: StringEquals with ${aws:PrincipalArn}, ${aws:SourceVpc} or a role/${aws:username} ARN is public on DSQL. ArnEquals reads like ArnLike, as IAM matches both the same way, so a value that is no ARN, ${aws:SourceArn} among them, matches nothing and restricts, as measured. DeleteClusterPolicy left the deleted version on the cluster, so a put naming it went through; it is now cleared, and a put that names a version on a cluster with no policy is refused as not found. |
||
|
|
be2cb677d0 |
feat(resourcegroups): support EC2 capacity reservation pools (#6011)
Signed-off-by: Andre Kurait <akurait@amazon.com> |
||
|
|
5774e7db8d |
feat(cloudformation): support S3 Vectors resources (#5853)
* feat(cloudformation): support S3 Vectors resources * fix(cloudformation): validate S3 Vectors encryption settings * fix(cloudformation): align S3 Vectors provisioning contracts * fix(cloudformation): restore S3 Vectors properties on rollback |
||
|
|
e06013e1fe |
docs: keep grouped service action counts in sync (#5991)
* docs: keep grouped service action counts in sync * docs: guard service action source coverage * docs: require counts for generated action tables * docs: correct on-premises instance tag descriptions |
||
|
|
0492fc9842 |
feat(lambdaweb): CloudFormation types for Lambda Web Functions (#5722)
* feat(lambdaweb): CloudFormation types for Lambda Web Functions AWS::Lambda::WebFunction, AWS::Lambda::WebFunctionRevision and AWS::Lambda::WebFunctionEndpoint provision through the resource registry. Ref of each is its ARN. Every property of a revision is createOnly in the registry schema, so a changed revision mints a new one and the displaced revision is deleted once the update commits. An endpoint keeps its identity while its function, name, type and regions stay the same. Fn::GetAtt on RegionalEndpoints is recorded as a gap. Part of #5699 * fix(lambdaweb): compare a revision against the function's default log group revisionMatches filled a request without a log group with the existing revision's log group, so a template that dropped a custom log group kept the old revision. The default is the function's log group, as when a revision is created. replaceTags returns the updated function. * fix(cloudformation): put a Lambda Web function or endpoint back after a failed stack update A function's tags and an endpoint's mutable configuration are changed in place on update. The provisioner now snapshots them before the change and restores them from rollbackUpdate, as the other in-place provisioners do. The function attributes after a tag update come from the updated function, so UpdatedAt moves with the tag change. * test(cloudformation): roll a Lambda Web stack update back after a failed revision A revision that fails to create after the endpoint moved to a replaced revision rolls the stack back. The endpoint returns to the kept revision and the replacement is deleted. The doc page says that a CloudFormation endpoint is always Disabled with RevisionWeights, since the schema has no AutoDeploymentMode, and that a failed update puts in-place changes back. * fix(cloudformation): refuse AutoDeploymentMode on a Lambda Web endpoint The registry schema has no AutoDeploymentMode property and AWS fails a template that sets it at validation. An endpoint from CloudFormation is always Disabled and routes by RevisionWeights. Floci passed the property through to the service, which accepted LatestRevision. * refactor(lambdaweb): share the create and tag steps between the API and CloudFormation paths createFunction and createFunctionShell both check the name and refuse a duplicate under the function's lock. tagResource and replaceTags both check the tags, lock, write, stamp and persist. Each pair now calls one private helper, so the two paths cannot drift. |
||
|
|
1e423420ed |
fix(ec2): resolve a NAT gateway's network interface and mark its Elastic IP associated (#5622)
* fix(ec2): resolve a NAT gateway's network interface and mark its Elastic IP associated CreateNatGateway gave each gateway address a networkInterfaceId of "eni-" + randomHex(17), but nothing else knew about that interface: DescribeNetworkInterfaces had no NAT arm, so the id DescribeNatGateways publishes (aws_nat_gateway.network_interface_id) answered InvalidNetworkInterfaceID.NotFound. The Elastic IP the gateway took was also never marked associated, so DescribeAddresses showed a held allocation as free. The interface id is now derived from the gateway id, as endpoint ENIs are, and DescribeNetworkInterfaces reports one requester-managed nat_gateway interface per gateway address, built from the stored address so the two reads cannot disagree. CreateNatGateway records the association, interface and private address on the allocation (no instanceId), and DeleteNatGateway clears them if the association is still the gateway's. * fix(ec2): refuse a NAT gateway on an occupied Elastic IP, keep its association, scope its ENI lookup to the account CreateNatGateway rejects an allocation already held by an instance or another gateway (Resource.AlreadyAssociated) under the lock that writes the association. DisassociateAddress rejects an association owned by a NAT gateway. The NAT arm of DescribeNetworkInterfaces reads gateways and subnets for the account asked about. * fix(ec2): lock NAT gateway EIP release, treat a legacy gateway's EIP as held DeleteNatGateway releases the Elastic IP under the lock CreateNatGateway takes. CreateNatGateway also refuses an allocation any live gateway references, covering gateways persisted before Address records were marked. The CloudFormation networking test gives the replacement NAT gateway a new EIP: replacement creates before it deletes, and AWS's CreateNatGateway refuses an EIP still associated elsewhere. * fix(ec2): AssociateAddress refuses a NAT gateway's Elastic IP; legacy gateways hold theirs AssociateAddress checks for a gateway holding the allocation and writes under the allocation lock CreateNatGateway and DeleteNatGateway take, so an instance cannot take over an address the gateway still claims. The gateway scan behind that check, and CreateNatGateway's, now includes unmigrated pre-account-isolation gateway records for the default account, never another account's. * fix(ec2): scope NAT gateway ownership checks to the caller's records callerNatGateways scanned every account's gateways before filtering. Read the caller's own records, plus unprefixed legacy records only for the default account. * fix(ec2): create a NAT gateway failed on an Elastic IP already in use CreateNatGateway with an allocation another gateway or an instance holds no longer answers 400. As the NatGateway shape documents, the gateway is created in state failed with FailureCode Resource.AlreadyAssociated and FailureMessage "Elastic IP address <alloc> is already associated". It gets no interface, claims nothing, and does not count as a holder. AWS::EC2::NatGateway fails the resource and deletes the failed gateway. ReleaseAddress on an allocation a NAT gateway holds, legacy gateways included, answers InvalidIPAddress.InUse. DisassociateAddress and ReleaseAddress run under privateIpAllocationLock. The NAT interface lookup reads legacy unprefixed gateways and subnets for the default account. It also loads the interface's tags, and DeleteNatGateway deletes them. endpointEniId and natEniId become one helper, eniIdFromSeed. * test(cloudformation): say why the replacement template keeps NatEip The replacement template keeps NatEip for two reasons. On AWS a gateway given an Elastic IP the displaced gateway still holds is created failed. And Floci update cleanup deletes removed resources before the old copies of replaced ones, so dropping the EIP while replacing its gateway would try to release it while it is still held. * fix(ec2): a failed NAT gateway does not pin its subnet or VPC #5503 made DeleteSubnet and DeleteVpc refuse while a NAT gateway that is not deleted sits in the subnet. A failed gateway was never created and holds no interface, so it no longer counts, matching the Elastic IP holder check. |
||
|
|
d3fce14256 |
feat(redshift-serverless): add release track, managed workgroup and reservation reads (#5691)
* feat(redshift-serverless): add release track, managed workgroup and reservation reads Add GetTrack, ListTracks, ListManagedWorkgroups, ListReservations, ListReservationOfferings, GetReservation, GetReservationOffering and CreateReservation so SDK, CLI and IaC clients no longer get an unknown operation error. Floci models no zero-ETL managed workgroups and sells no reservations, so the lists are empty and the reservation lookups answer ResourceNotFoundException. The two release tracks are current and trailing. Required members, patterns and lengths come from the AWS model through RedshiftServerlessRequestShapes; only the track names, which the model leaves unenumerated, are checked by hand. * refactor(redshift-serverless): reuse Pagination.paginate and remove unused admin handle method Rely on Pagination.paginate for maxResults and nextToken validation in listTracks and listWithoutItems, matching the other Redshift Serverless lists. Remove the unused handle method and its duplicate unknown-operation response in RedshiftServerlessAdminJsonHandler. |
||
|
|
fa682b2d62 |
fix(cloudformation): clean up, roll back and delete AWS::EC2::VPC like the other EC2 types (#5503)
* fix(cloudformation): clean up, roll back and delete AWS::EC2::VPC like the other EC2 types A CidrBlock change, or a tenancy change other than dedicated to default, replaces the VPC, but the provisioner never recorded the displaced one and had no delete arm, so the old VPC was left behind; in-place Tags, EnableDnsSupport and EnableDnsHostnames changes were not snapshotted, so a later failing resource left the VPC changed and reported rollback as not implemented. Ec2VpcCfnProvisioner now follows Ec2NetworkCfnProvisioner: ReplacementCleanup records the displaced VPC and deletes it after the update commits or restores it on rollback; a prior-state snapshot restores DNS attributes, tags and a dedicated-to-default tenancy change on rollback, eagerly when provision itself fails; and a delete arm through CfnDeletes.safeDelete removes the VPC on stack teardown, tolerating only InvalidVpcID.NotFound so stack-external dependents fail the delete with DependencyViolation, as on AWS. * refactor(cloudformation): use the shared CfnRollback.guarded in the VPC provisioner * fix(ec2): count instances and NAT gateways as subnet and VPC dependents DeleteSubnet and DeleteVpc checked subnets, security groups, route tables, ACLs, gateways and endpoints but not the instances and NAT gateways living in a subnet, so a stack teardown could remove a subnet and its VPC out from under an instance launched into it out of band. Both now fail with DependencyViolation while an instance that is not terminated (shutting-down still holds its interface) or a NAT gateway that is not deleted sits in the subnet, as on AWS. The rollback integration test also pins Boom after the VPC with DependsOn so the scenario cannot pass by ordering alone. * fix(cloudformation): keep the VPC and subnet rollback snapshot until the restore succeeds rollbackUpdate removed the in-place snapshot before restoring; a restore that threw left the resource persisted as UPDATE_FAILED with no prior state for a ContinueUpdateRollback retry. Ec2VpcCfnProvisioner and the pre-existing Ec2NetworkCfnProvisioner now restore first and remove after, as the AgentCore provisioner already did. The describeTags loop shared by Ec2Tags.reconcile and the VPC snapshot moves to Ec2Tags.current. * fix(ec2): count standalone network interfaces and interface endpoints as subnet dependents A subnet is pinned by any network interface in it, not only the ones an instance or NAT gateway owns: a standalone interface from CreateNetworkInterface and an interface or Gateway Load Balancer endpoint keep DeleteSubnet at DependencyViolation on AWS too. The endpoint test that deleted a subnet out from under a live endpoint relied on that state being reachable; it now asserts the refusal and that the published interface ids are unchanged. * fix(cloudformation): wait for terminated on instance delete and resolve VPC properties before creating With real containers an instance is still shutting-down when the stack's instance delete returns, so the subnet delete that follows was refused by the new resident check and the stack ended DELETE_FAILED. The instance provisioner now polls until the instance is terminated or gone, as CloudFormation does. The VPC provisioner created the VPC before EnableDnsSupport, EnableDnsHostnames and Tags were resolved, so a resolution failure left it untracked; the resolves now run first, as the subnet provisioner does. Ec2Tags.current drops reserved aws: keys so a rollback snapshot never tries to write one, and the replacement integration test waits in the stack's own region. |
||
|
|
7f8383db38 |
feat(cloudformation): provision SES email identities (#4812)
* feat(cloudformation): provision SES email identities * fix(cloudformation): retry pending SES update rollback * fix(cloudformation): keep recovered SES resource complete * fix(cloudformation): retain recovered SES state on failed replacement * test(cloudformation): use shared waiter for SES DKIM verification |
||
|
|
6f78083080 |
feat(lambdaweb): Lambda Web Functions control plane (#5706)
* feat(lambdaweb): Lambda Web Functions control plane The lambda-web service model (apiVersion 2025-03-07) signs as lambda, so it is served under the lambda service at /2025-03-07/... with the AWS wire shapes, state words and error wording of the 20 operations on web functions, revisions, endpoints, tags and the resource policy. Revisions and endpoints converge at once. They are stored Active and an endpoint update is stored Successful, while the create and update responses report the transitional state AWS reports, so a CLI waiter settles on its first poll. Code comes from an S3 object that must exist. IamAuth, the resource policy and the endpoint domain are stored but not served yet. Part of #5699 * fix(lambdaweb): carry the page position in the token The nextToken of a list operation was a UUID keyed into an in-memory anchor map that only grew and was not scoped to the account. The token is now a core Pagination cursor that encodes the request (operation, region, account, function, filters and page size) and the cursor of the item the page ended on. A token reused with other parameters gets the AWS "does not match the request" error and any other token the AWS "invalid or has expired" error. AWS issues UUID tokens and rejects any other shape, so Floci no longer reproduces the pattern error for a malformed token. * fix(iam): resolve a Lambda Web revision or endpoint named by its ARN The route resource for IAM enforcement took the path segment after revisions or endpoints as the id. A revision or endpoint ARN in that position carries slashes, so the resource ARN ended in the ARN's first segment and a policy scoped to the revision or endpoint did not apply. The id is now the last segment of such an ARN. * fix(lambdaweb): add the values of a repeated state filter AWS lists a function when any state filter in the request names its state. A later state filter replaced the earlier one, so a request with state=Active followed by state=Failed listed nothing. * fix(lambdaweb): refuse empty arrays in a resource policy AWS answers an empty Action or Resource array with the policy syntax error and an empty principal array with the invalid principal error, which wins when all three are empty. Floci stored such a policy. * fix(lambdaweb): judge a wildcard principal by the operator and value of its condition A trusted condition key alone kept an Allow for every principal out of the public check. AWS blocks the policy unless a positive operator pins the key: StringNotEquals and the IfExists forms do not count, nor does a wildcard in an account value or in the account field of an ARN value, while a wildcard elsewhere in an ARN and a literal * under StringEquals do. |
||
|
|
a5228a0bf7 |
fix(cloudformation): apply TimeToLiveSpecification on DynamoDB tables (#4951)
* feat(dynamodb): add typed time-to-live operations to the table access DynamoDbTableAccess gains timeToLive and updateTimeToLive next to the stream operations. The native engine reads the TTL flag and attribute from the table definition and calls DynamoDbService.updateTimeToLive under the scope's account; the Local engine sends DescribeTimeToLive and UpdateTimeToLive. * fix(cloudformation): apply TimeToLiveSpecification on DynamoDB tables An AWS::DynamoDB::Table declaring TimeToLiveSpecification reached CREATE_COMPLETE while DescribeTimeToLive answered DISABLED, because the provisioner never read the property. The provisioner now reconciles TTL against what the table reports, so UpdateTimeToLive is called only when the setting differs: enabled turns it on, Enabled false or a block removed on an update turns it off with the current attribute name, and renaming an enabled attribute fails with the DynamoDB ValidationException before anything changes. Enabled with no AttributeName fails with ValidationError before the table is created. An in-place table update now records the tags, stream and TTL setting it replaces, and rollbackUpdate puts all three back, so a stack whose update fails on a later resource ends UPDATE_ROLLBACK_COMPLETE instead of UPDATE_ROLLBACK_FAILED. A restore that throws keeps the snapshot. * fix(cloudformation): roll back and clean up failed DynamoDB table provisions A table's in-place update that failed after its snapshot, for example on UpdateTimeToLive after the tags and the stream had changed, lost the snapshot: the engine put the previous resource back and reported UPDATE_ROLLBACK_COMPLETE with the changes still live. The provisioner now retains a failed attempt that carries its snapshot, so the engine hands it to rollbackUpdate. A failure before the snapshot changed nothing and still uses the engine's restore. A provision that failed after createTable left the new table behind, on create and on a replacing update alike. The provisioner now deletes a table this attempt created, tolerating ResourceNotFoundException, and never one it adopted or updates in place. A delete that fails is logged and leaves the physical id and the rollback ownership marker, so the stack's create rollback retries it. A table recreated because the update target was gone takes no snapshot, since it has no prior state. * fix(cloudformation): match the AWS status reasons for invalid TimeToLiveSpecification Renaming an enabled TTL attribute and enabling TTL without an AttributeName now fail with the handler message AWS CloudFormation reports, as measured in eu-west-1, and with its InvalidRequest handler error code. The resource status reason is the AWS inner text exactly; the type and logical id prefix are gone, since AWS does not include them. * fix(cloudformation): scope DynamoDB table TTL to the stack and validate Enabled - An update leaves TTL alone when neither the template nor the previous one declared TimeToLiveSpecification, so TTL enabled outside the stack survives, as on AWS. - A TimeToLiveSpecification without Enabled, or with a non-Boolean one, fails model validation before the table is created. - A replacing update whose created table cannot be deleted reports a rollback failure naming the table instead of leaving it untracked. |
||
|
|
daef71ca76 |
feat(guardduty): add Malware Protection plans and AWS::GuardDuty::MalwareProtectionPlan (#5373)
* feat(guardduty): add Malware Protection plans and AWS::GuardDuty::MalwareProtectionPlan Adds CreateMalwareProtectionPlan, GetMalwareProtectionPlan, UpdateMalwareProtectionPlan, DeleteMalwareProtectionPlan and ListMalwareProtectionPlans, and routes plan ARNs through the shared tag operations. Adds a CloudFormation provisioner for AWS::GuardDuty::MalwareProtectionPlan. Ref and Fn::GetAtt MalwareProtectionPlanId return the plan id, and Arn, CreatedAt, Status and StatusReasons are set. Role, object prefixes, the tagging action and tags update in place; a different BucketName is rejected because the update API cannot change the bucket. Management plane only: no scan runs, so a plan stays ACTIVE. Closes #4657 * fix(guardduty): address review findings on Malware Protection plans - Apply a plan update all-or-nothing: validate every supplied field before storing any, so a rejected request no longer changes the role. - Page ListMalwareProtectionPlans by the last returned id instead of an offset, so deleting a plan between pages neither fails nor skips, and use the documented default page size of 100. - Restore a plan on a failed CloudFormation stack update from a snapshot taken before the first change, and delete a plan an update created in place of one deleted out of band. - Clear ObjectPrefixes and Actions on a stack update that drops them. - Apply the creation tag rules to the shared tag routes. - Require the role to be an IAM role ARN. - Use explicit types instead of var. * style(guardduty): import ArrayList instead of fully qualified name * test(cloudformation): wire GuardDuty into CfnProvisionerFixture CfnProvisionerFixtureTest requires every provisioner to be reachable through a public Builder setter. Add a guardDuty(...) setter that registers GuardDutyMalwareProtectionPlanCfnProvisioner. * fix(guardduty): address second review round on Malware Protection plans - Rolling back a stack update that recreated a plan deleted out of band now restores the prior plan's Arn, CreatedAt, Status and StatusReasons, not only its id, so Fn::GetAtt no longer names the deleted replacement. The out-of-band test now changes the plan's properties: unchanged resources are skipped on update, so it never reached the create before. - Plan tag keys are checked against GuardDuty's documented TagKey pattern (^(?!aws:)[a-zA-Z+-=._:/]+$) on creation and on TagResource. - The tag routes require the supplied ARN to equal the stored plan's ARN, so a matching plan id under another account, service or partition is ResourceNotFoundException. - The /malware-protection-plan routes move behind a @PreMatching filter that rewrites only guardduty-signed requests to /_guardduty, as DlmRouteFilter does, so path-style S3 requests for a bucket of that name reach S3. * style(guardduty): import Instant and List, drop em-dash, document the plan route Review on #5373: GuardDutyController used an inline java.time.Instant and its Javadoc carried an em-dash, which AGENTS.md rules out. The Javadoc's routing paragraph now names /malware-protection-plan next to /detector and /admin and says GuardDutyRouteFilter keeps a same-named S3 bucket reachable. The CloudFormation and plan integration tests import List and nullValue instead of spelling them out. * refactor(core): share signed-service route rewriting across DLM, GuardDuty and Resource Explorer 2 DlmRouteFilter, GuardDutyRouteFilter and ResourceExplorer2PathRewriteFilter each repeated the same path test, credential-scope check and rewrite. They now delegate to SignedServiceRoute in core.common. The helper also reads the signing service from the X-Amz-Credential query parameter when there is no Authorization header, as ServiceEnabledFilter does (which now uses the same lookup), so a query-signed plan request reaches GuardDuty instead of S3. A request sent straight to an internal prefix that is not signed for the service is refused as S3 refuses that bucket name, rather than reaching the service's routes. Resource Explorer 2's prefix moves from /re2 to /_re2, since re2 is a valid bucket name. |
||
|
|
63b48342d6 |
feat(redshift): add snapshot copy and snapshot schedule operations (#5574)
* feat(redshift): add snapshot copy and snapshot schedule operations Terraform's aws_redshift_snapshot_copy, aws_redshift_snapshot_schedule and aws_redshift_snapshot_schedule_association failed with InvalidAction because the Query handler had no arms for these actions. - EnableSnapshotCopy / DisableSnapshotCopy / ModifySnapshotCopyRetentionPeriod store the copy settings on the cluster, and DescribeClusters reports ClusterSnapshotCopyStatus while copy is enabled. RetentionPeriod defaults to 7 and ManualSnapshotRetentionPeriod to -1. Faults follow the Redshift model: SnapshotCopyAlreadyEnabledFault, SnapshotCopyAlreadyDisabledFault, SnapshotCopyDisabledFault (modify), InvalidRetentionPeriodFault and SnapshotCopyGrantNotFoundFault. - Create/Describe/Modify/DeleteSnapshotSchedule and ModifyClusterSnapshotSchedule. The association lives on the cluster, so DescribeSnapshotSchedules derives AssociatedClusters (state ACTIVE) and filters by ClusterIdentifier from it, and a deleted cluster cannot leave a stale association. Deleting a schedule in use is refused with InvalidClusterSnapshotScheduleState. - Snapshot schedules take part in CreateTags/DeleteTags/DescribeTags as resource type snapshotschedule. No snapshot is copied to another region or taken on a schedule; the docs say so. * fix(redshift): reject malformed snapshot schedules and in-use copy grant deletion * fix(redshift): validate snapshot copy region and snapshot schedule identifier EnableSnapshotCopy now refuses a DestinationRegion that is not a published AWS region with UnknownSnapshotCopyRegionFault (404), as the model lists. CreateSnapshotSchedule now refuses a ScheduleIdentifier containing anything but letters, digits and hyphens with InvalidParameterValue (400). The API reference allows alphanumerics; the management guide's example uses a hyphen. |
||
|
|
b8e628356c |
feat(cloudformation): provision ElastiCache serverless caches (#5423)
* feat(cloudformation): provision ElastiCache serverless caches Add the AWS::ElastiCache::ServerlessCache provisioner on top of the serverless cache API, with dotted Endpoint.* and ReaderEndpoint.* Fn::GetAtt attributes, in-place modification, rejected immutable changes and replacement on rename. * fix(cloudformation): reject a malformed NoPasswordRequired on ElastiCache users * fix(cloudformation): restore serverless cache settings on a failed update and reset removed ones * refactor(elasticache): inject ElastiCacheService once into the serverless service * fix(cloudformation): replace a serverless cache on its create-only properties Register AWS::ElastiCache::ServerlessCache in create-only-properties.json so a change to ServerlessCacheName, SubnetIds, KmsKeyId or SnapshotArnsToRestore is reported as a replacement instead of being applied in place or ignored. Share one Docker availability probe across the ElastiCache integration tests and validate the tag count in one place in ElastiCacheServerlessService. * fix(cloudformation): reject custom-named serverless cache replacement on create-only properties * fix(cloudformation): simplify serverless create-only update check and share replacement error |
||
|
|
f50437efba |
feat(cloudformation): provision AWS::BedrockAgentCore::Runtime, RuntimeEndpoint and Memory (#5226)
* feat(cloudformation): provision AWS::BedrockAgentCore::Runtime, RuntimeEndpoint and Memory The AgentCore control plane is emulated but had no CloudFormation provisioner, so the three types fell through to the generic stub that exposes only Arn and a template using Fn::GetAtt [Memory, MemoryArn] in an IAM policy failed the stack. BedrockAgentCoreCfnProvisioner maps every template property the services can store onto CreateAgentRuntime / CreateAgentRuntimeEndpoint / CreateMemory, publishes Ref as the registry schema's primaryIdentifier and Fn::GetAtt for every read-only property, updates in place when the create-only properties are unchanged and replaces otherwise, and deletes on stack teardown. Properties the emulated services have no model for are logged once at warn and listed in the docs. * fix(cloudformation): make AgentCore updates rollback-aware and authoritative Reachable through CfnProvisionerFixture (two-service inference arm). In-place updates snapshot the prior runtime, endpoint and memory configuration and tags, restore them on rollback, and delete a created entity when a later step of the same provision fails. The template is authoritative: UpdateAgentRuntime replaces the full configuration as AWS's PUT does (omitted authorizer, protocol and environment are cleared on the SDK path too), and the partial-update Memory and Endpoint calls get a replace-omitted overload for the provisioner. Nested AWS::NoValue members are omitted rather than stored blank, and the control service validates networkMode and serverProtocol with the API's ValidationException wording. * fix(cloudformation): accept AGUI runtimes and share the guarded provision helper The protocol check left out AGUI, which the AgentCore API and the Runtime schema allow, so an AG-UI runtime was refused through the API and in a stack. Ec2NetworkCfnProvisioner and BedrockAgentCoreCfnProvisioner carried the same guarded helper; it now lives on CfnRollback, taking the provisioner's in-place undo as a callback, and both use it. |
||
|
|
aff6f0eec4 |
fix(cloudformation): expand a SAM function's EventInvokeConfig (#5524)
* fix(cloudformation): expand a SAM function's EventInvokeConfig SAM's EventInvokeConfig was dropped, so a function declaring retries, a maximum event age or invoke destinations deployed with Lambda's defaults and no destination at all. It now expands as AWS's SAM translator expands it: an AWS::Lambda::EventInvokeConfig on $LATEST or the AutoPublishAlias alias, the inline role policy for each destination, the SQS queue or SNS topic SAM creates for a destination given only its Type, and SAM's conditions and error messages. The function's Condition, DeletionPolicy and UpdateReplacePolicy now reach every resource generated for it, as SAM passes them through. A condition naming another with anything but a string is rejected as CloudFormation rejects it, which also fails the template SAM produces for a conditional function with a conditional destination, as on AWS. * fix(cloudformation): resolve SSM parameters for the SAM transform and omit NoValue destinations CloudFormation resolves an AWS::SSM::Parameter::Value<String> parameter before it runs the SAM transform, so a destination Type taken from one is the stored value. The transform now gets the given parameter values over each Default, with SSM-typed parameters read from Parameter Store, wherever it runs. A Destination of AWS::NoValue passes through SAM unchanged and leaves its side without an ARN, which CloudFormation's validation rejects. The event invoke config provisioner resolved it to an empty string and stored that; it now omits AWS::NoValue, so the destination fails as the schema requires. * refactor: share SHA-1 as Digests.sha1 The SAM transform's generated condition names, EC2 key pair fingerprints and the SAML assertion name qualifier each made their own one-shot SHA-1 digest. They now share Digests.sha1 beside sha256. Also moves samTransformParameters above resolveSsmParameters' Javadoc, which it had been inserted beneath. |
||
|
|
86b32584f3 |
feat(cloudformation): provision ElastiCache users and user groups (#5422)
* feat(cloudformation): provision ElastiCache users and user groups Add AWS::ElastiCache::User and AWS::ElastiCache::UserGroup provisioners with authentication mode handling, create-only UserName, membership deltas, engine changes and replacement on rename. * fix(cloudformation): address review findings for ElastiCache users and user groups - Require Engine property when provisioning AWS::ElastiCache::User - Reject invalid and conflicting AuthenticationMode combinations - Add setUserGroupMembers to atomically update group membership under lock - Require UserIds property when provisioning AWS::ElastiCache::UserGroup - Snapshot and restore User and UserGroup on stack update rollback - Tighten replaced subnet group deletion assertion in integration test * refactor(elasticache): share user authentication and user group update logic Move the AuthenticationMode / Passwords / NoPasswordRequired decision into UserAuthentication so the query handler and the CloudFormation provisioner no longer duplicate it. Make modifyUserGroup and setUserGroupMembers share one locked update path, and drop the concurrency test that passed without the lock. |
||
|
|
85e0061a6f |
feat(cloudformation): provision AWS::ApiGatewayV2::DomainName and ApiMapping (#5038)
* refactor(apigateway): move the v2 domain and API mapping rules into the service CreateDomainName and CreateApiMapping on /v2/domainnames kept their rules in ApiGatewayController: the one-configuration check, the refusal of inputs Floci does not emulate, the flattening onto the shared custom-domain store, the API and stage existence check, the mapping key conflict check, the API type the mapping is routed as, and the mapping id. A CloudFormation provisioner cannot reach a controller, so it would have had to copy them. They now live in ApiGatewayService. createV2DomainName validates the body and creates the domain; createApiMapping checks the API and stage, refuses a key that is taken and routes the mapping as the API's protocol type; getApiMapping, deleteApiMapping and apiMappingId follow. ApiGatewayService takes ApiGatewayV2Service for the API and stage lookup, so the whole rule sits in one place and a caller needs one service. Nothing on the v2 side depends on the v1 service, so this adds no cycle. Leaving the lookup in ApiGatewayV2Service was tried first, but then every caller had to resolve the API before calling into ApiGatewayService, and the rule was split across two classes again. The code is moved, not rewritten: messages, error codes, the order of the checks and the id scheme are unchanged, and the controller delegates. * feat(cloudformation): provision AWS::ApiGatewayV2::DomainName and ApiMapping Both types were left to the stub arm. A stack reported CREATE_COMPLETE, but no domain or mapping existed, Fn::GetAtt on the domain resolved to literals such as DomainResource.RegionalDomainName (so a Route 53 alias built from it pointed nowhere), and with allow-stub-unsupported-resource-types off the stack rolled back. ApiGatewayV2DomainCfnProvisioner creates them through the v2 rules in ApiGatewayService and injects only that service. Ref on a domain is its name and Fn::GetAtt returns DomainNameArn, RegionalDomainName and RegionalHostedZoneId as GetDomainName reports them. Ref on a mapping is its ApiMappingId, which is also its only attribute. Updates follow AWS. DomainName is the only createOnly property of either type, and everything else changes in place: the domain's configuration is replaced as a whole, as DomainNameConfigurations is on AWS, and a mapping's ApiId, Stage and ApiMappingKey change without a new id. To keep the id across a key change, a mapping now stores the apiMappingId it was given instead of deriving it from its key on every read. A record persisted before is still read under the derived id, and a new mapping gets the id it always had unless another mapping holds it. Deriving the id and documenting the difference was the first version; it was dropped because Ref changed where AWS keeps it, and the change set already reported the key change as an update. A replacement creates the new entity and leaves the displaced one to ReplacementCleanup, so it is deleted in UPDATE_COMPLETE_CLEANUP_IN_PROGRESS, kept under UpdateReplacePolicy: Retain, and put back when a later resource fails the update. The first version deleted the old domain inside provision, as the v1 provisioner does, and a failed rename then ended in UPDATE_ROLLBACK_FAILED with the original domain and its mappings already gone. A mapping moved to another domain gets an id the displaced mapping does not hold, since two mappings under one physical id cannot be told apart, and the domain of each displaced id is recorded beside the cleanup. An in-place update snapshots what it changes, so a failed stack update restores it instead of ending in UPDATE_ROLLBACK_FAILED. CDK templates needed the v2 rules to match AWS in two more places. apigateway.DomainName with a multi-level basePath maps a REST API through AWS::ApiGatewayV2::ApiMapping, so a mapping now accepts a REST API stage. And the restrictions AWS documents for API mappings are enforced, in the API and in templates alike: no v2 call on an edge-optimized domain, with AWS's message; TLS_1_2 for an HTTP API or a multi-level key, which also keeps such a domain on TLS_1_2; no WebSocket API beside an HTTP or REST API; and AWS's key characters and length. The id-only delete accepts <ApiMappingId>|<DomainName>, the type's primary identifier, which is how Cloud Control names a mapping; a bare id still answers NotFoundException, so Cloud Control cannot report a delete that did not happen. The integration test deploys two templates aws-cdk-lib 2.272.0 synthesized, checked in with the app that produced them, and compat-cdk deploys the same shapes. * fix(apigateway): answer v2 domain and API mapping calls as API Gateway does The review of this PR found four places where Floci answered differently from API Gateway. Each was measured against API Gateway in eu-west-1 on 2026-10-04, with an imported certificate on a throwaway domain. An HTTP API custom domain is regional. CreateDomainName and UpdateDomainName with an endpoint type of PRIVATE, or one API Gateway does not know, give a REGIONAL domain, where Floci refused the first and stored the type on an update. EDGE is refused with "EDGE endpoint type is not supported for APIGatewayV2 domainName", not the message for v2 calls on an existing edge-optimized domain. API mapping keys are checked as API Gateway checks them, with its messages: a key does not end with '/', does not start with '/' or hold '//', holds letters, digits and $-_.+!*'(), between its levels, and is at most 300 characters. No key, an empty one, or on a create one of whitespace only, is the root; an update refuses whitespace only. Floci took "/" for the root and had its own message for the characters, without the comma. UpdateApiMapping and UpdateDomainName answer over the v2 HTTP API, not only from CloudFormation. What an UpdateApiMapping leaves out keeps its value. Cloud Control identifies an AWS::ApiGatewayV2::ApiMapping by the type's primary identifier, <ApiMappingId>|<DomainName>, while CloudFormation's Ref stays the bare id: CloudControlService derives the identifier from the desired state, as it already names primary identifier fields by type, and the provisioner deletes by it with the create-time attributes too. * fix(apigateway): refuse a v2 update of an edge domain, and recover a compound identifier whole The second review pass found three gaps in the previous commit. UpdateDomainName through the v2 API converted a v1-created edge-optimized domain to REGIONAL. The v2 API does not manage an edge-optimized domain, so the update is refused with the message every other v2 call on one gets, and the CloudFormation in-place update goes through the same check. A v2 UpdateDomainName without a configuration returned the domain unchanged without looking at the rest of the body, so a mutual TLS request was silently dropped. ApiGatewayService.updateV2DomainName now refuses what Floci does not emulate, and the edge-optimized domain, either way. Cloud Control's recovery of a create that finished just before a restart took the identifier after the last '|' of its key, which for an API mapping's <ApiMappingId>|<DomainName> left only the domain. It now takes everything after the key's third separator. A later review pass found four more points. UpdateApiMapping fills in what its body leaves out under the lock the update takes, so two partial updates of one mapping cannot write back each other's old values. A v2 domain's certificate is stored as the v1 API's regional certificate, which is what a regional domain reports through both APIs; a domain the v2 API wrote before still reports the one it holds until its configuration is replaced. The domain ARN both APIs and both CloudFormation provisioners build comes from ApiGatewayService.domainNameArn, the Cloud Control test waits with the awaitSuccess helper main has since gained, and requireMappingAllowed's javadoc is back on it. |
||
|
|
bfa9c2fbcc |
feat(cloudformation): provision Application Auto Scaling targets and policies (#5407)
* feat(cloudformation): provision Application Auto Scaling targets and policies AWS::ApplicationAutoScaling::ScalableTarget and ::ScalingPolicy had no provisioner, so a template that scales an ECS service failed on those two resources although the Application Auto Scaling service behind them, including the ECS capacity adjuster, was already there. This wires the two together. A scalable target has no name of its own: it is keyed by the triple of service namespace, resource id and scalable dimension, and CloudFormation's Ref is those three joined by a pipe. That composite is the physical id, which is also what a policy's ScalingTargetId carries when a template points one at the other with Ref, so the provisioner splits it back into the triple. A policy's Ref is its ARN rather than its name, so deleting one resolves the ARN through findPolicyByArn to recover the name and triple the service deletes by. Because the target's id is derived from the triple, changing any part of it replaces the target rather than updating it, so both types go through ReplacementCleanup to deregister what they displaced. Deletes tolerate only ObjectNotFoundException through CfnDeletes.safeDelete: a target takes its own policies with it, so a stack teardown reaches an already-deleted policy by ordinary ordering, while any other failure still surfaces as DELETE_FAILED. The properties each schema marks required are enforced rather than defaulted. MinCapacity and MaxCapacity on a target, and PolicyName and PolicyType on a policy, would otherwise register a target that never scales or accept a template CloudFormation itself rejects. The two scaling configuration blocks are parsed by the same code the PutScalingPolicy API path uses, extracted to ScalingConfigurationParser, since CloudFormation spells their members exactly as the API does. One parser means a template and an API call cannot disagree about what a policy means. ScheduledActions on a target is logged rather than dropped silently: Floci does not run scheduled scaling, and a template that scales on a clock should not look fully provisioned when nothing is scheduled. * fix(cloudformation): resolve intrinsics inside the scaling configuration blocks Review on #5407: the two scaling configuration blocks and SuspendedState reached the parser as raw template JSON, so an intrinsic inside one was never resolved. That is worse than it sounds, because an intrinsic is still a non-null node: hasNonNull passes and the value is read with asDouble, asText or asBoolean, which answer 0, "" and false. A policy written as TargetValue: !Ref TargetCpu registered as a policy targeting 0 percent rather than failing, a ResourceLabel built with Fn::Join arrived empty, and a flag behind Fn::If read false. Each block now goes through ctx.engine().resolveNode first, which is what AutoScalingScalingPolicyCfnProvisioner already does with its own block. Only nested objects were affected: the top-level properties were already read through ctx.resolveOptional, which resolves. A target's Tags were dropped as well, passed to the service as an empty map rather than read with ctx.resolveTags. ScheduledActions now carries a note in the generated resource-type table rather than only a warning in the log, so the gap is visible before someone wonders why their clock-based scaling never fires. * test(cloudformation): make the SuspendedState intrinsic test fail without its fix Review on #5407: anIntrinsicInsideSuspendedStateIsResolvedToo passed against the previous commit too. REFS had no Suspend entry, so the flag resolved to an empty string and read false either way, and assertNotNull held regardless because the raw block was already an object. The test pinned nothing. REFS now maps Suspend to true and the assertion is on isDynamicScalingInSuspended(), so it fails with expected: <true> but was: <false> when SuspendedState is read without resolveNode. The redundant copy of the properties node is gone. |
||
|
|
bac2c7cbf9 |
feat(elasticache): add serverless cache APIs (#5366)
* feat(elasticache): add serverless cache APIs Add CreateServerlessCache, DescribeServerlessCaches, ModifyServerlessCache and DeleteServerlessCache over the Query protocol. Each cache is backed by a hidden cluster that the ordinary cluster APIs do not list, with its own user-group authentication path in the proxy. * fix(elasticache): sua loi container rollback, validation tag, leak log stream va npipe hang - Thu hoi container va storage khi tao Memcached provisioning that bai - Format thong bao loi deleteCacheCluster chua cluster id - Validate tag key trong CreateServerlessCache khi co tag value - Chuan hoa case-insensitive cho userGroupId va region key cho nhom attachment - Giai phong dung logStream khi stop container trong ElastiCache va Memcached container manager - Tat validateAfterInactivity tren npipe trong FlociDockerHttpClient de tranh deadlock tren Windows * fix(elasticache): release serverless backing on reset and make delete and list tolerant - release backing clusters and user group attachments in clear() - let DeleteServerlessCache be retried after the backing cluster is already gone - keep DescribeServerlessCaches working when one cache has lost its backing - drop the unused replaceTags and document that tags are create-only * fix(core): drop the named-pipe stale-connection change, #5400 makes it |
||
|
|
61fe304619 |
feat(cloudformation): provision CloudFront public keys, key groups and functions (#5390)
* fix(cloudfront): reject CreateFunction when the name already exists * feat(cloudformation): provision CloudFront public keys, key groups and functions * fix(cloudformation): validate CloudFront function properties and always drop its tags on delete * fix(cloudformation): require the CloudFront function comment and reuse resolveOptional |
||
|
|
475d230ebc |
feat(cloudformation): provision ElastiCache cache clusters and subnet groups (#5307)
* feat(cloudformation): provision ElastiCache cache clusters and subnet groups Add AWS::ElastiCache::CacheCluster and AWS::ElastiCache::SubnetGroup provisioners with Ref, Fn::GetAtt endpoint attributes, create-only replacement and update handling. Subnet group updates now carry tags through modifyCacheSubnetGroup, and Memcached clusters record their network type. * fix(elasticache): validate cluster name, rollback subnet groups and preserve memcached tags * fix(elasticache): align in-use error wire code and enforce schema required properties |
||
|
|
233d05eab1 |
docs(cloudformation): scope required AppSync resources (#4897)
The AppSync page did not say which AWS::AppSync resource types CloudFormation provisions, what Ref and Fn::GetAtt return for them, or what happens to the AppSync types Floci does not serve. A CDK app that deploys a GraphQL API had to read the provisioner to find out. The page now has a CloudFormation section. It lists the six provisioned types with their Ref value and Fn::GetAtt attributes, and the differences measured by deploying the same template to AWS and to Floci: Ref on GraphQLApi and ApiKey returns the id where AWS returns the ARN, GraphQLEndpointArn is not modeled, the URL and DNS attributes point at Floci, and AWS refuses Fn::GetAtt Id on a GraphQLSchema while Floci resolves it. It also states that a schema given only by S3 location and S3 code locations are refused, and that the remaining AppSync types are stubbed by default. The generated CloudFormation resource-type table gets a row note with the Ref difference and a link to that section. |
||
|
|
c6304a26c8 |
feat(cloudformation): provision AWS::Transfer::User (#5076)
* feat(cloudformation): provision AWS::Transfer::User Adds the user type to TransferCfnProvisioner with in-place update and replacement. * Fix #4655 Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com> * docs: count the IAM SSH public key operations in the service matrix Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com> --------- Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com> |
||
|
|
99a6b4050c |
feat(redshift-serverless): add running workgroups and Data API WorkgroupName support (#5012)
* feat(redshift-serverless): add running workgroups and Data API WorkgroupName support Redshift Serverless workgroups get full CRUD (Create/Get/List/Update/Delete), tagging by ARN, and the AWS::RedshiftServerless::Namespace and ::Workgroup CloudFormation types with dotted Fn::GetAtt keys taken from the registry schema. A namespace has at most one workgroup, and DeleteNamespace is refused while one is attached. Each workgroup runs a PostgreSQL container behind an authenticating proxy, sharing the managers and the proxy port pool with provisioned Redshift. Add GetCredentials, accept WorkgroupName (name or ARN) in the Redshift Data API, and push a changed namespace adminUserPassword down to the running backend. The runtime is re-attached when Floci restarts. Not covered: snapshots, usage limits, endpoint access, and COPY/UNLOAD/Spectrum on workgroups. * fix(redshift-serverless): stop the runtime when workgroup creation fails after it started If persisting the workgroup record failed after the container and proxy were already running, the runtime was left behind with no record. createWorkgroup now stops it (best effort) and releases the endpoint on the failure path. Fix the CloudFormation error for a NamespaceName change: suggesting a new WorkgroupName can never succeed because a namespace holds only one workgroup. * fix(redshift-serverless): reset omitted CloudFormation properties and order startup observers When UpdateStack drops a property from the template, the provisioner now sends its default (BaseCapacity, EnhancedVpcRouting, PubliclyAccessible, Port, TrackName, PricePerformanceTarget) instead of keeping the stored value, which matches CloudFormation semantics. MaxCapacity has no default and keeps its stored value. Give the workgroup StartupEvent observer a @Priority after RedshiftService so every persisted cluster has reserved its proxy port before workgroups restore theirs. Also remove an unused import and move DEFAULT_DATABASE to the top of RedshiftContainerManager. * fix(redshift-serverless): address review findings on password rotation and namespace updates - Roll the backend password back when a rotation cannot be completed or stored, and apply it last so validation failures never leave the backend ahead of the stored namespace. - Keep a workgroup endpoint reserved when its runtime cannot be stopped during clear(). - Reject an in-place DbName change in CloudFormation, since it is fixed at creation. - Reset an omitted KmsKeyId and DefaultIamRoleArn on CloudFormation updates. * fix(redshift-serverless): keep rollback failures from masking errors and drop stale GetAtt role - Do not reset the proxy password when the role restore fails, and attach restore failures to the original exception instead of replacing it. - Remove Namespace.DefaultIamRoleArn from the stack resource when an update no longer declares a default role. * docs: correct the Redshift Serverless operation count in the service matrix * fix(redshift-serverless): expose Workgroup.ConfigParameters through Fn::GetAtt * fix(redshift-serverless): parse ConfigParameters resolved from a GetAtt attribute * docs(redshift-serverless): list every unsupported operation group |
||
|
|
66f04cde25 |
feat(eventbridge): provision AWS::Events::Archive (#4818)
* fix(eventbridge): make UpdateArchive a partial update UpdateArchive reset the event pattern to null and the retention to 0 whenever a request omitted them. On AWS an omitted Description, EventPattern or RetentionDays keeps the stored value, an empty Description or EventPattern clears it, and RetentionDays 0 sets 0. * feat(eventbridge): provision AWS::Events::Archive CloudFormation stubbed AWS::Events::Archive with a fake ARN and created nothing. EventsArchiveCfnProvisioner now creates a real archive through EventBridgeService. Ref is the archive name and Fn::GetAtt Arn the archive ARN. ArchiveName is generated when omitted and kept across updates. Description, EventPattern and RetentionDays update in place, sending only the properties the template declares, and a failed stack update restores them from a snapshot. Changing SourceArn or ArchiveName, or dropping an explicit name, replaces the archive and deletes the displaced one once the update commits. A replacement that keeps an explicit name is refused with CloudFormation's custom-named resource error before any change. KmsKeyIdentifier is ignored. Closes #4815 * fix(eventbridge): reject an archive source that is not an existing bus of the account and region CreateArchive now checks EventSourceArn as AWS does, before the archive name: a bus in another account fails with AccessDeniedException, one in another region with ValidationException, and a bus that does not exist with ResourceNotFoundException. The AWS::Events::Archive provisioner goes through the same service call, so a stack can no longer reach CREATE_COMPLETE with an archive that could never capture an event. * test(eventbridge): roll back an in-place archive update when a later resource fails A stack update changes an archive's description and retention in place, then fails on a second archive whose source bus does not exist. The stack ends UPDATE_ROLLBACK_COMPLETE, DescribeArchive shows the original values and the second archive was never created. The golden case passes on AWS and is mirrored in the Floci integration test. * fix(cloudformation): refuse declaring a generated archive name explicitly Adding ArchiveName with the name CloudFormation generated for an unnamed archive asks AWS to replace the archive under the same custom name, which it refuses with the custom-named resource error and rolls the stack back. Floci took the in-place path and reached UPDATE_COMPLETE; the existing refusal now also fires when the previous name was generated. * fix(cloudformation): provision a real archive when updating a stack whose archive was stubbed A stack created before AWS::Events::Archive had a provisioner holds the dispatcher's stub, whose physical id names no archive. Its next update now creates the archive instead of failing to describe that id, and the stub id is left to the replacement cleanup. * fix(eventbridge): validate archive description, pattern and retention as CreateArchive and UpdateArchive do CreateArchive and UpdateArchive now reject a description over 512 characters, an event pattern over 4096 characters and a negative retention with the ValidationException AWS returns, all violations reported together. The check runs before the source, existence and duplicate checks, so it also fails the AWS::Events::Archive resource in a stack. |
||
|
|
4d980a361f |
fix(docs): prevent stale service action counts (#5018)
* fix(docs): prevent stale service action counts * test(docs): validate composite service action counts * fix(docs): clarify action count validation coverage * fix(docs): derive shared tagging route counts * fix(docs): align service action counts |
||
|
|
bcb50b765f |
feat(cloudformation): provision Transfer Family servers (#4809)
* feat(cloudformation): provision Transfer Family servers * fix(cloudformation): clear Transfer update snapshot after success * test(cloudformation): cover Transfer tag rollback * fix(cloudformation): match Transfer server return values |
||
|
|
a338a430cc |
feat(cloudformation): provision Cloud Map namespaces and services (#4599)
* feat(cloudformation): provision Cloud Map namespaces and services AWS::ServiceDiscovery::PrivateDnsNamespace, PublicDnsNamespace, HttpNamespace and Service were stubbed, so a stack reported them created while nothing existed in Cloud Map and Fn::GetAtt resolved to literals. CloudMapCfnProvisioner creates them through CloudMapService. Ref returns the id; Fn::GetAtt exposes Id and Arn, HostedZoneId on a DNS namespace and Name on a service. An unnamed service is named <LogicalId>-<12 chars>, as measured on AWS. Description, DnsConfig, HealthCheckConfig and Tags update in place; a createOnly change replaces the resource through ReplacementCleanup, and a rolled-back replacement restores the createOnly record. A Ref to a Number parameter is coerced back to a JSON number for DnsRecords TTL and FailureThreshold. Closes #4596 * fix(cloudformation): roll back in-place Cloud Map updates An in-place namespace or service update followed by a later resource failing left the Cloud Map changes live and the stack in UPDATE_ROLLBACK_FAILED, since rollbackUpdate only undid replacements. The provisioner now keeps the description, DnsConfig, HealthCheckConfig and tags an in-place update overwrites and puts them back on rollback; a committed update drops the snapshot. * fix(cloudmap): reject DNS record type changes on service update UpdateService only changes the TTLs of a service's existing DNS records on AWS. An in-place CloudFormation update that changes the record types, or gives a DnsConfig to a service without one, now fails with InvalidInput instead of being applied, so it rolls back like on AWS and a rollback never has to remove a DnsConfig. * fix(cloudmap): accept only TTL changes in a service DnsConfig update UpdateService carries only DnsRecords on AWS and CloudFormation does not support a RoutingPolicy update. Comparing the record types as a set let a RoutingPolicy change or an added record of the same type through; the requested and stored DnsConfig now have to match apart from the TTLs. * fix(cloudmap): ignore DNS record order in a service DnsConfig update A TTL-only update that listed the same records in another order was rejected. The comparison now uses the sorted record types, so counts, types and RoutingPolicy still have to match. * test(cloudformation): restore a real HealthCheckConfig in the Cloud Map rollback test The in-place rollback test went from a null health check config to null, so dropping it from the snapshot would have passed. |
||
|
|
5bad6774f6 |
refactor(dynamodb): isolate backend operation execution (#4379)
* refactor(dynamodb): route wire operations through a backend seam Rename the native wire handlers to NativeDynamoDbJsonHandler and NativeDynamoDbStreamsJsonHandler. Add DynamoDbOperations as the raw operation seam, plus typed DynamoDbItemAccess and DynamoDbTableAccess contracts. Add NativeDynamoDbBackend behind the seam and DynamoDbBackendSelector as the one immutable selection. Keep DynamoDbJsonHandler and DynamoDbStreamsJsonHandler as thin entry points that resolve account and region. Add RequestScopes.callAsChecked and let AslExecutor delegate to it. * refactor(dynamodb): route Java consumers through DynamoDbFacade DynamoDbFacade hands out the selected item and table capabilities and is now the one DynamoDB Resource Explorer provider in place of DynamoDbService. CloudFormation, Step Functions, the IAM condition context and the Redshift backfill call it with an explicit scope; the IoT dynamoDBv2 action writes as the rule's owning account. |
||
|
|
4abba5a218 |
fix(lambda): preserve CloudFormation event source mapping options (#4316)
AWS::Lambda::EventSourceMapping now forwards MaximumBatchingWindowInSeconds, MaximumRetryAttempts, MaximumRecordAgeInSeconds, BisectBatchOnFunctionError, FilterCriteria, DestinationConfig and ScalingConfig to LambdaService, so a stack-created mapping matches an API-created one. On UpdateStack each of these that the template omits is sent as null, which clears it. ParallelizationFactor and TumblingWindowInSeconds are not modeled and remain ignored; the resource-type table notes this. Fixes #4313 |
||
|
|
4a51c0e814 |
feat(dlm): manage lifecycle policies (#4335)
* feat(dlm): manage lifecycle policies * fix(dlm): use shared partition regex |
||
|
|
7cf8ab7d85 |
feat(ce): manage anomaly monitors and subscriptions (#4221)
* feat(ce): manage anomaly monitors and subscriptions * fix(ce): return JSON objects for empty responses |
||
|
|
69ceb976c7 |
refactor(cloudformation): replace the retired monolith with CfnResourceDispatcher (#4269)
* refactor(cloudformation): replace the retired monolith with CfnResourceDispatcher CloudFormationResourceProvisioner was the monolith that held every AWS:: provisioning arm. With the per-service migration complete it kept no arm: LEGACY_SWITCH_TYPES and DELETE_NEEDS_STACK_RESOURCE were empty sets, five private helpers duplicated ProvisionContext, six imports were unused, and its UPDATE_ROLLBACK_* constants only re-exported CfnRollback. What it still did is small: route provision and delete to the registry, stub a type nothing serves (or refuse it in strict mode), answer the engine's update-lifecycle questions through the owning provisioner, and give Cloud Control its stack-less entry points. That is now CfnResourceDispatcher in provisioners/, behaviour unchanged: the same stub arm, warn lines, status reasons and strict-mode failure, with the same logger category the unsupported-type test binds to. The dead overloads go with the class (the 8-arg provision, the unused accountId on delete, the short deleteStandalone forms). CloudFormationTemplateEngine gains a public standalone(...) factory so the dispatcher can build Cloud Control's throwaway engine from outside the package while the constructors stay package-private for the tests that mock it. CloudFormationService reads the rollback markers from CfnRollback directly. The empty guards leave with the class: CfnDeletePrecedenceTest read only the empty set, and CfnResourceInventoryTest no longer folds a legacy owner into the inventory (the checked-in file had no such row). Javadocs that described the switch as still present now describe the registry. CfnResourceDispatcherTest pins the standalone engine's dynamic-reference resolver, the prior identity reaching the ProvisionContext, and the whole-resource delete form; every other test only changed the type it names. * chore(cloudformation): retire the legacy-switch guards from tooling and instructions The switch is gone, so nothing can carry a LEGACY_SWITCH owner: the schema coverage test drops its skip, the docs generator's double-ownership check generalises to any type with two provisioners, and its fixtures name real owners. AGENTS.md and CONTRIBUTING.md tell contributors where types live instead of warning them off a class that no longer exists. |
||
|
|
34f4f72e82 |
fix(cloudformation): pass Lambda hot-reload code through to the Lambda service (#4093)
* fix(cloudformation): pass Lambda hot-reload code through to the Lambda service
AWS::Lambda::Function code of {S3Bucket: hot-reload, S3Key: /host/path} is
Lambda's bind-mount hot-reload convention: the bucket is a marker and the key
is a directory on the Docker host. The provisioner probed S3 for the pair
before calling CreateFunction, so no such object existed and the stack failed
with a ValidationError (or, with allow-stub-lambda-code on, quietly deployed
the stub handler).
Skip the S3 probe for the hot-reload bucket and hand the Code map to
LambdaService unchanged, which keeps enforcing hot-reload enablement, the
absolute-path rule and the allow-list, and reports its own error as the
resource status reason. Record a hot-reload code identity so a redeploy with
the same path is a no-op, and compare adopted functions by host path since a
hot-reload function carries no S3 bucket or key.
* fix(cloudformation): canonicalise the hot-reload code identity
LambdaService stores a hot-reload host path normalised (#4053), while the
provisioner recorded the raw template key as the code identity and compared
adopted functions against it. A template that spelled the same directory with
a trailing slash or a ".." segment, or a function adopted from a direct
CreateFunction, therefore looked like a code change and triggered an
UpdateFunctionCode that mounted the same directory again.
Build the identity from, and compare against, the normalised path. The raw key
still goes to Lambda so its validation and error messages are unchanged. Also
cover the documented SAM CodeUri form, s3://hot-reload//abs/path, through the
transform.
|
||
|
|
4b3923712a |
feat(redshiftserverless): add namespace lifecycle and tagging (#3631)
* feat(redshiftserverless): add namespace lifecycle Amazon Redshift Serverless was absent entirely: every call returned UnknownOperationException, so Terraform's aws_redshiftserverless_namespace could not be planned or applied against Floci. Add a JSON 1.1 service under the RedshiftServerless. target prefix with CreateNamespace, GetNamespace, ListNamespaces, UpdateNamespace, and DeleteNamespace. Namespaces are account and Region scoped and stored through StorageFactory. AWS defaults are applied on create (dbName dev, kmsKeyId AWS_OWNED_KMS_KEY, empty logExports, status AVAILABLE), adminUserPassword is accepted and never returned, DeleteNamespace returns the removed namespace with status DELETING, and UpdateNamespace applies only the supplied fields. Workgroups, snapshots, and the tagging operations remain unemulated. * feat(redshiftserverless): add namespace tagging operations Terraform's aws_redshiftserverless_namespace calls ListTagsForResource on every read once tags are involved, so the namespace lifecycle alone left the resource broken as soon as a config set tags. Add ListTagsForResource, TagResource, and UntagResource. Lookup is by resourceArn rather than namespace name, scoped to the caller's Region, since that is how AWS keys these operations; the namespace is currently the only taggable Redshift Serverless resource, so any other ARN is reported absent. TagResource merges into the existing tags, UntagResource removes by key, and tags passed to CreateNamespace are readable back and survive UpdateNamespace. * fix(redshiftserverless): emit creationDate as ISO-8601 per the API model The awsJson1.1 default is epoch seconds and 133 call sites use it, but this model overrides it: TimestampFormatTrait ISO_8601 on creationDate (and on all eleven other timestamp members in the package, audited). Strict clients broke on the number: Terraform's Go SDK failed to decode and orphaned the created namespace outside state; the Java SDK failed to unmarshall. Only botocore's lenient parsing let CLI checks pass. Emitted via the repo's millisecond-ISO idiom; format pinned by regex in the integration test and by a new handler-level unit test class covering the wire layer that had none (timestamp shape, nextToken emission, maxResults type guard). Checklist note added to AGENTS.md + CONTRIBUTING.md so the next service checks the trait before reaching for the epoch idiom. * docs(redshiftserverless): the ISO-8601 rule is per member, not model-wide Review follow-up: the earlier claim that every timestamp member in this model carries TimestampFormatTrait(ISO_8601) is wrong — 15 of the model's 30 INSTANT members carry no trait and fall back to the awsJson1.1 epoch default. The shipped code is unaffected (creationDate, the only timestamp emitted, is genuinely ISO_8601), but the claim was load-bearing guidance: whoever adds snapshots or scheduled actions next would have applied ISO-8601 to trait-free members and reintroduced the bug in the opposite direction. Narrowed in all four places it appeared. * fix(redshiftserverless): validate collection types, copy-on-update; drop em dashes A present iamRoles, logExports, tags or tagKeys member that was not a JSON array parsed to null and was then indistinguishable from an omitted member, so a malformed UpdateNamespace silently kept the stored value and returned 200 instead of reporting the request as invalid. Only a missing or null member now means "omitted"; a present member of the wrong type, or a collection holding a non-string element, is a ValidationException naming the member. updateNamespace mutated the stored Namespace in place while GetNamespace and ListNamespaces read without taking the same monitor, so a concurrent reader could observe a torn object with some fields updated and some not. Build the new state on a copy and store that instead, which also makes the write-back explicit. The same in-place mutation was present in tagResource, untagResource and deleteNamespace, so all four now copy. Merge semantics are unchanged. Replace the em dashes in the timestamp guidance with commas and periods, per the repository ban. * fix(redshiftserverless): reject Redshift reserved words as namespace names CreateNamespace rejects a namespace name that is an Amazon Redshift SQL reserved word, so names like select or user passed the length and [a-z0-9-] checks here and were persisted. Add the documented reserved word list to the shared namespace-name validator, which create, get, update and delete all reach, so the rejection is consistent. |
||
|
|
28ca34ad6c |
fix(cloudformation): apply an S3 bucket's declared configuration and its policy (#3950)
S3CfnProvisioner translated CorsConfiguration and VersioningConfiguration and nothing else, and AWS::S3::BucketPolicy took a physical id and stopped, so a stack reported CREATE_COMPLETE for a bucket with no lifecycle, no public-access block, no default encryption, no tags and no policy. PublicAccessBlockConfiguration, LifecycleConfiguration, BucketEncryption and Tags are now translated into the XML their S3 API calls take and handed to the same service methods, so they are validated and stored exactly as a direct PutBucket* would be. The policy document has its intrinsics resolved and is put on the bucket. The policy's physical id is the bucket name, as the registry schema's primaryIdentifier declares, and deleting the resource removes the policy, tolerating a bucket the stack already deleted. The class javadoc names the properties that are covered and those still dropped. Closes #3947 |
||
|
|
532bae5525 |
feat(dms): add replication subnet group lifecycle and tagging (#3630)
* feat(dms): add replication subnet group lifecycle AWS DMS was entirely absent, so every terraform-aws-data-storage example using aws_dms_replication_subnet_group failed at plan with UnknownOperationException. Adds a minimal dms service on AWS JSON 1.1 (X-Amz-Target prefix AmazonDMSv20160101.) implementing CreateReplicationSubnetGroup, DescribeReplicationSubnetGroups and DeleteReplicationSubnetGroup. Subnets are resolved against the emulated EC2 service, so the VpcId and Availability Zones a group reports are the ones its subnets actually have, and AWS's own rules are enforced: the identifier is stored lowercase, "default" is reserved, subnets must share a VPC, and a group must cover at least two Availability Zones. Tagging actions and replication instances, endpoints and tasks are out of scope and still report UnknownOperationException. * feat(dms): add resource tagging for replication subnet groups Terraform's aws_dms_replication_subnet_group reads tags back through ListTagsForResource, so without the tagging trio the resource could be created but never read cleanly. Adds ListTagsForResource, AddTagsToResource and RemoveTagsFromResource, and stores the Tags member of CreateReplicationSubnetGroup with the group. DMS does not return a subnet group ARN from describe, so the provider builds arn:aws:dms:<region>:<account>:subgrp:<id> client side; Floci parses that form back to the stored group and rejects anything else, including another account's ARN, with ResourceNotFoundFault. * fix(dms): address review findings Emit IsReadOnly on ReplicationSubnetGroup, the one member of the model's seven the response was missing. It is always false: a read-only group is one DMS manages for a zero-ETL integration, which Floci does not emulate. Fault a cross-Region ARN the way a cross-account one already faulted. Storage is keyed by the caller's Region, so honouring an eu-west-1 ARN from a us-east-1 caller silently reached the caller's own group of that name rather than the one named. Reject a subnet with no Availability Zone as InvalidSubnet. Set.copyOf rejects nulls, so such a subnet raised a NullPointerException and surfaced as a 500 instead of a client error. Adds the user-realistic minimum-AZ case: two subnets sharing one AZ, which the previous tests did not cover because they passed one subnet. * fix(dms): reject wrongly-typed tag, filter and arn-list members A present member of the wrong JSON type was coerced rather than rejected. asText() on an object yields the empty string, so a tag whose Value was an object stored an empty value and reported success; a Filters or ResourceArnList member that was not a list was ignored outright, which turned a filtered describe into an unfiltered one. Every string member now answers SerializationException when it is present with another JSON type, matching what AWS returns when a json-1.1 member will not deserialize, and matching how Kinesis, Cognito and KMS already report the same class of error here. An absent member stays a parameter error: missing and mistyped are different faults. * fix(dms): paginate DescribeReplicationSubnetGroups and validate the description DescribeReplicationSubnetGroups returned every matching group in one response and ignored both MaxRecords and Marker, so an SDK or Terraform paginator diverged from a live account as soon as more than one page of groups existed. Page through the shared opaque-cursor helper, keyed on the group identifier, so a Marker stays resumable across groups created or deleted between requests. MaxRecords defaults to 100 and is rejected outside the documented 20 to 100 range rather than clamped, with the InvalidParameterValueException a live account answers. Marker is emitted only while a further page remains: an SDK paginator treats any Marker as "ask again", so one on the final page loops forever. ReplicationSubnetGroupDescription now also enforces the model's printable-character constraint, so a value carrying a control character such as 0x01 is rejected instead of persisted. * docs(dms): describe the Marker as the opaque cursor it is * fix(test): DmsTest must compile at the sdk-test-java module's Java 17 target List.getFirst() is a Java 21 SequencedCollection method. The main project compiles at 21, but compatibility-tests/sdk-test-java pins source/target 17, and DmsTest was the only file in that module using getFirst() -- so the native arm64 sdk-test-java image failed to build and every test in it was skipped. This was not caught earlier because the previous head of this PR had no CI rollup at all; the merge that made the branch mergeable is what first ran the job. Replaced with get(0), which is what the rest of the module uses. * style(test): import Objects and Collectors instead of naming them inline AGENTS.md asks for imports rather than inline fully-qualified names. DmsServiceTest had two: java.util.Objects::nonNull and java.util.stream.Collectors.toMap. Neither was imported; both now are. |