mirror of
https://github.com/floci-io/floci.git
synced 2026-11-22 21:50:46 -05:00
d65e76b7ea8a46bc68036701592c2f82e6e9c430
161
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
0816789e30 |
feat(cloudformation): provision AWS::ElasticLoadBalancingV2::ListenerCertificate (#8353)
CDK's ApplicationListener.addCertificates puts the first certificate on the listener and emits one ListenerCertificate for each extra one. Floci had no provisioner for the type, so it was stubbed as CREATE_COMPLETE and did nothing; since the default certificate is held apart from the listener's certificate list, such a listener came up with an empty list and served none of its SNI certificates. ElbV2CfnProvisioner serves the type now. Create adds the declared certificates to the listener's list, as AddListenerCertificates does, and delete removes the ones the resource added, recorded per physical id because the id alone cannot carry them. Certificates updates in place, as the resource reference says: the certificates the template gains are added, then the ones it drops removed, and a failed update puts both back. ListenerArn is create-only, so a change replaces the resource: the certificates go onto the new listener, and come off the old one once the update commits. CloudFormation publishes no format for the resource's identifier, so Ref returns <ListenerArn>|<suffix>. AWS's published resource schemas have moved since the vendored tables were last synced: AWS::Lambda::Function gained AcceleratorConfig and RuntimeConfig, and AWS::ECS::TaskDefinition TrustedExecutionConfiguration. That fails the online check of those tables, which this change runs, so cfn-property-types.json and schema-surface.tsv are synced from AWS here, and the three new properties are recorded as accepted and ignored. |
||
|
|
f1a6260a94 |
feat(cloudformation): add AWS::EFS::FileSystem, MountTarget and AccessPoint (#8074)
A template can now create the three EFS types. They are provisioned through EfsService, so a stack and a direct API call see the same file systems, mount targets and access points. - Ref and Fn::GetAtt resolve for every type. - Updates change ThroughputMode, ProvisionedThroughputInMibps, BackupPolicy, LifecyclePolicies, FileSystemPolicy, FileSystemProtection and tags in place; create-only properties replace the resource, and a failed update puts back what it changed. - Backups are off on create unless BackupPolicy is ENABLED or the file system is One Zone, and ThroughputMode provisioned requires ProvisionedThroughputInMibps. - Required properties are validated from the registry schema. Ref #7972 |
||
|
|
9831603f67 | feat(cloudfront): add CloudFront KeyValueStore support (#8108) | ||
|
|
a6da82af8a |
feat(logs): support saved query definitions (#7999) (#8003)
* feat(logs): support saved query definitions Closes #7999 * fix: preserve saved-query retries and fence reset writes Keep client-token request snapshots and returned IDs separate from mutable query definitions. Delayed create and update retries preserve newer content, reject conflicting input, and do not resurrect deleted definitions. Persist retry records with the configured account-aware CloudWatch Logs storage until reset. Gate saves and deletes through beforeReset/afterReset under the service monitor so reset drains active writes and rejects new writes throughout the storage wipe. Validation: 137 focused service, SDK integration, reset, and existing CloudWatch Logs regression tests passed. Checkstyle, docs-check, partition-check, and git diff --check passed. * fix: validate saved queries against vendored Logs constraints Include all three saved-query actions in the existing botocore constraint generator and share RequestConstraintCheck with delivery handlers. Return InvalidParameterException for saved-query constraints while preserving delivery ValidationException messages. Remove duplicated lengths, patterns, enums, list sizes, and type checks from the service and handler; retain domain checks for retries and query-language compatibility. Reuse AwsTestClients for SDK integration fixtures. Cover modeled errors before service calls, nested parameters, valid maximum sizes, and existing saved-query retry/reset behavior. Validation: 179 focused Java tests and 50 request-shape generator tests passed. Generated-data freshness, Checkstyle, docs-check, partition-check, and git diff --check passed. |
||
|
|
b144879127 |
feat(xray): serve traces, summaries, the service graph and sampling (#7733)
X-Ray is the one AWS service local stacks ask for and Floci does not have: SQS
and SNS already carry AWSTraceHeader, and nothing on the other end accepts the
segments that header points at. This serves the ingest loop, the summaries that
read it back, the service graph a console draws from it, and the sampling the
X-Ray daemon polls on its own timers.
The API is REST JSON on literal paths (/TraceSegments, /Traces, /TraceSummaries,
/ServiceGraph, /TraceGraph, /GetSamplingRules, ...), which S3's path-style routes
would swallow as a bucket name, so a request signed for the xray credential scope
is rewritten onto an internal prefix and every other request keeps its path. Only
the paths Floci serves are claimed.
What Floci stores is the segment document as sent: BatchGetTraces has to answer
exactly what PutTraceSegments accepted, so re-serialising through a model would
change what the caller reads. The summaries and the graph parse those documents
on read, which keeps the stored bytes the caller's and costs nothing while a local
stack is idle.
A filter expression is parsed, not pattern-matched: service("name"), hasError,
hasFault, hasThrottle, duration, responsetime, http.status, annotation.key,
comparisons, AND, OR, NOT and parentheses. Anything outside that set is refused
with InvalidRequestException naming what it could not read, because accepting a
filter and ignoring half of it hands a caller a superset and looks like a pass. A
lone '!' is refused the same way rather than left as a delimiter no branch
consumes, and responsetime is compared in seconds, the unit AWS uses.
The graph collapses segments into services by name, derives edges from parent ids,
and reports AWS's SummaryStatistics and cumulative DurationHistogram per node and
per edge. A node is a service, not a document shape: the same service seen once
with an http block and once without is one node.
Sampling answers the Default rule AWS serves in every Region, so a daemon has
something to sample at before any rule exists, and five rules per Region on top of
it. It is answered, not adapted: the reservoir is reported as the quota and
renewed every 10 seconds rather than decremented per report, and the service page
says so.
A local emulator runs for days, so the store is bounded to 10000 traces per Region
with AWS's 30 day window, oldest evicted first. A bad document is reported under
UnprocessedTraceSegments with its reason instead of failing the whole call, and
100 documents per call is the AWS limit, enforced.
Co-authored-by: David Guardiola <davidguardiola@gmail.com>
|
||
|
|
9f77c736e9 |
feat(securityhub): add member account operations and DisableOrganizationAdminAccount (#7791)
Add CreateMembers, ListMembers, GetMembers, DisassociateMembers, DeleteMembers and DisableOrganizationAdminAccount, the operations Landing Zone Accelerator and Terraform's aws_securityhub_member use to manage Security Hub members. Organization accounts added by the delegated administrator become Enabled members and have Security Hub and its default standards enabled for them; other accounts are Created. Organization members can be disassociated but not deleted. Disabling the delegated administrator marks its organization members Removed. Macie already served POST /members and GET /members, so Security Hub calls on those paths were answered by Macie. Both routes now dispatch on the SigV4 credential scope in SecurityAdminController, as GET /admin already does; unsigned requests still reach Macie. Closes #2197 |
||
|
|
ab312d68e6 |
feat(paymentcryptography): the card values and the authorization cryptograms (#7400)
* feat(paymentcryptography): the single DES decryption The retail MAC closes its tag with a decryption under the right half of the key, so the cipher package needs the Single DES decryption as well as the encryption. It is the same cipher the encryption is, the other way round, and it is BouncyCastle's like every other cipher here. * feat(paymentcryptography): the card values and the authorization cryptograms The card validation value is the three digit value of the X9 algorithm: the account number, the expiry and the service code, enciphered under the card verification key, and decimalized. The dynamic variants compute the value from the transaction rather than from the card's own fields, and they take a key of their own usage that may derive. The authorization cryptogram is the ARQC of the transaction: the ISO 9797-1 algorithm 3 retail MAC over the transaction data, cut to eight bytes, under a session key the request's derivation produces. The EMV common session key, the EMV 2000 one, the Mastercard one and the Visa one are served. The American Express derivation is refused rather than approximated: the AEIPS session key derivation is proprietary and there is nothing to verify it against, and a plausible wrong cryptogram is worse than an error. The operations are written on the data plane as it is now: the hexadecimal is java.util.HexFormat, the digests are the shared Digests, and the ciphers are the BouncyCastle ones the package already uses. The routes of the card operations are in the vendored rest-routes.json already, so they are authorized by the generated rules and need no hand-written ones. * test(paymentcryptography): the card operations over the SDK and the CLI The unit tests call the operations directly, so they do not reach the routes the requests travel, the JSON the body carries, or the rules that decide which action a request is. The suite does, through a client that signs the request the way a client of the data plane signs it. The Java suite drives the card verification value and the authorization cryptogram with the AWS SDK for Java v2, and the CLI suite drives them with the AWS CLI. Both refuse the American Express derivation, the key of another usage, and the value or the cryptogram that does not verify. * fix(paymentcryptography): the card requests are checked against the model The card operations' constraints were not vendored, so their requests were checked by hand and only partly: the account number was read as the digits it carried, the expiry and the service code were not checked at all for the first card verification value, and the key an operation acted on was not checked to be a key. The constraints are in the model, so they are vendored now, the four operations are checked against them before they look at the request, and the checks that repeat them are gone. The model states that the PAN sequence number is two digits and that the application transaction counter is two bytes. The derivation reads the last eight bytes of the packed PAN || PSN and the first two bytes of the counter, so the longer values the hand-rolled checks allowed were read as something other than the counter they stood for. The vectors are the ones the EMV derivation gives for the model's inputs. * docs(paymentcryptography): the card requests are checked against the model The account number is digits, the expiry is four of them, the service code is three and the PAN sequence number is two, the EMV ones as the model states them. A formatted account number and a longer sequence number are refused rather than read as the digits they carry. * docs(paymentcryptography): the data plane's operation count The Service Matrix counts the operations a service documents, and the data plane documents four more now: the card verification value and the authorization cryptogram. * fix(paymentcryptography): the card operations raise the errors the model names Three findings from the review, all in the card operations. A key that may not be used for the operation was refused with InvalidKeyUsageException, which the data plane's model does not name, so a client cannot catch it as its own type. The data plane names three errors, and a refusal that is not one of them is a ValidationException. The ARPC method 2 read an ArpcInputFormat member that no model, and no SDK, carries, so the branch it guarded could never be taken. The member is gone and the response value is always made the way the reference makes it. And a hexadecimal member of an odd length is a request the model allows and the cipher cannot read, so it was answered with an internal failure the caller cannot catch. It is refused with the error the model names, and the refusal names the member. * test(paymentcryptography): the card operations' members are covered Seven members the card operations read were read by no test, so nothing proved they work: the response attributes and the response code, the card status update and the proprietary data, the track data, the unpredictable number and the validation data length. Each is sent now, and the shape the service receives with them is exercised. The response value is made by both ARPC methods, and a request that asks for none is answered without one. * test(paymentcryptography): the padding type is refused The padding type belongs to RSA, and the symmetric cipher does not pad, so a request that names one is refused rather than answered with a cipher that ignored it. Nothing sent one, so the refusal was never exercised. * fix(paymentcryptography): the wrapped key is refused on every operation that carries one The encrypt, decrypt and re-encrypt requests hold a wrapped key for the key exchange, and the unwrapping is part of that exchange rather than part of the cipher. A request that carries one is refused, as the PIN operations already refused it, rather than answered as if the key were a fixed one. The rule now lives in one place, so the two paths cannot disagree on it. * fix(paymentcryptography): the master key is derived over the rightmost sixteen digits The block the ICC master key is derived over is the rightmost sixteen digits of the account number and the PAN sequence number, padded on the left with zeros when they are shorter. That is the rule EMV 4.4 Book 2 Annex A1.4.1 gives for Option A, and the Visa Integrated Circuit Card Specification states it the same way. An account number of twelve digits is therefore read and derived from, where the derivation used to refuse it, and the refusal in the request layer goes with it. A derivation the request cannot be read for is refused with the error the model names, rather than answered with a failure the caller cannot catch. * test(paymentcryptography): the derivations are the ones the specifications give The vectors are the ones the specifications publish: the ICC master key from the EMV Option A derivation, the MasterCard proprietary session key and the application cryptogram it produces over the same data from the M/Chip worked example, and the common session key from the same document. The common session key is compared with the parity bits masked, because the document does not force the parity of the derived key and the derivation does not affect the computation. * fix(paymentcryptography): the dynamic value is the one Visa describes The Visa Contactless Payment Specification gives the dynamic card verification value in full: the leftmost four digits of the account number are replaced by the transaction counter, and the result, the expiry and the service code are enciphered under the card's unique derived key, which the issuer derives from the master key with the account number and the PAN sequence number. The three leftmost decimal digits of the result are the value. The derivation used a session key and covered the account number as it stands, so it was the emulator's own construction and not the value Visa describes. The key it needs is the one the unique derived key derivation already makes, and the request carries the PAN sequence number that derivation takes. The counter is a binary coded decimal counter, so a counter that is not one is refused rather than read. * docs(paymentcryptography): the dynamic code is the emulator's one * fix(paymentcryptography): the card value carries the length asked for The model states the length of a card validation value as three to five, and the service refused every length but three. The value now carries the number of digits the request asks for, and the verification compares as many. The dynamic value's counter is a binary coded decimal counter, so the digits that replace the leftmost ones of the account number are zero padded on the left to the four the field holds. * fix(paymentcryptography): the card values and cryptograms as specified The review of the branch found that the card values and the authorization cryptograms did not follow the rules they are made by. The Option B master key derivation turned the hexadecimal digits of the hash into digits as it scanned them. The specification takes the decimal digits of the hash first and only then the nibbles that are not decimal digits, each reduced modulo ten, so the derivation now follows it. The transaction data reaches the service already padded, because the caller pads it the way the card padded it before the card enciphered it. The service was padding it a second time, which enciphered a block the card never enciphered. The data is enciphered as it was sent now, and a length that is not a whole number of eight-byte blocks is refused, because the ISO 9797-1 MAC runs over whole blocks. The key table names the application cryptogram usage, the TDES_2KEY algorithm and the DeriveKey mode of use for the ARQC key, so a key of another usage, another algorithm or without the mode of use is refused. The rules are asked in one place now, so the card operations and the cryptogram operations cannot drift apart on what they accept. The response value of the second issuer authentication method is made of the card status update and the proprietary data, as the specification has it. The response code belongs to the first method. The EMV 4.1 tree derivation and the dynamic card verification code are refused rather than approximated: the first is proprietary, and the second was the emulator's own construction. A verification that fails carries the reason the model names, and a key that is not there is answered with a 404. * refactor(paymentcryptography): the model settles the card value's length The card operations refused a validation data length that was not three to five digits, and a validation data that was not, while the model states both. The model is checked before the operation runs, so the two checks never reached the point where they could answer, and the model answers the same request with the same error. The checks are gone, and the model's own constraints have a test each, so the refusal is proved. The class comment of EmvCrypto said the ARQC is made over the CDOL, and it is made over the transaction data as the caller sent it, so the comment says that now. * refactor(paymentcryptography): the card side reads the shared helpers The review found the card side holding copies of what the service already holds, and the comments around them out of date. The card operations read the request members through PaymentCryptographyAttributes now, the same as the cryptogram operations, instead of carrying their own text and soleVariant. They read the key's material through PaymentCryptographyKeyRules.materialHex as well. A key read back after a restart holds no material, and the shared rule says so, where the raw accessor gave a null that the derivation failed on. The refused dynamic card verification code left its branch in the computation and the track data and unpredictable number fields behind, and the two-argument retailMac had no callers. They are gone. The comments are in step with the code now: the class comment of the cryptogram operations no longer calls the EMV 2000 derivation the common one, the comment on the second issuer authentication method no longer carries the response code in its input, and the class comment of EmvCrypto no longer names OpenSSL or the original engine. |
||
|
|
13640785a9 |
feat(signer): serve the Signer control plane for profiles, permissions and job records (#7680)
Signer was the last control plane Floci's CloudFormation provisioner stubbed: SignerCfnProvisioner recorded only the identifiers a template handed it, with a comment saying Floci has no Signer API. This serves the API, so an SDK, the CLI or a stack sees the profile it actually created. Cancellation keeps the profile, as AWS does: it stays readable through GetSigningProfile with the same ARN and version and the status Canceled, it stops accepting jobs, and ListSigningProfiles hides it unless includeCanceled is set or statuses names Canceled. A PutSigningProfile on the same name brings it back as a new active version. A signing job fails by default, and says why. Nothing on this machine signs the artifact, so a succeeded job would advertise a signedObject key that does not exist and every download of it would fail; the job instead completes as Failed with a statusReason naming the object that was not written, and RevokeSignature refuses it because there is no signature to revoke. Metadata-only callers can set floci.services.signer.mock-signing-jobs=true, which records jobs as succeeded and is documented as a mock rather than as AWS behaviour. Signer routes collide with S3's path-style ones, so a request signed for the signer scope is rewritten onto an internal prefix before matching. That rewrite used to happen before IAM resolved the action from the path, which left every Signer call unchecked; IamActionRegistry now strips the internal prefix the signing service owns, and SignerIamEnforcementIntegrationTest proves a key with no policy is refused while one with signer:* is allowed. Co-authored-by: David Guardiola <davidguardiola@gmail.com> |
||
|
|
3701d4d041 | feat(ec2-instance-connect): SendSSHPublicKey, verified by the unmodified AWS agent (#7473) | ||
|
|
6130fe9568 | feat(paymentcryptography): the PIN operations (#7397) | ||
|
|
4617e4a4f8 |
feat(paymentcryptography): the data plane as a service of its own (#7396)
* feat(paymentcryptography): the data plane as a service of its own docs(paymentcryptography): the data plane has a page of its own fix(paymentcryptography): a MAC under a three-key Triple DES key is computed test(paymentcryptography): a key of another purpose does not encrypt data feat(paymentcryptography): the data plane's IAM is generated fix(paymentcryptography): a DUKPT MAC needs a base derivation key fix(paymentcryptography): a key whose material is not held is refused docs(paymentcryptography): the data plane's example runs test(paymentcryptography): the data plane through the AWS SDK test(paymentcryptography): the data plane through the AWS CLI fix(paymentcryptography): the CLI test removes the keys it makes docs(compat): the AWS CLI suite names the data plane test(paymentcryptography): the route is read as the registry reads it test(paymentcryptography): the request names its method and its URI fix(paymentcryptography): the cipher pads no data fix(paymentcryptography): the data plane takes the service scope fix(paymentcryptography): a MAC length that is not a number is refused docs(paymentcryptography): the data plane says the cipher pads no data fix(paymentcryptography): the data plane ciphers with Triple DES as well fix(paymentcryptography): the scope alias names the model's scope fix(paymentcryptography): the Triple DES cipher is BouncyCastle's fix(paymentcryptography): the usage and the blob keep their comments fix(paymentcryptography): a key's family is read from its algorithm fix(paymentcryptography): the cipher reads the vector through one helper test(paymentcryptography): the keys are built by one builder fix(paymentcryptography): the data plane checks the model's rules fix(paymentcryptography): the Triple DES check value is BouncyCastle's fix(paymentcryptography): the SDK names it TDES_2_KEY docs(contributing): the ciphers come from BouncyCastle refactor(paymentcryptography): the model owns the request shapes refactor(paymentcryptography): the ciphers are BouncyCastle's test(compat): one helper makes a key of either algorithm docs(contributing): the cipher rule comes out fix(paymentcryptography): the refusals are the model's refactor(paymentcryptography): the ciphers are one helper each refactor(paymentcryptography): the generators share the helper docs(paymentcryptography): the javadocs name both ciphers test(aws): the moved constants read from the shared helper fix(paymentcryptography): the deprecated cipher constructors go chore(paymentcryptography): the duplicate import goes test(paymentcryptography): the DUKPT vectors the standard publishes fix(paymentcryptography): the DUKPT refusal is the derivation's docs(paymentcryptography): the retail MAC is over a double-length key fix(paymentcryptography): the ISO 9797-1 MAC pads only a partial block refactor(paymentcryptography): the refusals the model already makes chore(aws): the routes are generated from the models again * chore(aws): the IAM resources are generated again |
||
|
|
f8670f64fb |
feat(quicksight): add metadata APIs and limited registered-user embedding (#7529)
Closes #7522 Origin comparisons preserved host casing and default ports, CSP named only the immediate parent, and expired sessions remained in storage indefinitely. Normalize both sides of origin checks, allow all configured ancestors, and reap expired sessions across accounts with the shared sweep worker. |
||
|
|
d280f451fa | fix(cloudformation): roll back an AWS::EC2::SecurityGroup updated in place (#7562) | ||
|
|
cfbf86b8a1 | fix(cloudformation): keep tags added outside the stack on EC2 VPCs, security groups and instances (#7534) | ||
|
|
b35e51374c | feat(cloudformation): provision signing profiles and code signing configs (#7546) | ||
|
|
dbbf22957f | fix(cloudformation): apply an AWS::EC2::FlowLog's Tags (#7490) | ||
|
|
8b756a3467 |
fix(cloudformation): apply KinesisStreamSpecification on AWS::DynamoDB::Table (#7464)
* fix(cloudformation): apply KinesisStreamSpecification on AWS::DynamoDB::Table The property was accepted and ignored, so a stack that declared it got a table whose item changes never reached the stream. The declared stream becomes the table's active Kinesis streaming destination on create and update. Removing a block the previous template declared turns it off, and a stack that never declared it leaves destinations set outside it alone. The in-place update snapshot of a stack that manages the destinations records them, so a failed update puts them back as they were. A change of ApproximateCreationDateTimePrecision alone updates the active destination in place, as CloudFormation does with one UpdateKinesisStreamingDestination call, so forwarding never stops and records already captured are still delivered. A block that is not an object fails template validation, as TimeToLiveSpecification does, rather than reading as a removed block that turns forwarding off. A StreamArn the destination cannot use fails the table as the AWS handler does, and the table this attempt created is deleted. One under 37 characters fails EnableKinesisStreamingDestination's validation. One that is not a Kinesis stream ARN, such as the stream name Ref returns, or one naming a stream that does not exist fails as NotStabilized. DynamoDbTableAccess gains enable, disable and update operations for the destination. DynamoDB Local has no Kinesis forwarding, so that backend leaves the table as it is and logs a warning. CloudFormation still checks StreamArn there as AWS does; only the forwarding is skipped. * fix(cloudformation): match Kinesis destinations by their whole stream ARN A destination was looked up by the last segment of its StreamArn in the table's account and region, so an ARN for another account, region or resource type that ended in a local stream's name forwarded to that stream. KinesisService.describeStreamByArn now finds a stream only by its exact ARN. NativeDynamoDbTableService uses it, so the public EnableKinesisStreamingDestination action reports such an ARN as not found, and CloudFormation fails the table as NotStabilized. The DynamoDB Local backend looks the stream up the same way before it skips forwarding, so a template naming a missing stream fails there too. A declared StreamArn the table already forwards to now goes through the same template checks as a new one; only the rollback restore skips them. |
||
|
|
4ba9a55a3a | feat(cloudformation): provision event bus v2 and subscriber (#7260) | ||
|
|
fbfe9048a1 |
fix(ec2): support NAT gateway secondary addresses (#7327)
* fix(ec2): support NAT gateway secondary addresses * fix(ec2): update a NAT gateway's secondary addresses in place A CloudFormation update that changed only a NAT gateway's Secondary* properties replaced the gateway. The replacement was created while the old gateway still held its Elastic IP or fixed private address, so it came back failed with Resource.AlreadyAssociated (or InvalidIPAddress.InUse) and the update failed. The schema does not mark the secondaries create-only, so AWS changes them in place and the gateway keeps its id. Ec2Service.updateNatGatewaySecondaryAddresses sets a gateway's secondaries to the requested ones: kept ones stay, dropped Elastic IPs are handed back, new ones are checked as CreateNatGateway checks them, and every check runs before anything changes. The provisioner calls it instead of replacing, and records the prior secondaries so a rolled-back update puts them back. * fix(ec2): keep a NAT gateway's picked secondary when listed ones change The counted slots of an in-place secondary update kept the first secondary with no Elastic IP and an address the request does not list. With SecondaryPrivateIpAddresses [A] and a count of 1 changed to [B] and 1, that was the dropped listed A, while the address the subnet had picked was given up. Counted addresses always follow the listed ones, so the counted slots now keep the last such secondaries, in order. Tests cover a count changed in place (an unrelated change keeps the same addresses; 1 to 2 keeps the first; 2 to 1 keeps one of them), the picked address surviving a listed change, and secondary Elastic IPs swapped between listed addresses or moved to a new one, with DescribeAddresses showing each held at its new address. * test(ec2): pin which counted NAT gateway secondary an update keeps The counted slots keep the last unlisted secondaries, so a count lowered from 2 to 1 keeps the second address; the test now asserts that, and that raising the count from 1 to 2 adds a new address in the subnet after the kept one. The comment no longer claims counted addresses always follow the listed ones: slot position is the only record of an address's origin, and across updates a once-listed address can move behind a picked one. * fix(ec2): read a NAT gateway under the allocation lock before updating its secondaries The secondary-address update read the gateway before taking the lock that DeleteNatGateway holds. A delete finishing in between left the update holding a stale copy, which it then wrote back, re-associating the Elastic IPs the delete had released and overwriting the association of a gateway that had since taken the primary one. The gateway is now read again under the lock, and one that is gone or deleted is refused with NatGatewayNotFound. * test(cloudformation): read NAT gateway addresses through XmlParser The secondary-address tests picked addresses out of DescribeNatGateways and DescribeAddresses with a regular expression and substring checks that depended on element order. They now select the non-primary items of natGatewayAddressSet through XmlParser. * test(ec2): cover a NAT gateway stored as deleted by a racing tag write CreateTags writes a NAT gateway back under the gateway's tag lock, which DeleteNatGateway does not take. A tag write that read the gateway before a delete therefore stores the very record the delete marked deleted, so the secondary-address update's deleted-state check is reachable. The test pauses the tag write's put, deletes the gateway, lets the put finish, and asserts the update refuses the record with NatGatewayNotFound and holds no Elastic IP for it. * refactor(ec2): fill a NAT gateway's address slots in one place CreateNatGateway and the secondary-address update each walked the gateway's slots the same way: take the listed Elastic IP and address at each position, assign a free address where none is listed, build the address, and give back what was assigned if a later slot fails. Both now call fillNatGatewaySlots. Create passes its primary address as slot 0 and marks it primary afterwards; the update passes the slots its kept secondaries already fill. The order addresses are assigned in, the error codes and the release on failure are unchanged. * test(ec2): cover NAT gateway lease release and reuse the shared test helpers No test covered the lease a NAT gateway gives back when its addresses run out part way, so the shared slot-filling walk could lose its release with every test green. Two tests now run a /28 subnet out of addresses, one through CreateNatGateway and one through a secondary-address update, and verify the lease taken on the VPC network is released and that the update leaves the gateway as it was. The concurrent-delete test now builds its service with mockModeService() and waits for the blocked update with ThreadStates.awaitBlockedOrDone. * test(ec2): build the small NAT subnet with privateSubnet |
||
|
|
3308ea2f1c | feat(logs): add vended log delivery sources, destinations and deliveries (#7411) | ||
|
|
2e47b9c571 |
feat(bedrock-agentcore): add the harness control plane (#7387)
* feat(bedrock-agentcore): add the harness control plane CreateHarness, GetHarness, UpdateHarness, DeleteHarness, ListHarnesses and ListHarnessVersions were unknown, so aws_bedrockagentcore_harness could not be created. Harnesses are stored per Region with a name-<10 alphanumerics> id and settle in READY at once. Each update appends an immutable version, and members a create leaves out take the defaults AWS fills in, including an AgentCore Runtime environment named harness_<name>. Tags work on harness ARNs through the shared /tags route. InvokeHarness moves into the new /harnesses controller unchanged: a request is matched against one root resource class, so the data-plane controller rooted at / would no longer see /harnesses/invoke. * fix(bedrock-agentcore): match a harness role ARN with AwsArnUtils.PARTITION_REGEX * fix(bedrock-agentcore): serve InvokeHarness from a data-plane class of its own InvokeHarness sat in the control plane's /harnesses controller, so it inherited its JSON-only @Produces (an Accept: application/vnd.amazon.eventstream request was refused with 406) and was gated by no service flag, since the controller was missing from ResolvedServiceCatalog. It now has its own class rooted at /harnesses/invoke, the more specific root, registered with the data plane, and the harness controller is registered with the control plane. * refactor(bedrock-agentcore): share one random id suffix helper The harness registry, and the memory, tools and gateway services before it, each carried their own copy of the alphanumeric alphabet and the random suffix builder. One random(alphabet, length) and randomAlphanumeric(length) in BedrockAgentCoreControllerSupport now serve all four; the gateway keeps its lowercase alphabet for gateway ids. |
||
|
|
d0747f26d1 | feat(cloudformation): provision Cognito user pool identity providers (#7350) | ||
|
|
404936e004 |
docs(cloudfront): add a runnable private S3 origin example (#7005)
* docs(cloudfront): add a runnable private S3 origin example * docs(cloudfront): keep the private origin example's cleanup running Set the CLI output format so a text or table default cannot break jq and leave a distribution behind. Guard the cleanup steps that could stop it under set -e, including the empty distribution list on Bash before 4.4. Move the guide's pointer from Supported Operations to CLI Examples. |
||
|
|
6906759c9a | feat(paymentcryptography): the Payment Cryptography control plane (#7090) | ||
|
|
dfaab8ba4c | feat(eventbridgev2): add EventBridge V2 service (#6962) | ||
|
|
be315bf160 |
feat(cloudformation): provision AWS::EC2::KeyPair with its private key in Parameter Store (#7128)
* feat(cloudformation): provision AWS::EC2::KeyPair with its private key in Parameter Store AWS::EC2::KeyPair had no provisioner, so a stack stubbed it: the stack reached CREATE_COMPLETE without creating a key, Ref returned a made-up id and Fn::GetAtt returned the literal "Key.KeyPairId". A template that creates a key pair for an instance, as the AWS::EC2::KeyPair reference shows, got nothing to log in with. The new provisioner does what that reference describes: - Without PublicKeyMaterial it calls CreateKeyPair with the template's KeyType and KeyFormat, so rsa and ed25519 keys and pem and ppk files all work, and stores the private key in the SecureString parameter /ec2/keypair/<KeyPairId>. With PublicKeyMaterial it imports the key, takes the key's type from the material (KeyType is ignored, as documented) and writes no parameter. - Ref is the key name; Fn::GetAtt KeyPairId and KeyFingerprint are the key's own. - Tags are applied once the key exists and the parameter is written last, so a step that fails leaves only the key to undo. Deleting a created key deletes its parameter first, on stack delete, rollback and replacement cleanup alike; a key or parameter already gone counts as deleted. A key is deleted by its name, as Cloud Control's DeleteResource names it; a key deleted outside the stack still has its parameter deleted with the stack. - Only AWS::NoValue leaves a property out; an empty string a parameter supplies is a value, as the same string written literally is. An empty PublicKeyMaterial fails with the MissingParameter error ImportKeyPair gives for it. - Every property is create-only (the registry schema has no update handler) and KeyName is required. An update that changes another property under the same name is refused with CloudFormation's custom-named replacement error. A rename creates the new key, then deletes the old one with its parameter once the update commits, or deletes the new one if the update rolls back. The create-only list is added to create-only-properties.json, so a change set reports a changed name or type as a replacement, and the generated resource-type table lists KeyPair. Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com> * fix(cloudformation): delete orphaned key pair parameters on cleanup Replacement cleanup and rollback delete a displaced or rolled-back AWS::EC2::KeyPair by name only. When that key had already been deleted outside the stack, its /ec2/keypair/<KeyPairId> SecureString parameter was left behind. Record the id of each created key the resource still owes a delete, keyed by name, so the cleanup, the rollback and a rollback retry also delete that key's parameter. Imported keys have no parameter and are not recorded. Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com> * fix(cloudformation): end a key pair's rollback retry when an update starts A rollback that could not delete a renamed key pair's replacement leaves it owed for ContinueUpdateRollback. Once that skipped the resource, a later update that failed before creating anything rolled back by retrying that old delete instead of undoing itself, and could end in UPDATE_ROLLBACK_FAILED. Call ReplacementCleanup.endRollbackRetry as an update starts, as the other replacing provisioners do. The replacement stays listed, so the next committed update or the stack delete still removes it. Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com> * test(cloudformation): say the rollback retry test pins a helper contract The test added with the endRollbackRetry call rolls back the same resource whose update failed. The engine does not do that for a key pair today: it restores the previous resource and skips its rollback, so the earlier commit's UPDATE_ROLLBACK_FAILED scenario is not reachable yet. Say that the test pins the ReplacementCleanup contract instead. Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com> * fix(cloudformation): clean up partial KeyPair parameter writes * refactor(cloudformation): share KeyPair create-only tracking --------- Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com> |
||
|
|
f0a1b11385 |
fix(cloudformation): keep SMS_MFA on a user pool update until MFA is turned off (#7088)
* fix(cloudformation): keep SMS_MFA on a user pool update until MFA is turned off The AWS::Cognito::UserPool reference says that once SMS_MFA is enabled, only MfaConfiguration OFF turns it off. An update that stopped listing SMS_MFA in EnabledMfas cleared it. replaceUserPoolMfaConfig now keeps the pool's SMS setting when none is given and the mode is not OFF. Closes #7086 * fix(cognito): keep SMS MFA with the pool's current SMS settings Keeping SMS MFA replayed the settings it was enabled with, so an update that dropped SMS_MFA and changed SmsAuthenticationMessage or SmsConfiguration put the old values back over the ones updateUserPool had just applied. The kept SMS MFA now takes the pool's current message and SMS configuration. |
||
|
|
dcf8ec7430 |
fix(ec2): report NAT gateways as zonal and honor PrivateIpAddress (#7059)
* fix(ec2): report NAT gateways as zonal and honor PrivateIpAddress The Terraform AWS provider reads network_interface_id, private_ip and public_ip from a NAT gateway only when it is reported with availabilityMode zonal. Floci never sent availabilityMode, so all three stayed null. Every gateway Floci creates sits in one subnet, so the responses now say zonal. Floci has no regional NAT gateways. A regional request that named only its VPC failed on the missing subnet, and one that also named a subnet got a zonal gateway, through both CreateNatGateway and AWS::EC2::NatGateway. Both now refuse AvailabilityMode regional with UnsupportedOperation. Any other value except zonal, such as Regional, fails with InvalidParameterValue instead of creating a zonal gateway. Once Terraform reads private_ip back, the gateway has to hold the address it was asked for. private_ip forces a new gateway, and CreateNatGateway ignored PrivateIpAddress, so a config that set it would plan a replacement on every run. CreateNatGateway and AWS::EC2::NatGateway now give the gateway's interface the requested address, checked by the same rules as RunInstances: inside the subnet, not reserved and not in use. A changed PrivateIpAddress replaces the CloudFormation resource, as it is createOnly. A gateway has its primary address only, so SecondaryAllocationIds, SecondaryPrivateIpAddresses and SecondaryPrivateIpAddressCount are refused with UnsupportedOperation instead of being dropped. AWS::EC2::NatGateway also sets EniId, the gateway's primary interface, which Fn::GetAtt resolved to the literal "Nat.EniId" although the gateway has had a real interface since #5622. Closes #6767 * fix(ec2): take no VPC network lease for a NAT gateway's requested address DeleteNatGateway never returns a lease, so the one CreateNatGateway took for its PrivateIpAddress kept the address from automatic allocation after the gateway was gone. Check that the address is free the way CreateNetworkInterface does, without the lease; automatic allocation already steps around addresses a stored NAT gateway holds. Ec2NatGatewayAddressIntegrationTest now sends its requests through the shared Ec2Requests.ec2 instead of its own copy. |
||
|
|
ebdac90574 |
fix(cloudformation): apply EnabledMfas on AWS::Cognito::UserPool (#7046)
* fix(cloudformation): apply EnabledMfas on AWS::Cognito::UserPool * docs(cloudformation): move the EnabledMfas note to the resource-type table source * fix(cloudformation): drop the MFA factors EnabledMfas no longer lists on update * fix(cognito): apply EnabledMfas mode and factors in one write * fix(cloudformation): roll back EnabledMfas with the rest of the user pool * fix(cognito): serialize whole-pool writes behind a per-pool lock replaceUserPoolMfaConfig stores a copy of the pool, so a TagResource that landed between the copy and the write was lost. Tag and untag locked the pool instance, which the copy replaces, so they did not exclude it. Every write that reads a pool and stores it back whole now holds a lock keyed by the pool id and reads the pool inside it. |
||
|
|
f48c3a9c01 | feat(cloudformation): provision SES receipt rules (#7040) | ||
|
|
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. |