A cluster whose Applications named Trino ran none, as no AWS image
carries it. With floci.services.emr.trino.enabled on, off by default, a
docker cluster that installs Trino now runs its coordinator, and its
steps run EMR's trino-cli against it.
- The coordinator, which runs the queries too, runs on the cluster's
primary node, in a container of its own that shares the node's
network: from the Trino project's image of the version the release's
page in the Release Guide gives (trino.image, trinodb/trino:%s, 446
for emr-7.5.0), with trino.memory-mb of memory (2048), on port 8889,
EMR's.
- EMR installs hive-client and hcatalog-server with Trino, so the
cluster's image has Hive and its primary node runs Hive's metastore
service. Trino's hive catalog is that metastore, or Floci's Glue Data
Catalog when trino-connector-hive sets hive.metastore to glue, the
classification's other properties after Floci's. Trino reaches S3 and
Glue with a session for the cluster's instance profile's role, as the
metastore does.
- The cluster's image gets Trino's CLI from Trino's image, and a
trino-cli that runs it on the image's Java 17 against the coordinator,
whose address the steps get, unless a step names a server of its own.
- The cluster's first step starts Trino with the HDFS and waits for it.
It goes before the primary node when the cluster ends, on a reset and
on a shutdown, and one an earlier Floci left goes when the service
starts.
- A nightly check runs trino-cli steps on a cluster with the metastore
and on one with Glue. It joins the docker-runner group, whose budget
grows by its 24 minutes, and the prefetch pulls its Trino image.
GetModelTemplate now answers for REST and WebSocket models with sample VTL:
the $inputRoot line, two-space indented typed placeholders ("foo", 3.1415),
and an editable ##TODO / #foreach skeleton for arrays, generated from the
latest stored schema. A top-level scalar model is refused with 400
"Unsupported data type for mapping template", a missing WebSocket model with
404 "Invalid model identifier specified: <id>", and HTTP APIs refuse models
at CreateModel.
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
Signed-off-by: Jackson Price <jxnprice@amazon.com>
Floci's shutdown removes every broker container, and nothing started
them again, so after a restart with persistent storage a broker still
reported RUNNING while nothing answered on its endpoints. A new
container would not have helped either: RabbitMQ keeps its data under
the node name, which defaults to the hostname Docker sets to the
container id, so a new container on the same volume started an empty
node without the broker's users.
Broker containers now run as the fixed node name rabbit@localhost. At
startup, each broker that was RUNNING or still starting goes back to
CREATION_IN_PROGRESS, and its container starts in the background. A
container that outlived Floci is kept when it still answers. Otherwise
the broker gets a new container on its volume, without seeding the
admin user, whose password is never stored, and on the host ports it
had when they are free. The readiness poller reports it RUNNING once
the console it probed answers.
A broker from before fixed node names with no surviving container is
reported CREATION_FAILED. One whose restore fails is reported
CREATION_FAILED and tried again at the next start, one CreateBroker
failed for is left as it is, and one a crash left DELETION_IN_PROGRESS
is deleted.
Part of #5664.
Closing a stream from a Docker GET read the rest of its body, since httpclient5 drains a response on close to keep its connection, so a caller that stopped after the first bytes of a large body still waited for all of it.
On close the stream now reads at most 64 KiB of what is left: a body that ends there keeps its pooled connection, and a longer one is aborted. Closing it twice does nothing more.
Refs #9244
CreateAccessEntry accepts the EC2 type (roles only, system:node:{{SessionName}} in system:nodes, AWS's refusals for groups, a username and an IAM user, access policies allowed), and turning Auto Mode compute on makes the node role's EC2 entry with AmazonEKSAutoNodePolicy, as measured on AWS.
Scalar Lambda UDFs created with CREATE EXTERNAL FUNCTION now evaluate in SQL over the PostgreSQL wire protocol, Simple and Extended Query, and through the Data API. LambdaUdfEvaluator collects each statement's calls in rolled-back passes through generated stubs, invokes the functions in batches through LambdaUdfInvoker, and serves the results from a per-statement cache. In autocommit the collect passes and the statement share one transaction, so now() and the other transaction-time arguments stay the same, and volatile arguments such as random() or statement_timestamp() are refused.
PostgresWire.dataRowValues is now the one DataRow decoder for the Spectrum backend session and the S3 COPY simulator.
Closes#7815
The image function working directory check now reads each parent's mode and symlink target from HEAD /containers/{id}/archive, whose X-Docker-Container-Path-Stat header answers in a few bytes, instead of reading the first tar entry of a GET archive that Docker compressed and streamed in full when it was closed. An image function's first invoke no longer scans all of /var. The probe runs on a small control-plane transport pool of its own, behind the Docker circuit breaker.
Closes#9244
Since #8926 a stored public zone under an emulator suffix answers A and AAAA,
and a public alias to a target Floci does not serve, such as a Cognito custom
domain aliased to CloudFront, got REFUSED, so a container asked public DNS and
got its own loopback address. An A or AAAA standard query for a name under an
emulator suffix that the stored zone refuses is now answered as the emulator's
own name, after the VPC forwarding-rule check. A query with more than one
question, a class other than IN, or a non-standard opcode or flag stays
REFUSED. Closes#9359.
Floci's shutdown stops every endpoint container, and nothing started
them again, so after a restart with persistent storage an endpoint
still reported InService while InvokeEndpoint failed with ModelError.
At startup, each endpoint that was InService or still Creating goes back
to Creating and is started again from its endpoint config and model, as
CreateEndpoint starts one, in the account it is stored under. It reports
InService once its container answers /ping, or Failed with the reason.
A Failed endpoint is left as it is, and one a crash left Deleting is
deleted.
Part of #5664.
Move `route53resolver` from NOT_COVERED to NAMESPACES in
regen_iam_request_resources.py, so Route 53 Resolver requests are checked on
the resources they name instead of `*`: a resolver rule, an endpoint or a
firewall domain list by its id, as <type>/<id>, the ARN the service mints,
and a tag call on its ResourceArn. The reference's DNSSEC configuration
format takes a ResourceId, which the request gives as the VPC's id, so the
DNSSEC calls are checked under the VPC's id.
A member whose botocore pattern is another service's ARN now holds nothing
of the namespace, read where every rule first reads the request's members:
CreateOutpostResolver's OutpostArn, an outposts ARN whose name begins the
outpost resolver's, had taken the place of the resolver it makes, which is
now checked as outpost-resolver/*. Over the whole table that rule changes
this one operation. No other namespace's rows change.
A managed firewall domain list, which AWS owns, was checked under the
caller's account, though the service gives it an ARN of its own, so a grant
on the ARN ListFirewallDomainLists returns was refused. Route 53 Resolver's
request-resource lookup now answers a managed list's ARN for its id, which
the reader already asks a service for for a resource filled from one
member; a custom list stays in the caller's account.
Four services gzipped a byte array held in memory with their own copy of the same lines: CloudTrail's
log file, a CloudWatch Logs subscription payload, a VPC flow log file and each line of a Redshift
audit log. core.common.Gzip.compress now does it once, and the four call it.
Writing to memory cannot fail, so the helper rethrows the compressor's IOException unchecked rather
than handing it to every caller; each caller already caught it as a runtime failure or had no way to
reach it. Its buffer starts small and grows with the compressed output, as the flow log
and Redshift writers' did, rather than being sized from the input. Writers that compress as they go, into a file or a stream they hand on (DynamoDB's export,
Firehose's per-format encoder, the EMR and Redshift UNLOAD writers), keep their own GZIPOutputStream.
Under IAM enforcement an Identity Store request was checked on
arn:aws:identitystore::<caller>:identitystore/<id>, whatever account's IAM
Identity Center instance holds the store, so another account of its
organization reading it was checked on a store of its own account, and a
grant there reached it.
Every ARN names the account owning its resource. Identity Store's lookup
now answers the store's ARN in the account whose instance holds it
(SsoAdminService.identityStoreOwner), which the reader already asks a
service for for a resource filled from one member, so the request is checked
on the store where it is. A store no instance holds keeps the caller's
account, as before. No generator or table change.
The lookup a store's owner takes remembers a store no instance holds, so
a request naming one again does not look through every account's
instances again; the record empties whenever an instance is written and on
reset, as only those make a store held that was not, and starts over past
10,000 stores.
A privileged systemd EC2 guest could hang up the Docker host's virtual-console sessions. Systemd guests now start /sbin/init with systemd.mask= arguments for the getty units, which systemd reads from PID 1's command line once container=docker marks the guest as a container, and get /dev/null mounted read-only over /dev/console and /dev/tty0 through /dev/tty63. Pseudo-terminals stay available for SSH. Docker applies the mounts when it creates the container, so existing systemd instances need recreating.
Closes#9342
With floci.services.lambda.kubernetes.unschedulable-grace-seconds (FLOCI_SERVICES_LAMBDA_KUBERNETES_UNSCHEDULABLE_GRACE_SECONDS, default 0), a Lambda pod the Kubernetes scheduler reports Unschedulable gets that long before its cold start fails, so a node autoscaler such as Karpenter can add a node. The grace is measured from when Floci first observes the reason, since the PodScheduled condition's lastTransitionTime keeps an older timestamp across a SchedulingGated to Unschedulable flip, and the pod startup timeout still bounds the wait. The default keeps the immediate failure.
Closes#8995
EksService took EksAutoModeLoadBalancers as an injected field. It is now an
Instance<EksAutoModeLoadBalancers> constructor argument, looked up only when a
cluster is deleted; the previous constructor keeps its callers. No behaviour changes.
The CloudWatch metric store has no size bound, and since SQS publishes AWS/SQS
metrics for every active queue each minute it grows with no PutMetricData call,
until a persisted cwmetrics.json no longer fits the heap on load.
floci.services.cloudwatchmetrics.max-stored-datapoints (default 100000) now caps
the datapoints kept per account in each namespace a MinuteMetricsPublisher
writes (AWS/SQS, AWS/Redshift). After each tick the publisher drops the oldest
over the ceiling, down to nine tenths of it, through the metric key index;
other namespaces are never cut, and 0 or less turns the ceiling off.
API Gateway V2 integrations now store TlsConfig and return it from create,
update, get and list over the REST and JSON paths. An update that omits it
keeps it, and a malformed value is refused before the integration changes.
Closes#9337.
A BETWEEN whose bounds have different types is now refused with DynamoDB's ValidationException in a FilterExpression, KeyConditionExpression, ConditionExpression and PartiQL statement, and PartiQL also refuses reversed bounds. Each check runs with the operand type checks, so the first failing condition in written order wins.
The one-violation envelope moves to SmithyValidationErrors.inEnvelope. PutItem, UpdateItem and DeleteItem condition errors carry it, through the Step Functions tasks too, and TransactWriteItems ones no longer do, as on DynamoDB.
Identity Store checked only that an IdentityStoreId was well formed, so any
account could read and change the users, groups and memberships of any
store, the default account's IAM Identity Center store among them.
The IAM Identity Center User Guide says who may use an organization
instance's store: "Member accounts have access to Read actions on both the
sso-directory and identitystore namespaces", while adding, editing or
deleting users or groups is the management account's and a delegated
administrator's. SsoAdminService now answers how an account may use a store
from the instance that holds it: its own account, and a delegated
administrator for IAM Identity Center in an organization instance's
organization, in full; another account of that organization to read; any
other account not at all. Identity Store's handler refuses a store an
account cannot see as ResourceNotFoundException (ResourceType
IDENTITY_STORE) and a change from an account that may only read as
AccessDeniedException. A store no instance holds is used as before.
CreateTargetGroup gave every target group an HTTP health check, so a
Network or Gateway Load Balancer target that does not answer HTTP with
the matcher's code stayed unhealthy. HealthCheckProtocol now defaults
to TCP, except for HTTP and HTTPS target groups and target type alb,
which keep HTTP, as the API reference states.
A health check uses HTTP, HTTPS or TCP. CreateTargetGroup and
ModifyTargetGroup refuse GENEVE, TLS, UDP, TCP_UDP, QUIC and TCP_QUIC,
and TCP for HTTP and HTTPS target groups and alb targets, naming the
protocols the target group takes as AWS does. A TCP check carries no
path or matcher, and moving one to HTTP or HTTPS takes both. A
CloudFormation rollback no longer sends a TCP check's stale path and
matcher back.
Closes#5824.
Move `identitystore` from NOT_COVERED to NAMESPACES in
regen_iam_request_resources.py, so Identity Store requests are checked on
the resources they name instead of `*`: the identity store its
IdentityStoreId names, and the group, user or membership its id names, whose
ARNs have no Region and no account; the list calls also on every group,
user or membership, as the Service Reference gives them.
A type an action requires that its request does not name is now read too.
Which types an action requires is what the Service Authorization Reference
marks with an asterisk, which neither botocore nor the Service Reference
says, so fetch_required_resource_types.py vendors that page's actions table
as it stands into tools/aws/sources/required-resource-types.json, granted
for Identity Store alone. Two generic readings use it: a required type the
record of the resource the request names holds is read through that
resource's id (DescribeGroupMembership and DeleteGroupMembership, the
membership's group and user), and a required type whose id a lookup returns
is found by the members its request gives, each way it may give them apart
(GetGroupMembershipId, GetGroupId, GetUserId). The reader lets a find name a
field of a structure at any depth and gives the service the members' paths
with their values, and Identity Store answers both as its handlers find
them. No other namespace's rows change.
QueryConstraintCheck and RequestConstraintCheck each held their own copy of how a string breaks its
vendored shape: the length, pattern and enum violations in that order, the values an enum admits,
the member name with its first letter lowered, and the loop compiling every shape's pattern. They
now share VendoredShapes, a package-private helper in core.common, so the Query and JSON protocols
cannot drift apart on how a string is worded.
RequestConstraintCheck's boolean reading of a list element or map side (scalarBroken) goes through
the same helper rather than a third copy of the three checks. The one reading that differed was a
shape declaring an empty enum, which the Query check passed and the JSON check refused; no vendored
file declares one, and both now pass it.
While a cluster has Auto Mode's load balancing capability on, a LoadBalancer
Service whose loadBalancerClass is eks.amazonaws.com/nlb gets a Network Load
Balancer in the cluster's subnets: a TCP target group per TCP port on its
NodePort, with a TCP health check and the cluster's node registered by
instance ID, and a listener on the Service port. Once the node is registered,
the DNS name is written to the Service's status, in a patch that names its UID.
A reconciler reads the Services with kubectl every 10 seconds; each pass makes
whatever a Service's ports lack and removes what dropped ports had. The load
balancers carry eks:eks-cluster-name and service.eks.amazonaws.com/stack, the
only keys AmazonEKSLoadBalancingPolicy lets Auto Mode set, and go with the
Service, with the cluster and when its load balancing is turned off.
ElasticLoadBalancing.loadBalancingOn replaces two copies of the on check.
Part of #8914.
RDS now answers CreateIntegration, DescribeIntegrations, ModifyIntegration and DeleteIntegration for zero-ETL integrations from an aurora-postgresql DB cluster or a standalone postgres DB instance into a Redshift Serverless namespace or a provisioned Redshift cluster. It refuses a source or target that does not exist or is of another kind, a duplicate name or source and target pair, an AdditionalEncryptionContext without a KMSKeyId, and a PostgreSQL DataFilter that breaks AWS's rules. DescribeIntegrations takes an ARN, id or name, its filters, MaxRecords and Marker.
No data is copied yet: an integration reports creating, then active. The initial load follows under #7984.
SpectrumQueryPreparation's test constructors filled the Kinesis and MSK
streaming views with nulls inline. Each views class now owns an inMemory()
factory, so the null collaborators sit in one documented place.
#9305 ran the full expression check on every write condition in
DynamoDbService.evaluateCondition, and PartiQL UPDATE and DELETE pass a
condition built from the WHERE clause there, with a grouped OR or NOT in a
second pair of parentheses, so the redundant parentheses check refused
statements DynamoDB accepts. The check now runs where the typed backend takes
a put, update or delete, so Step Functions tasks still refuse an unknown
function, and PartiQL writes behave as they did before #9305.
The admission webhook now also makes the IAM roles for service accounts
mutation the Amazon EKS pod identity webhook makes: a pod whose service
account carries eks.amazonaws.com/role-arn, and that gets no Pod Identity
mutation, gets a projected token for STS mounted at
/var/run/secrets/eks.amazonaws.com/serviceaccount and AWS_ROLE_ARN,
AWS_WEB_IDENTITY_TOKEN_FILE, AWS_STS_REGIONAL_ENDPOINTS and the cluster's
Region, with the audience, token-expiration, sts-regional-endpoints and
skip-containers annotations read as upstream reads them. The webhook
reads the service account with kubectl in the cluster container, since
it is handed only the pod. Pod Identity keeps precedence, and the two are
never injected together.
Closes#5647.
Adds LambdaUdfInvoker, the batch invoker for scalar Redshift Lambda UDFs, on top of LambdaService. It sends the request Redshift documents (request_id, cluster, user, database, external_function, query_id, num_records, arguments) from the cluster's Region, splits rows by the batch row and size limits, parses the response and maps PostgreSQL text values to and from JSON across the documented scalar types. It retries TooManyRequestsException with backoff, and refusals and failures surface as SQL errors.
Whether the role may invoke the function is decided by a new iam.RoleResourceAccessAuthorizer, which holds the identity, boundary, SCP and resource policy evaluation Step Functions' LambdaTaskAuthorizer used, and which that class now calls too.
Part of #7815.
MskStreamingViews.createLocked now binds the candidate MskViewBinding it already
built for the IAM check, instead of constructing the same binding a second time.
PutAccountProperties stored any value the declared length admitted, so role
manager's switch took one nothing can read as a flag. The operation's own
Properties member says "the service validates each value based on the property
key's expected type. For example, boolean properties expect true or false", and
one property has its type published: role manager is "controlled by the
account-level property RoleManager/Enabled", where "a value of true enables role
manager; false disables it". Both spellings are lowercase on every page that
writes them, the guide's CLI examples, the API Reference's instruction to set
the property "to true or false", and the response in its own example.
That property now takes those two values and nothing else, answering
InvalidInput 400 with "Property <key> expects true or false: <value>", the value
as the request sent it. The sentence is this package's own, AWS publishing that
a value is validated against its key's type and nothing of what it answers when
one is not. The request is refused whole, so an entry beside the bad one is not
stored either, which is how a request refused for its keys already behaves.
What is held is the pair of values rather than a type, since a type is what this
would be inventing: the pair is what AWS publishes for the property. Every other
property keeps taking any value of the declared length, no page saying what any
of them is for, which is the looser answer and the direction to be wrong in. The
key is read before the value, a value's type being the key's to say, so a
request naming an unrecognised namespace is still answered for the namespace.
Closing a ServerSocket with a pending virtual-thread accept can defer release of its bound descriptor. Wait for the accept worker with a bounded join before shutdown returns, preserving interruption and occupied-port refusal. Retain existing delivery, token, rotation and polling behavior.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
The v2 SendBulkEmail refusal of an empty DefaultContent.Template.TemplateName now builds its violation with SmithyValidationErrors.Violations.WITHOUT_VALUES.lengthTooShort instead of writing the sentence out, as the bulkEmailEntries check beside it does with notNullWithoutValue. The message is unchanged.
A sweep now applies every repository's lifecycle policy, as ECR does
within a day of an image meeting a rule, and expires the images its
rules select: imageCountMoreThan keeps the newest by push time and
sinceImagePushed expires those older than the count, with rules applied
in priority order and none marking an image a higher rule selected. A
platform image of a held manifest list is kept until the list goes, and
an artifact naming a subject expires with that image. Get and
DeleteLifecyclePolicy report lastEvaluatedAt, and the delete echoes the
policy it removed.
Closes#5874.
A session tag never reached the session assumed from it, so the opt-in AWS
publishes for role chaining was missing: "if you set a tag key as transitive,
the corresponding key and value passes to subsequent sessions in a role chain".
All three operations that mint a tagged session now read the keys where AWS
publishes them, the request's TransitiveTagKeys member, the assertion's
multivalued TransitiveTagKeys attribute and the token's transitive_tag_keys
claim in either published format, and GetFederationToken declares none because
its credentials cannot assume a role at all.
A session assumed from one carrying transitive tags takes those tags as its own,
under the ones its own request passes, and keeps their keys transitive so the
next link inherits them too. A role's own tags never pass down. A session tag
whose key the calling session passes down is refused, which AWS publishes as the
operation failing without saying what it answers, so the code is the one this
operation already gives the other rule that turns on the caller being a session
and the sentence is this package's own. The inherited tags count against the
session token size like any other state the session carries, while the keys cost
nothing.
sts:TransitiveTagKeys now reaches the role's trust policy with the keys the
request names, beside sts:RoleSessionName and sts:ExternalId there. It stays out
of the caller's identity-policy context, which is filled from the generated
request-condition-keys.json, and that file does not list the key for the action.
One rule of the chain is left and the docs say why: a transitive tag replaces the
assumed role's matching ResourceTag value, and Floci publishes no
aws:ResourceTag for the role in either evaluation, so there is nothing yet for it
to replace.
An inherited tag needs the role's tagging permission as much as a passed one
does, so the trust policy is read for sts:TagSession when the calling session
passes any tag down, with the request carrying none: the guide lists "incoming
transitive session tags" among the tags a principal carries, and where a base
role's own tags are passed on by STS "the trust policy must also allow
sts:TagSession". The caller's own policy is read for a request that carries
Tags, which the generated tagging table keys on, so a chain of inherited tags
alone is held to the role's permission and not to the calling session's, where
AWS reads both; the docs say so.
Docker's GELF driver now runs in non-blocking mode, so a listener outage
no longer blocks a container's log writes or skips the daemon's local log
copy. docker.md describes the default 1 MB delivery buffer and the live
console and CloudWatch Logs loss once it fills.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
SearchVectors now refuses unused ExpressionAttributeNames and ExpressionAttributeValues, and runs every check that needs no table, the 4 KB expression size limits included, before it looks up the table, in DynamoDB's order.
Every condition expression now refuses an unknown function name with DynamoDB's message, the name as written, so ATTRIBUTE_EXISTS(a) is refused like nope(a). Function names are not keywords, so size = :v reads size as an attribute name. The Step Functions putItem, updateItem, deleteItem and scan tasks, which skip the handler, get the same check.
PutLifecyclePolicy and an AWS::ECR::Repository's LifecyclePolicy now
check a document the way ECR's refusals show it does: the model's 100 to
30720 characters, the JSON, a JSON schema whose validator's text ECR
quotes with its trailing newline (types, required members, minimums, 50
rules, 10 prefixes, the count type and action alternatives), the mapping
onto ECR's rule types, then the user guide's rules in ECR's sentences
where they are known. Values must be spelled as the guide spells them,
an any rule must be the last of its storage class, and an archive rule
waits 90 days.
Part of #5874.