Floci had no emr-containers service, so Airflow's EmrContainerOperator, the
aws emr-containers CLI and the SDKs had nothing to call. This adds its 25
operations: virtual clusters, job runs, job templates, managed endpoints,
security configurations and tags.
Job runs follow the job run states without running Spark on Kubernetes: a
run completes as soon as it is submitted, or after
floci.services.emrcontainers.job-run-duration-seconds. When Floci's EKS has
no cluster of the virtual cluster's container provider id, the run is FAILED
with "Cluster <id> does not exist." and CLUSTER_UNAVAILABLE, as AWS's "Common
errors when running jobs" page gives it; that page also gives the wording for
a job run on a missing or non-RUNNING virtual cluster. A job template's
${name} placeholders are filled from jobTemplateParameters or the parameter's
default. Deleting a virtual cluster clears its tags, as the development guide
says, only resources in an active state of the request's Region take tags,
and a job run's template and request tags together keep the 50-tag limit. A
virtual cluster created on an EKS cluster whose authenticationMode admits
access entries is access entry integrated, which ListVirtualClusters'
eksAccessEntryIntegrated filters on.
Every request is checked against botocore's emr-containers constraints,
vendored by tools/aws/regen_emr_containers_shapes.py and gated by make
aws-data-check. Routes sit under a signed-service prefix, so a path-style S3
request for a bucket named virtualclusters still reaches S3. The routes are
added to IAM's REST route table, and emr-containers to the IAM generators'
namespaces, so each operation is checked on the resource its path names,
StartJobRun and CreateManagedEndpoint need iam:PassRole on their
executionRoleArn, and the create operations need emr-containers:TagResource
for their tags, all from AWS's Service Reference.
CloudFormation now provisions AWS::ElastiCache::ReplicationGroup instead
of completing the stack with no cache behind it. The group is created
through the ElastiCache service, Ref returns its id, and Fn::GetAtt
exposes the configuration endpoint for a cluster-mode group or the
primary, reader and per-node read endpoints otherwise. A create-only
change replaces the group, an explicit ReplicationGroupId that stays the
same is refused, and an update that reuses the group warns only about the
properties it ignores.
Optional booleans in the ElastiCache, IoT authorizer, API Gateway API key
and StackSet provisioners are read through
ProvisionContext.resolveOptionalBoolean, which refuses a value that is
neither true nor false instead of reading it as false.
Closes#8447
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.
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
* 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.
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>
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
* 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.
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>
* 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
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.
* 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.
* 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
* 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.
* 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.
* 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>
* 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.
* fix(ec2): report NAT gateways as zonal and honor PrivateIpAddress
The Terraform AWS provider reads network_interface_id, private_ip and
public_ip from a NAT gateway only when it is reported with
availabilityMode zonal. Floci never sent availabilityMode, so all three
stayed null. Every gateway Floci creates sits in one subnet, so the
responses now say zonal.
Floci has no regional NAT gateways. A regional request that named only
its VPC failed on the missing subnet, and one that also named a subnet
got a zonal gateway, through both CreateNatGateway and
AWS::EC2::NatGateway. Both now refuse AvailabilityMode regional with
UnsupportedOperation. Any other value except zonal, such as Regional,
fails with InvalidParameterValue instead of creating a zonal gateway.
Once Terraform reads private_ip back, the gateway has to hold the
address it was asked for. private_ip forces a new gateway, and
CreateNatGateway ignored PrivateIpAddress, so a config that set it
would plan a replacement on every run. CreateNatGateway and
AWS::EC2::NatGateway now give the gateway's interface the requested
address, checked by the same rules as RunInstances: inside the subnet,
not reserved and not in use. A changed PrivateIpAddress replaces the
CloudFormation resource, as it is createOnly. A gateway has its primary
address only, so SecondaryAllocationIds, SecondaryPrivateIpAddresses
and SecondaryPrivateIpAddressCount are refused with
UnsupportedOperation instead of being dropped.
AWS::EC2::NatGateway also sets EniId, the gateway's primary interface,
which Fn::GetAtt resolved to the literal "Nat.EniId" although the
gateway has had a real interface since #5622.
Closes#6767
* fix(ec2): take no VPC network lease for a NAT gateway's requested address
DeleteNatGateway never returns a lease, so the one CreateNatGateway took
for its PrivateIpAddress kept the address from automatic allocation
after the gateway was gone. Check that the address is free the way
CreateNetworkInterface does, without the lease; automatic allocation
already steps around addresses a stored NAT gateway holds.
Ec2NatGatewayAddressIntegrationTest now sends its requests through the
shared Ec2Requests.ec2 instead of its own copy.
* fix(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.
* 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.
* 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.
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>
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>
* 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>
* 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.
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.
* 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.
* 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.