The request-resources generator stated facts by hand in two places:
MEASURED, what AWS checks where neither botocore nor the Service
Reference says it, and FORWARDED, added by #8309 for the Redshift and
Redshift Serverless restores asking KMS to decrypt with the snapshot's
key. The Redshift Management Guide sentences that entry cites are
MEASURED evidence, so the two restore entries are now MEASURED entries
naming another action AWS checks the caller for ({"action", "of"}),
admitted under the checks FORWARDED had, and FORWARDED is gone. MEASURED
is again the only hand-stated part of the file. The generated table,
the enforcement and the restore check are unchanged.
The table is also regenerated from today's Service Reference, which
added Glue's dataQualityEvaluationConfig and Lambda's runtime,
runtimeAlias and runtimeVersion resource types.
EMR's primary node runs one (a release's mapred-site classification
"Restarts Hadoop MapReduce-HistoryServer"); Floci's did not, so a
client asking about a MapReduce job whose application master had ended,
for its counters or task reports, waited about 30 seconds a call on
0.0.0.0:10020 and got nothing. Pig asks after each of its MapReduce
jobs, so #8636 turned its task reports off and gave its client one try.
A cluster that runs YARN now starts `mapred historyserver` beside the
ResourceManager, on Hadoop's own ports and where HDFS listens, from the
jobs' history in the cluster's HDFS, and its primary node is ready once
the server answers. A step's MapReduce settings name it, and so do a
Hive step's, for a query run on MapReduce; an emr-spark-* node runs it
from the Hadoop it keeps apart. The node scripts' readiness waits share
one helper. Pig's
workaround goes: its MapReduce jobs' counters come from the server, as
on EMR.
CreateAssociation now resolves a document ARN in another account to that account's document when its owner shared it with the caller through ModifyDocumentPermission, and answers InvalidDocument for one that is not shared, is of another partition or does not exist. UpdateAssociation checks a new DocumentVersion through the same lookup. With IAM enforcement on, reachedInItsAccount has the request checked on the owner's document ARN alone, so the caller's identity policy must allow that ARN.
Closes#8364
EMR security configurations, ElastiCache cache parameter groups and Glue Schema Registry registries and schemas are now stored under their Region, so each is listed and reached only in the Region it was created in, and its name is free in other Regions. Another Region's resource answers the error each service already gives for one that does not exist, and each Region gets its own default Glue registry.
Records stored before move at startup, in every account: to the Region their ARN names, or to the default Region, with a copy in each other Region whose clusters or replication groups name one, through the new AccountAwareStorageBackend.migrateLegacyEntriesToRegions. A Glue schema stored in another Region than its registry gets a copy of that registry there.
Part of #8218.
No AWS image carries Pig, so a Pig step failed without running. With
floci.services.emr.pig.enabled on (off by default), a docker cluster
whose Applications name Pig gets Apache Pig 0.18.0 in its image:
downloaded to a temporary file from the first of
floci.services.emr.pig.urls that gives it whole with the checksum
floci.services.emr.pig.sha256 names (a URL that fails, stalls for a
minute or gives another checksum passes to the next), then streamed
into /usr/lib/pig as EmrReleaseImages makes the image, with Tez from
the release's Hive image and a /usr/bin/pig that EMR's own pig-script
runs.
Pig runs on the image's Tez, its bundled Tez and protobuf 3 left out,
on the cluster's YARN or in local mode, with exectype=tez, a working
directory without a scheme, which S3A takes, and no task reports and
one try for counters from the MapReduce JobHistory server the cluster
does not run, then the cluster's tez-site and pig-properties, in a
pig.properties of the step's own; pig-log4j and pig-env reach Pig too. A command step's new
tez-site.xml shares Hive's Tez-on-YARN settings.
Without the setting, a Pig step on a cluster that installs Pig still
fails without running, its message naming the setting; on one that
does not, EMR's pig-script says "Pig isn't installed." as on EMR.
deleteClusterParameterGroup and deleteClusterSubnetGroup now read and delete the group under the service's lock (mutate), which modifyClusterParameterGroup, resetClusterParameterGroup and modifyClusterSubnetGroup hold from their read to their write. A delete can no longer answer success between a modify's read and its write and have that write put the group back. The parameter group's deletion event is still emitted after the lock.
ModifyDBSnapshot refused a request naming neither EngineVersion nor
OptionGroupName with InvalidParameterCombination, "At least one snapshot
attribute must be specified.", a message AWS does not use. The model
requires only DBSnapshotIdentifier, and neither the API reference nor the
User Guide's snapshot upgrade pages tie any error to a request with nothing
to change, so such a request now returns the snapshot unchanged. A missing
snapshot and one that is not available are still refused as before.
The RDS docs record this as Floci's reading of an undocumented case.
Closes#4083
EmrHiveStepsDockerIntegrationTest prepares the emr-7.5.0 Hive release image once, in a @BeforeAll bounded at six minutes, through EmrService.releaseImage (now package-private), and releases its lease. The first Hive scenario no longer pays the image composition inside its two-minute method limit, which made it time out on slower runners.
Closes#7929
On AWS a function's Hyperplane network interfaces sit in the subnets
its VpcConfig names, and EC2 refuses DeleteSubnet, and so DeleteVpc,
while one is there. Floci's Lambda never told EC2 a function used a
subnet, so DeleteSubnet succeeded under a VPC-configured function and
left it naming a subnet that was gone.
- LambdaService is a VpcDependencyProvider: a function of the caller's
account, or a published version of one, holds each subnet its
VpcConfig names and the VPC it is configured in
(LambdaFunctionStore.listWithVersionsForAccount, which also reads a
record stored before accounts were kept apart, unprefixed until it
is next read).
- CreateFunction and UpdateFunctionConfiguration save a function that
names subnets under EC2's subnet lock, so a DeleteSubnet either sees
it or runs before it is stored. A VpcConfig the request set is
resolved again under the lock, so a subnet deleted since the request
was validated is unknown, as one never created is, and the function
infers no VPC from it.
ECS awsvpc tasks already hold their subnet through the network
interface each task is given, which DeleteSubnet counts.
LambdaVpcResourceValidationIntegrationTest has DeleteSubnet refused
under a function, then under its published version once $LATEST moves
to another subnet, and allowed once the version is deleted, and a
subnet deleted while a function is created leaves it no inferred VPC.
LambdaFunctionStoreAccountScopeTest covers the unprefixed record.
ec2.md and lambda.md say so.
The generated request resources give DynamoDB's table, index and stream
types aws:ResourceTag/ keys, but DynamoDB had no StoredResourceArns, so
a condition on a table's tags saw none. DynamoDbStoredResourceArns now
answers from the selected backend: the native one reads the table
stored under the ARN in the account and Region it names, a
pre-multi-account one of the default account in place, matched on the
whole ARN; the DynamoDB Local one reads the tags Floci records for it
while DynamoDB Local still has the table. An index ARN gets its table's
tags when the table holds that index; a stream ARN gets none. Native tag
writes, CreateTable's included, now replace the map whole under one
lock, keeping tags already put, and the field is volatile.
Enabling an MFA device recorded state and changed nothing.
aws:MultiFactorAuthPresent and aws:MultiFactorAuthAge reached no request, so a
policy conditioned on either could not behave as it does on AWS, and
GetSessionToken and AssumeRole accepted SerialNumber and TokenCode and ignored
both, so no session could satisfy such a condition in the first place.
Both keys are published now from the credentials a request was signed with,
which is where the guide puts their availability: a long-term key carries
neither, and a session carries the first one, true only where a device was
used. A federated-user session carries neither, the guide putting federated
identities with the long-term keys. They are written by the one writer that
already says who is calling, so the enforcement filter, the per-resource and
per-item contexts, trust policies and the paths that evaluate a policy
themselves all see them at once.
The two STS operations hold a presented code to the seed of the device its
serial names, require that device to be enabled for the signing identity, and
spend the step it matched, since RFC 6238 has a verifier refuse the second
attempt of a code for the same time step. A key IAM holds nowhere has its claim
taken as made: there is no identity behind it whose devices could be checked,
and this emulator already reads such a key as acting for itself. A claim that
fails is refused with AccessDenied, the outcome AWS documents.
How far the authentication reaches is AWS's own line. GetSessionToken
credentials "include MFA information", so that session is MFA-authenticated on
its own requests. AssumeRole credentials "do not include MFA information in the
context", and "once the user has assumed the role, no further MFA checks are
made", so the device decides the assume and stops there. The device a call
presents belongs to that request, so both the trust policy and the caller's own
permission to make the call see it; the claim is read once per request and held
on it, a code being spendable only once.
CreateDBInstanceReadReplica now accepts MySQL and MariaDB sources and initialises the replica from a mysqldump or mariadb-dump copy of the source, the same copy CreateDBSnapshot uses. One engine set gates both the replica check and the SupportsReadReplica flag DescribeDBEngineVersions reports.
The copy passes MYSQL_PWD in the exec's environment rather than its command, uploads the dump readable by root only and removes it after the restore, keeps a name containing a newline whole, and replays each SHOW GRANTS row as one statement, so MariaDB's SET DEFAULT ROLE and MySQL's partial revokes restore. Other engines are still refused with InvalidDBInstanceState.
ContainerCaBundle.httpClientBuilder(sslContext) gives the HttpClient builder that trusts Floci's outbound context, or the JVM's default trust when there is none, with hostname verification left on. EventBridge API destinations, SNS HTTP and HTTPS delivery, the API Gateway HTTP proxy and WebSocket integrations start from it and keep their own settings.
The extra-CA trust tests share ExtraCaConfigs for their stubbed TLS config, and ApiGatewayExecuteController.proxyOptions names HttpProxyInvoker.ProxyOptions without its package. No behaviour change.
* fix(redshift): keep two creates of one parameter or subnet group name from both succeeding
* fix(redshift): refuse a taken subnet group name before asking EC2 about its subnets
The generated request resources give Redshift Serverless's namespace,
workgroup, snapshot and recovery point types aws:ResourceTag/ keys, but
RedshiftServerlessService did not answer storedTags, so a condition on
their tags saw none. It now reads the namespace, the workgroup or the
snapshot stored under the ARN in the account and Region it names, a
pre-multi-account one of the default account included, in place,
matched on the whole ARN. A tag change is already stored on a copy, so
the tags read are one whole set.
With security-group enforcement on, the socat publisher was switched
off, so an application port a security group opened was never reachable
from the host. Docker can replace a host client's address (Docker
Desktop shows every client as its gateway), so no rule narrower than the
whole internet can be judged on it.
Host-published access now counts as traffic from outside the VPC: with
enforcement on, a port is published only when an ingress rule opens it
to 0.0.0.0/0, or failing that ::/0, which admit a client whatever
address it arrives with. The sidecar dials the instance through its
protected namespace's helper, on the helper's network: on its IPv4
address, or on its Docker IPv6 address for a port only ::/0 opens, which
is not published on a network without IPv6. A client's family is still
seen on the host, so a port only one family's rule opens binds only that
family's host addresses. A port whose rules move family is republished,
the family is persisted for restore, and a restart brings each running
instance's forwards in line with its current rules. Ports opened after
launch publish and revoking removes them, as with enforcement off; a
port only a narrower CIDR, a prefix list or a group reference opens
stays reachable on the direct container path.
Also brings Ec2ServiceTest's never-allocates check onto the
three-argument allocatePrivateIp that #8598 introduced, which left
main's tests not compiling after #8576.
DsqlEndpoint.recordSession purges the rows of ended sessions from sys.session_identity before recording the new one. At the cluster database's repeatable read, two logins purging the same ended session failed one another with "could not serialize access due to concurrent delete", and the losing login was refused as access denied. The recording connection now runs at read committed, where the second purge passes over the row the first deleted; the record stays one INSERT ... ON CONFLICT keyed by the backend pid, and client sessions keep repeatable read.
DsqlSessionRecordIntegrationTest reproduces it against a Docker-backed cluster.
The generated request resources give Athena's workgroup and data catalog
types aws:ResourceTag/ keys, but AthenaStoredResourceArns did not answer
storedTags, so a condition on their tags saw none. It now answers from
AthenaService.storedTags, which reads the workgroup or the data catalog
stored under the ARN in the account and Region it names, a
pre-multi-account one of the default account in place, matched on the
whole ARN; the built-in primary workgroup and AwsDataCatalog carry none.
The tag lists are volatile, as tagging already replaces a list whole.
* feat(paymentcryptography): the multi-region keys
* fix(paymentcryptography): the multi-region replication refuses what it cannot carry out
* test(compatibility-tests): the multi-region tests leave the account as they found it
* fix(paymentcryptography): the default replication regions are the ones of the region
* test(compatibility-tests): the multi-region tests keep their settings to their own region
* docs(paymentcryptography): what the multi-region replication does
* fix(paymentcryptography): the rules the multi-region replication follows
* chore(paymentcryptography): the shape check settles the type of a list of names
* style(paymentcryptography): the accessor the edit left on one line
* docs(paymentcryptography): the page says what the replication does
* fix(paymentcryptography): the replica answers as the reference answers
* fix(paymentcryptography): a key is replicated within the partition it is in
* style(paymentcryptography): the rules the replication shares are written once
* fix(paymentcryptography): the partition of a region is the one its ARN carries
* style(paymentcryptography): the tests of the service share the key they make
* style(compatibility-tests): the compatibility tests share the key they make
EventBridge Pipes and Lambda event source mappings now build their SQS records through one SqsEventRecordBuilder, the record Lambda already sent. Pipes gains the FIFO attributes SequenceNumber, MessageGroupId and MessageDeduplicationId, md5OfMessageAttributes when present, and a default dataType for message attributes.
A message without a first-receive timestamp takes the Pipes poller's clock instead of wall time, without writing it back to the message. Lambda's record is unchanged.
Signed-off-by: Andre Kurait <akurait@amazon.com>
VpcNetworkManager keyed its VPC bindings, subnets and Docker networks
by Region and id alone, and every account's default VPC and subnets
share one id (vpc-default-<region>), so two accounts' default VPCs
shared one binding, one Docker network and one lease table: EC2
instances, Lambda functions, ECS tasks, EKS nodes and the MWAA,
CodeBuild and Batch containers of two accounts landed on the same
bridge. Ec2Service worked around the shared lease table by counting
every account's resources as holding the subnet's addresses.
- VpcNetworkManager takes the account on every call and keys bindings
and subnets by account, Region and id. A network carries the account
in its labels and, for any account but the default one, in its name;
the default account's keeps the name it always had, so its live
networks outlive the upgrade. A surviving network of another
account's VPC of the same id is a collision, as another Region's is.
- Startup reconciliation asks which accounts declare a VPC of an id in a
Region (DeclaredVpcs). A labelled network is kept while its account
declares the VPC; one an older version labelled with no account
belongs to the account declaring its VPC, the default account first,
and a non-default account's VPC keeps using that account-less network,
so its live containers stay attached across the upgrade.
- Ec2Service passes the caller's account, and the restore each stored
VPC's, subnet's and instance's own. The helpers other services call
(allocate, reserve, release, attach, detach) take the owning account
and run as it, as a caller may run outside the owner's request: a
provisioned or cross-account Lambda launch, a container removed in
the background. Lambda, ECS, EKS and VpcContainerLeases (MWAA,
CodeBuild, Batch) pass the account they already hold; Lambda's and
EKS's leases carry it to their release.
- An address is held by the caller's account's resources alone, as its
network and lease table are its own: the every-account holding check
goes, and the container lease map is keyed by account.
VpcNetworkManagerTest covers two accounts' default VPCs getting a
network each (the second's identical CIDR substituted), another
account's surviving network as a collision, a labelled network kept
only while its account declares the VPC, and an older version's
unlabelled network kept and adopted for the account declaring it. Ec2ServiceTest's cross-account
tests now pin the per-account holding. ec2.md says so.
Each MicroVM image version now records the build inputs it was created with (code artifact URI, base image ARN and version, build role) as an immutable BuildSpec. GetMicrovmImageVersion and ListMicrovmImageVersions read that snapshot instead of the image's latest inputs, so an update no longer rewrites what older versions report.
Versions stored before this change have no snapshot and fall back to their image's last known inputs; the docs note that their original inputs cannot be recovered.
Closes#7312
Floci in a container of its own, with the Docker socket, is how many
users run it, and an EMR cluster's nodes are then its siblings on a
network of their own: Floci's container joins that network so the
cluster's metastore service reaches Floci's S3, and leaves it once the
cluster has ended. That path had unit tests and one manual run, as no
test ran Floci in a container for EMR.
EmrFlociContainerNightlyIntegrationTest starts the Floci image the
nightly workflow builds from the commit (docker/Dockerfile.jvm-package)
with the socket and the docker runner mode, runs a cluster with Hive and
Spark on it, and checks that a Hive step's tables over rows in S3 are
read by a Spark step through the metastore, that a later Hive step reads
the table the Spark step made, that Floci's container is on the
cluster's network meanwhile, and that it is off it once the cluster has
ended. A failing step's message carries its stderr and Floci's log.
The nightly workflow builds the image and names it to the checks; the
Spark and Hive images are prefetched for the class. The Hive and Spark
jobs EmrHiveStepsDockerIntegrationTest wrote inline are HiveCatalogJobs,
the step EMR tests added in two copies is EmrRequests.addStep, and the
Docker client two RDS tests built by hand is TestDockerClients.local.
The generated request resources give CodeBuild's project and report
group types aws:ResourceTag/ keys, but CodeBuildStoredResourceArns did
not answer storedTags, so a condition on their tags saw none. It now
answers from CodeBuildService.storedTags, which reads the project or
the report group stored under the ARN in the account and Region it
names, a pre-multi-account one of the default account in place,
matched on the whole ARN, and gives its key and value pairs as tags.
The tag lists are volatile, as CodeBuild replaces a resource's list
whole and never changes one in place.
With security-group enforcement on, a managed ENI's identity was its
IPv4 address alone, so a rule naming an IPv6 range never matched a peer
on the IPv6 addresses its ENI now holds.
Each protected endpoint now carries its ENI's IPv6 addresses next to the
IPv4 one, and its helper's Docker IPv6 address next to the IPv4
transport. The compiler writes a peer's rules per identity: a rule
matching one of its IPv6 addresses admits it on the IPv6 transport only,
never on the IPv4 one, and on a Docker network without IPv6 there is no
IPv6 identity to match. Every transport a peer has is dropped after its
rules, as the IPv4 one already was. The EC2 and ECS registrations pass
the ENI's IPv6 addresses, the firewall manager reads the helper's Docker
IPv6 address, and AssignIpv6Addresses and UnassignIpv6Addresses update
the ENI's firewall identity. Every Docker address a managed peer has is
dropped after its rules, its IPv6 one included when its ENI holds no
IPv6 address, and an ICMP rule is written only for the family it
belongs to. IPv6 changes to one ENI serialize through their firewall
update; an assign the firewall refuses is taken back out of the store,
and an unassign reaches the firewall before it is stored.
The README now documents enforcement: what it filters, that it needs
rootful Docker with Linux containers, how to turn it on, and that an
application port opened after launch is not published while it is on.
Part of #2564.
Athena types a partition value as its key declares. Floci left the
values DuckDB's Hive partitioning reads from column=value folders to
DuckDB's autocast, so a string key holding 2026-11-14 came back as a
DATE, and a date key's folder holding text no date is read as rows with
the guessed type. Delimited-text tables already read their values as
text and cast them; every other format did not.
- A partitioned table without a location template reads with
hive_types_autocast = false, so each Hive partition value arrives as
text, and buildProjection casts it to its key's declared type
(GlueTableResolver.hivePartitionKeys), as it already did for
delimited text.
- A projecting table in the default layout keeps only rows whose typed
keys parse as their types (hiveValueFilter): Athena builds each path
from values its projection generates, so a folder like dt=latest for
a date key is one no query addresses, as the template layout already
treats it.
- A date or timestamp key whose date projection sets a format is parsed
with it in either layout (typedKey, strptimeFormat translating yyyy,
yy, MM, dd, HH, mm, ss and literal text, a doubled quote being one
quote, for try_strptime), so dt=20261116
under yyyyMMdd reads as a date; a format with other pattern letters is
cast as an ISO value. This closes the template layout's TODO too.
- Iceberg tables keep reading their own typed values.
AthenaPartitionTemplateSidecarIntegrationTest reads a string key
holding a date as VARCHAR, a date key as DATE, and skips a dt=latest
folder, and a yyyyMMdd date projection, against the real engine.
GlueViewDdlBuilderTest and GlueTableResolverTest cover the view and the
pattern translation.
athena.md says so.
Both policy simulators accepted OrderedOrganizationPolicyInputList and
ResourceHandlingOption and answered as though neither had been sent.
The levels now gate a simulation the way they gate the call it stands for,
through the same walk a live request takes through service control policies:
an action no level allows is an implicitDeny, a level that denies it is an
explicitDeny whatever the levels below allow, and a level carrying no
statements is skipped. A level whose document does not read as a policy is an
InvalidInput naming the item's position. The levels a call hands in are the
whole of the organization the simulation runs against, matching the console,
which includes SCPs only when the box is ticked.
A named scenario is held to the resources it requires, "to enforce the
presence of the required resources to ensure reliable simulation results", and
a value naming no published scenario is refused. A simulation that names no
scenario is left alone.
One difference from AWS's simulator is documented and open: AWS says its
simulator does not evaluate SCPs that have global conditions, while this walk
evaluates a condition in an SCP exactly as the live evaluation does.
Redshift cluster parameter groups, subnet groups, snapshot schedules and snapshot copy grants are now stored under <region>::<name>, and zero-ETL integrations are listed, described and deleted only in the Region their ARN names, with names unique per Region.
The snapshot scheduler reads a cluster's schedule in the cluster's Region. EnableSnapshotCopy and snapshot copies look up the grant in the destination Region. The in-use checks for deleting a grant or schedule are scoped to the Region.
Records stored before this change move at startup. A subnet group goes to its subnets' Region and a copy grant to its KMS key's Region; anything else goes to the default Region. Every other Region where a cluster uses a record gets its own copy.
StorageJson in core.storage builds the mapper used by the persistent, hybrid and WAL storages, and copies a record through that form; AppConfigService.copy uses it too. AvailabilityZoneIds.regionOf gives a zone's Region for EFS, EKS and Redshift.
Part of #8218
The generated request resources give Step Functions' state machine,
version, alias, execution and activity types aws:ResourceTag/ keys, but
StepFunctionsService did not answer storedTags, so a condition on their
tags saw none. It now reads the state machine or the activity stored
under the ARN in the account and Region it names, in place, matched on
the whole ARN; a version the state machine holds and an execution have
the state machine's tags, as all versions of a state machine share its
tags and its executions inherit them, and an alias has none. Tagging
and untagging now put a new tag map in place of the old one under the
service's lock, so the lookup always copies one whole set and an update
copying the state machine no longer loses a tag written at the same
time. iam.md also names EventBridge and RDS, which answer it too.