An http or https notification was posted once and dropped on any
failure. It is now retried, as SNS does, when the endpoint answers 5xx
or 429 or cannot be reached, following the effective delivery policy:
the subscription's healthyRetryPolicy, the topic's
defaultHealthyRetryPolicy when overrides are disabled or the
subscription sets none, and otherwise the default of 3 retries 20
seconds apart. The no-delay, pre-backoff, backoff and post-backoff
phases, the delay targets and the backoff function are honoured, and
retries are scheduled rather than slept on a thread.
Any other answer is a permanent failure. A notification that fails
permanently or runs out of retries goes to the subscription's
RedrivePolicy dead-letter queue when one is set. Pending retries are
bounded per message by the policy, as on AWS, and a reset, shutdown,
Unsubscribe or DeleteTopic cancels them.
A subscriber with a Lambda target now applies its RetryPolicy and
OnFailureConfiguration. A failed invocation, a function error or a
function that does not exist, is retried after about 0.5 s and then four
times longer each time, until MaxRetryAttempts is used up or the next
retry would start after MaxEventAgeInSeconds from the event's ingestion;
a FIFO subscriber's later batches wait meanwhile. The batch then goes to
the OnFailureConfiguration queue as one record. Pending retries are kept
in memory, and a reset or deleting the subscriber drops them.
CreateSubscriber and UpdateSubscriber refuse an OnFailureConfiguration
queue of another Region or account, or an ARN outside the model's queue
pattern. A FIFO dead-letter queue gets the first event's group id and
event id as its message group and deduplication ids.
EKS Auto Mode ignored pods' zone topology spread constraints: withoutRoom
counted a node in any zone as room for a pod the scheduler then refused
for its skew, and a new node went to the first zone that fit, so pods
that must spread kept getting nodes in one zone.
Auto Mode now reads each DoNotSchedule zone constraint and checks the
skew as the scheduler does, counting only pods on nodes the pod's node
selector and required affinity accept, over the zones the pool can
launch in. Room counts only in a zone the spread allows, and a spreading
pod's node goes to the allowed zone with the fewest matching pods, a
group sharing one node of the type that holds it. Pods without a spread
are placed as before.
Part of #8914
The master user joined rds_superuser without ADMIN OPTION. From
PostgreSQL 16, CREATEROLE no longer lets a role add members to a role
it holds no ADMIN OPTION on, so the master could not GRANT rds_superuser
to another role, which RDS documents a member of rds_superuser can do.
The master now joins rds_superuser WITH ADMIN OPTION, on initialization
and again after a snapshot restore.
Closes#9952
AWS::RDS::DBCluster read DBSubnetGroupName only to decide whether an
update replaces the cluster, and created the cluster with no subnet
group, so it and its members always landed in the default group and the
default VPC. With FLOCI_SERVICES_RDS_ENDPOINTS_IN_VPC=true their
endpoints were then served where clients in the declared VPC could not
reach them.
The cluster is now created in the group the template names, a Ref to an
AWS::RDS::DBSubnetGroup or a group's name, as CreateDBCluster places it.
A group that does not exist fails the resource with CreateDBCluster's
DBSubnetGroupNotFoundFault message, and a change of group replaces the
cluster into the new one, as the property is create-only.
Closes#9938
POST /_floci/state/nuke, and its /_localstack/state/nuke twin, was a
second name for state/reset. Every Floci emulator now settles on one
reset path, POST /_floci/state/reset; floci-az, floci-gcp and floci-oci
drop the alias in their own changes. The removed path answers the
control plane's JSON 404 catch-all, so a caller still on it should call
/_floci/state/reset instead, which behaves the same.
With floci.services.elbv2.addresses-in-vpc on, each Application and Network
Load Balancer gets a node in each of its subnets, as Elastic Load Balancing
"creates a load balancer node in each zone that you specify" and a load
balancer "has one IP address per enabled Availability Zone". So two load
balancers can both listen on 443, a TCP listener needs no port of its own on
Floci's address, and a listener on a port Floci holds itself is served too.
- Each node is a relay container at an address EC2 leases from the subnet
(VpcAddressRelays, with one forward per listener port). It forwards each
port to a socket of that listener's own on Floci, which serves that
listener alone: HTTP needs no Host header to pick it, HTTPS terminates
with the listener's certificates and reloads them when they change, and
TCP relays as on the shared port.
- ElbV2Service serves the nodes after every change to a load balancer's
subnets or listeners and at restart, under a per-load-balancer lock, so
the last change's listeners are the ones served. A node's relay id
follows from the load balancer and subnet; only its address is kept, on
the Availability Zone entry, so a restart serves it at the same address.
SetSubnets removes the nodes of subnets left behind, and a delete removes
them all.
- Floci's DNS server answers the load balancer's name with its node
addresses, a node's own <zone>.<name> with that node's, and a Route 53
alias to the load balancer with its nodes (a Network Load Balancer's
included), with the 60 second TTL the ELB user guide gives.
- The listener ports on Floci's address keep working as before.
The setting needs Docker-backed VPC networks and does nothing in mock mode.
A Gateway Load Balancer gets no nodes.
Closes#5870
The request-resources table gives aws:ResourceTag keys to eight IAM resource types and Floci stores the tags of all
eight, but IAM's tag reader answered for roles and users alone, and regen_iam_condition_keys.py listed every resource
tag pair no RoleName or UserName names as notRead ("no member names a stored role or user whose resource tags can be
read"), which IamConditionKeys strips from the request's context. A condition on aws:ResourceTag for a customer managed
policy, an instance profile, an OpenID Connect or SAML provider, a server certificate or a virtual MFA device was
dropped.
The condition-key generator now puts such a pair in a new fromResourceTags section when iam-request-resources.json
resolves the action's request to a resource of one of the pair's types that it gives the key's prefix (resourceTagKeys):
the condition resolver reads it through its generic resource tag reading, from what IAM holds on the resource the
request names. A create the generated tag-on-create table lists (iam-tag-on-create.json) acts on a resource that does
not exist yet and stays notRead, with the reason a role's or a user's create has. 59 pairs move; none keeps the old
reason. --check re-derives the section from the two tables, and the IAM data drift gate checks the condition keys when
either changes.
IamService.heldTags reads a policy's, instance profile's, OpenID Connect provider's, server certificate's or virtual MFA
device's tags, and SAMLProviderService.heldTags a SAML provider's, each read in place in the ARN's account, a
pre-multi-account entry of the default account included; an instance profile or a server certificate, stored by its
name, only when its ARN, path included, is the one named. IamStoredResourceArns answers them.
The Service Reference now lists IAM's workload identity actions, which pinned botocore 1.44.14 does not model yet, and
the generator stopped on their tagging actions' request tags. Like classify's "no SDK operation of this name",
request_tag_context now skips an action botocore does not model, which no request Floci receives names; the table is
synced with their pairs in notRead.
IamResourceScopedPolicyEnforcementIntegrationTest checks that a caller allowed the read of each of five types only on
resources tagged team=blue reads the blue one and is refused the red one, and
ServerCertificateIamEnforcementIntegrationTest the same of certificates; IamStoredResourceArnsTest the reads and an
instance profile named by another path; test_regen_iam_condition_keys.py the new routing, the create kept unread and the
skipped tagging action.
PutParameter defaulted a missing Type to String before looking at the
stored parameter, so an overwrite without a type turned a SecureString
into a plaintext String and a StringList into a String. A missing Type
now passes through, and the overwrite keeps the stored type, as AWS
does; a create without a Type is still stored as a String, which the
docs mark as a Floci difference.
Closes#9941
The Service Reference gives S3's bucket and object s3:BucketTag/${TagKey}, which "Filters access by the tags associated
with the bucket", S3 Tables' table bucket and table s3tables:TableBucketTag/${TagKey}, S3 Vectors' vector bucket and
index s3vectors:VectorBucketTag/${TagKey}, and S3's access point s3:AccessPointTag/${TagKey}. The generator read
resource-tag keys only as <namespace>:ResourceTag/ and RDS's <namespace>:<type>-tag/, so none of them was read and a
condition on one never matched.
A key named after its own type, <namespace>:<Type>Tag/ (condition key names are not case-sensitive), now joins that
type's resourceTagKeys as RDS's do: the bucket's s3:BucketTag/. One named after another type whose resource path the
type's continues goes into a new containerTagKeys section, with that type's format in the type's variables
(parent_format, as tagParents builds a parent's): an S3 object's s3:BucketTag/ reads its bucket's tags, an S3 Tables
table's s3tables:TableBucketTag/ its table bucket's and an S3 Vectors index's s3vectors:VectorBucketTag/ its vector
bucket's, while their aws:ResourceTag/ keeps the table's and the index's own. The S3 User Guide says so of each: the S3
Tables key "acts on the tags applied to the table bucket that contains that table", the S3 Vectors key "references tags
associated with the vector bucket containing that index, while the aws:ResourceTag/tag-key will reference the tags of
the index itself", and s3:BucketTag is "applicable only after ABAC is enabled on your bucket", which S3's reader already
holds to. s3:BucketTag on an access point's object, whose ARN names no bucket, is not read. --check validates each entry
against the formats, --verify against the reference; the table changes in those entries alone.
IamConditionContextResolver.resourceTags adds the container keys, read from the stored tags of the container's ARN, and
S3's bucket policy checks read them with the bucket's ABAC tags: a request's own and a copy's of its source (CopyObject,
UploadPartCopy), which read no bucket tags before, aws:ResourceTag included. Floci does not model S3 access points, so
their s3:AccessPointTag and aws:ResourceTag read nothing, as before.
The Service Reference now gives athena:GetQueryResultStream the workgroup type, which the IAM data drift gate this
change runs reads: the table is synced, and no request member names the workgroup. docs/services/iam.md no longer lists
s3:GetBucketTagging, s3:DeleteBucket and DeleteBucketTagging as reading the bucket's tags apart, which #9920 removed.
S3BucketTagIamEnforcementIntegrationTest runs each of its checks with aws:ResourceTag/team and s3:BucketTag/team, a
cross-account copy among them; S3TablesIamIntegrationTest and S3VectorsIamIntegrationTest check that an allow on the
bucket's team reads that bucket and a table or index of it tagged otherwise, and refuses another bucket and its table or
index tagged with the team; IamConditionContextResolverTest that a table's two keys hold its bucket's and its own tags;
RequestResourceMembersTest the section's parse, lookup and refusals; test_regen_iam_request_resources.py the reading,
the vendored entries and the validation.
AWS::Lambda::Function accepted RecursiveLoop but ignored it. The
provisioner now validates the value before changing the function and
applies it through PutFunctionRecursionConfig, on create and when an
update changes it, keeping the same physical function. Removing a value
the template declared restores Terminate, and a stack that never
declared it leaves a setting made through the Lambda API in place.
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
Adds the parts of the EKS update surface UpdateClusterConfig left out.
ListUpdates lists a cluster's update ids, filtered by add-on or node
group and paged. UpdateClusterConfig now applies changed subnet and
security group lists as a VpcConfigUpdate (at least 2 subnets in the
cluster's VPC, at most 5 security groups), and a CloudFormation update
applies them in place. controlPlaneEgressMode is kept, reported and
updatable, and deletionProtection refuses DeleteCluster while it is set,
checked under the same lock as the delete. A request mixing update types
in one resourcesVpcConfig is refused, as EKS does.
Refs #5640
The request-resources table gives aws:ResourceTag keys to S3's bucket and object types, but S3 gave IAM no tags, so an
aws:ResourceTag condition on an S3 action never matched. The S3 User Guide says "you can control access to S3 resources
based on the bucket's tags", that S3 "evaluates this condition key only after you enable ABAC on your bucket", and its
example bucket policy conditions s3:GetObject on a bucket's objects on the bucket's tag.
tools/aws/fetch_s3_tag_inheritance.py vendors those sentences and the example's object resource and condition key into
tools/aws/sources/s3-tag-inheritance.json, refusing a reworded page. TAG_INHERITANCE_SOURCES grants it for s3, beside
API Gateway, and tag_parents gives the object type, whose path continues the bucket's past a '/', the bucket as its tag
parent.
S3StoredResourceArns reads S3Service.storedTags: the tags of the general purpose bucket the ARN names, only while its
ABAC status is Enabled, read in place with no legacy entry moved (the caller's bucket, or with the global bucket
namespace the one of that name another account owns, one get per owning account), copied under the lock its tag writes
hold, and none for an object or no bucket. Bucket names are one namespace here, a request signed for any partition
reaching the same bucket, so the ARN's partition is not matched against the bucket's. IamConditionContextResolver gives
an object its bucket's tags from tagParents, and no longer gives s3:GetBucketTagging, s3:DeleteBucket and
DeleteBucketTagging the bucket's tags itself, ABAC or not. S3's own bucket policy check reads the same tags, so a bucket
policy conditioned on aws:ResourceTag grants a caller from another account what it says. s3:BucketTag/<key> is not read:
the generator's resource-tag key reading takes ResourceTag keys alone.
The Service Reference and the IAM identifiers page changed upstream, and the IAM data drift gate this change runs reads
both: tools/aws/sources/iam-identifiers.json and the table are synced, adding IAM's workload identity provider and
template types and their operations, Bedrock's and Redshift Serverless's new types, and new Athena, Budgets and STS
operations. The generator took a type of no variables of its own for the account's one, which every request names, even
where its format lies within another type's the action acts on: Redshift Serverless's expressConfiguration,
workgroup/express/express-default, is a workgroup of a fixed name, and GetCredentials was checked on it beside the
workgroup its workgroupName names. Such a type is now named only by a request naming it, which leaves GetCredentials
checked on the named workgroup alone.
S3BucketTagIamEnforcementIntegrationTest checks that a caller allowed s3:GetObject, s3:ListBucket and the bucket's
tagging actions only on resources tagged team=blue reads and lists a blue bucket with ABAC enabled and reads its tags,
and is refused a red one and a blue one whose ABAC is off, its tagging actions included; and that a bucket policy
granting another account s3:GetObject on blue buckets lets that account read the blue one and not the red.
S3BucketStoredTagsTest checks the read and its refusals; IamConditionContextResolverTest that an object has its bucket's
tags and that a bucket action's request context leaves the bucket's tags to its stored tags;
test_fetch_s3_tag_inheritance.py the fetcher; test_regen_iam_request_resources.py the object's parent and the fixed-name
type; IamRequestResourceEnforcementIntegrationTest that a caller allowed GetCredentials on one workgroup gets its
credentials and is refused another's.
GetTableBucket, ListTableBuckets, GetNamespace, ListNamespaces, GetTable
and ListTables now return tableBucketId and namespaceId where the S3
Tables model defines them, and GetNamespace and ListNamespaces return
the required createdBy and ownerAccountId. New buckets and namespaces
get a random id their children repeat; a bucket or namespace stored by
an earlier Floci gets one derived from its bucket's ARN and its name, so
every read returns the same id.
A bulk send in which no entry names a recipient is now answered entry by
entry ahead of the checks that refused the whole call. SendBulkEmail no
longer refuses default or replacement template data that is not a JSON
object: with no recipient every entry answers "Destination cannot be
empty", and with one the entry fails on its own after the sender check.
SendBulkTemplatedEmail gives the per-entry answer ahead of an unknown or
paused configuration set too, and SendEmail answers template data that
does not parse with "Unable to parse template data (invalid JSON)."
A general purpose bucket's tags control access to it only once attribute-based access control (ABAC) is enabled on it:
"By default, ABAC is disabled for all Amazon S3 general purpose buckets", and aws:ResourceTag is evaluated "only after
you enable ABAC on your bucket". Floci served neither PutBucketAbac nor GetBucketAbac and answered both 501
NotImplemented.
The bucket now holds an ABAC status, read and written at the bucket's owner as its other configurations are.
PutBucketAbac takes a whole AbacStatus document holding one Status of text alone, sets Enabled or Disabled and refuses
anything else, a broken document, markup inside Status or a lowercase status among it, with MalformedXML "The XML you
provided was not well-formed or did not validate against our published schema", the status left as it was; GetBucketAbac
answers Disabled until it is set. While it is Enabled, PutBucketTagging and DeleteBucketTagging are refused with
BadRequest "This S3 general purpose bucket has attribute-based access control (ABAC) enabled. To add tags to this
bucket, initiate a TagResource request. To delete tags from this bucket, initiate an UntagResource request.", the tags
kept: S3 Control's TagResource and UntagResource change them, and GetBucketTagging still lists them. The statuses, codes
and sentence are AWS's recorded answers; DeleteBucketTagging's refusal, which no recording gives, takes the same answer,
whose sentence speaks to deleting too, as the API reference says the operation can no longer be used. IAM already checks
the two operations as s3:PutBucketAbac and s3:GetBucketAbac from the vendored REST routes. PutBucketAbac sets the status
under the lock the tag writes hold, so a PutBucketTagging that saw ABAC disabled finishes before it is enabled.
CreateBucket now sets the tags its CreateBucketConfiguration carries on the new bucket before storing it, and a repeated
create of a bucket the caller already owns, which the default Region answers as done, leaves that bucket's tags as they
are, so neither can change the tags of a bucket under ABAC.
S3BucketAbacIntegrationTest checks, through the SDK, the Disabled default and the roundtrip, the refused spellings and
bodies with the status kept, a repeated create leaving an ABAC bucket's tags, and, under ABAC, PutBucketTagging and
DeleteBucketTagging refused with the tags kept, TagResource tagging and PutBucketTagging working again once ABAC is
disabled; IamActionRegistryTest the two operations' IAM actions; S3UnservedBucketSubresourceIntegrationTest no longer
counts ?abac unserved.
AWS::EC2::FlowLog dropped LogGroupName, so a stack that named its log
group that way created a flow log with no group. The provisioner now
passes it to EC2, and an update compares the effective group, from
LogGroupName or the LogDestination ARN, so a tag-only update keeps the
same flow log either way while a changed group still needs replacement.
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
A cluster node started before #9825 keeps its old k3s arguments when
Floci restores it, so its API server still dials kubelets through k3s's
agent tunnel, which a node whose own kubelet registers it doesn't open,
and kubectl logs, exec and port-forward to its pods fail. A new node
container now carries io.floci.eks.egress-selector=disabled, and on
restore a surviving node without it, in a cluster with Auto Mode compute
on, is replaced on its data volume, as an out-of-date node already is.
Part of #8914
The request-resources table gives resource-tag keys to Rekognition's collection type and Macie's member type, and both
services keep the tags those resources are created with, but neither gave IAM them, so an aws:ResourceTag condition on
one of their actions never matched.
RekognitionStoredResourceArns now reads RekognitionCollectionService.storedTags: the tags of the caller's collection the
ARN names, in its Region, read in place with no legacy entry moved. MacieStoredResourceArns, new, reads
MacieService.storedTags: the tags of the member the caller's administrator account holds that the ARN names. Each read
answers only an ARN equal to the stored resource's own, so another partition's ARN of the same Region and name has none.
Floci serves no Macie operation on an existing member yet (only CreateMember and ListMembers), so Macie's reader is
ready for GetMember, DeleteMember and the tag operations rather than read today.
StoredResourceTagIamIntegrationTest checks that a caller allowed rekognition:DescribeCollection only on collections
tagged team=blue describes the blue one and is refused the red one; RekognitionCollectionServiceTest and
MacieServiceTest check each read, its copy, and the ARNs that name nothing (another account, partition, Region or kind,
or a resource no longer held). Each fails without its reader.
BatchGetCustomEntityTypes reads 1 to 50 named custom entity type
definitions in the caller's account and Region, returning the ones it
holds in CustomEntityTypes and the missing names in
CustomEntityTypesNotFound. Under IAM enforcement the call is authorized
as glue:BatchGetCustomEntityTypes, as the generated tables give it.
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
A v2 template send without TemplateData, or with an empty string, read
it as {}. SendBulkEmail now answers 400 BadRequestException "The default
template data does not exist" and SendEmail "Template data cannot be
empty", ahead of the configuration set lookup and the sender check.
A SendBulkEmail in which no entry names a recipient answers every entry
INVALID_PARAMETER "Destination cannot be empty" even when its
configuration set is unknown or paused. With a recipient, a bulk send
looks its configuration set up first and refuses a paused one only after
the sender check.
The request-resources table gives resource-tag keys to 66 API Gateway types, but API Gateway gave IAM no tags, so an
aws:ResourceTag condition on an apigateway action never matched. Its Developer Guide also says that in the V1 API "child
resources inherit the tags that are set on parent resources", naming RestApi, DomainName and UsagePlan as the parents,
and that a stage's own tag "takes precedence" over the one it inherits.
ApiGatewayStoredResourceArns reads ApiGatewayService.storedTags and ApiGatewayV2Service.storedTags: the tags of the
caller's REST API, stage, custom domain name, API key, usage plan or VPC link, and of an HTTP or WebSocket API and its
stages, by the first segment of the ARN's resource path, in its Region, read in place from each store with
readInAccount, no legacy entry moved. The REST API's tag writes and the V2 service's now hold the service's monitor and
replace the tag map instead of changing it in place, as the custom domain's, VPC link's, API key's and usage plan's
already did, so a read copies a map no writer changes.
tools/aws/fetch_apigateway_tag_inheritance.py vendors the guide's sentences into
tools/aws/sources/apigateway-tag-inheritance.json, refusing a reworded page. The generator gives each type whose
resource path continues a parent the page names past a '/' that parent, with the parent's format in the type's variable
names (tagParents), from the formats alone: 27 types under RestApi, the 5 under DomainName the guide lists and 4 under
UsagePlan; the V2 API's are under none. RequestResourceMembers reads it, and IamConditionContextResolver lays an ARN's
own tags over its parent's, the parent's ARN filled from the ARN.
The regeneration also takes the Service Reference's new ec2:FailoverVolumes.
test_fetch_apigateway_tag_inheritance.py checks the fetcher's copy and refusals; test_regen_iam_request_resources.py the
parent formats, the parents given and the check of them; RequestResourceMembersTest the read and refusals;
IamConditionContextResolverTest that a method has its REST API's tags under its own and a V2 route none;
ApiGatewayStoredResourceArnsTest each kind's read, a custom domain name and a VPC link of either API, a legacy usage
plan read in place, and its copy; ApiGatewayPathArnEnforcementIntegrationTest that a caller allowed apigateway:GET on
team=blue reads the blue REST API, its resources and a blue HTTP API, and is refused the red REST API, its resources and
the HTTP API's routes.
An EC2 instance's container was created through ensureImageExists, which
reuses the image id a reference named the first time it was seen, so a
worker image rebuilt under the same tag never reached a new instance
until Floci restarted. A launch now resolves the AMI's dockerImage with
resolveImageForLaunch under PREFER_CACHED, as EMR does, reading the
local tag again and pulling only when it is missing, and creates the
container from the image id it returns. An instance already running
keeps the image it started from.
Part of #8914
A $share/<share name>/<topic filter> subscription was matched literally
against each topic, so its subscriber never received anything. It now
joins the group its share name and topic filter name: each matching
publish goes to one connected member of each group, chosen at random,
at the lower of the publish and subscription QoS, as AWS IoT Core
distributes it. A share name that is missing, holds /, + or #, or is
over 128 characters, or a topic filter over 256 characters, is refused
in the SUBACK. A shared subscription gets no retained message on
subscribe, and iot:Subscribe must allow both the $share/ form and the
plain filter. A group with no connected member gets nothing, and the
shared subscription quotas are not enforced.
Closes#9889
CreateKey checked that a key's algorithm serves its KeyUsage but not the
usage itself, so a key of a usage the reference does not list was made.
A key the service creates must now carry a usage from the reference's
list, or the call fails with ValidationException; an imported key keeps
the usage its block carries. The tests that made M0 and P1 keys with
CreateKey use listed usages instead.
Closes#8982
A subscriber with a Lambda target and BatchConfiguration.MaxBatchSize 1
invoked the function with [event]; AWS sends the event object itself, as
Floci now does. The shape is fixed when the batch is built, so a batch
already waiting keeps its array if UpdateSubscriber sets MaxBatchSize to
1. Any larger MaxBatchSize still sends an array, even of one event.
CreateCustomEntityType, GetCustomEntityType, ListCustomEntityTypes and
DeleteCustomEntityType store a regular expression and optional context
words per account and Region. The list filters by tag and pages with
MaxResults and NextToken.
A definition's tags live in the shared tagging store under its
customEntityType/<name> ARN, as other Glue resources' do, so GetTags,
TagResource, UntagResource, the list filter and aws:ResourceTag
conditions all read the same tags. Create replaces the ARN's tags and
delete clears them, each rolling back if the other write fails.
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
PutTableBucketMetricsConfiguration, GetTableBucketMetricsConfiguration
and DeleteTableBucketMetricsConfiguration now store the setting with the
table bucket. Get returns the bucket's ARN and the fixed id EntireBucket,
and answers NotFoundException "No such metric configuration exists"
while the configuration is off; a delete is idempotent. The bucket
record is replaced atomically, and a snapshot stores the setting only
for an enabled bucket, so older records start with metrics disabled.
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
An EKS Auto Mode node from an image whose own kubelet registers it saw
the Docker host's CPUs and memory as its capacity, not its instance
type's. The instance's NodeConfig now sets the kubelet's systemReserved
to the host's size beyond the type's, less what nodeadm's CPU tiers take
from the host's extra cores, so the node offers what the type offers on
AWS. A host no bigger than the type, or one whose size can't be read,
reserves nothing.
A launch's candidate types, a node still joining and a consolidation's
replacement are sized by what a node of the type offers pods: its CPU
less the EKS AMI's kube reservation tiers, and its memory less 11 MiB
per pod plus 255 MiB and the 100 MiB eviction threshold, as Karpenter
counts it. Pool limits still count the type's capacity.
Part of #8914
TagResource, UntagResource and ListTagsForResource were unknown
operations, so changing the tags of a Network Firewall rule group,
firewall policy or firewall failed. They now edit and read the same tag
lists create and describe use, for a resource in the request's region.
TagResource overwrites an existing key and UntagResource ignores an
absent one. Tags are validated as the model defines them, on TagResource
and on the create-time Tags, with at most 50 on a resource, and a
refused request changes nothing. Every ResourceNotFoundException in the
service now says "No object with the provided name or resource
identifier was found", as AWS does. ListTagsForResource returns every
tag in one page.
Closes#6992
A DocumentDB snapshot with users, roles and custom indexes could fail to
restore into a new cluster. The archive is now restored in two passes:
documents and indexes first, then the target's users and roles, so
indexes on application collections and on user-created collections in
admin survive. A target with no MongoDB backend to receive the archive
refuses the restore with InvalidRestoreFault, and a failed restore
discards only the cluster it created, checked by resource ID, so a
same-named replacement is left alone.
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
SendSSHPublicKey stored every key as the account root's, whoever signed
the request. The key is now stored under the request's caller, as
RequestCallerResolver resolves it, so the #Caller= line of the
active-keys document IMDS serves names the IAM user's ARN for an IAM
user, the assumed-role session ARN for a role session, and the account
root's ARN for the root. The instance agent logs that line as the key's
IAM principal.
Closes#9873
CreateEventBus with a name that exists, and CreateSubscriber with a name
that exists on the bus, now answer 409 ResourceAlreadyExistsException
with "Resource already exists", as AWS does and as the event source
creates already did. A CloudFormation rollback that cannot put a
subscriber back answers the same. The five sites share one helper.
The request-resources table gives resource-tag keys to SageMaker's model, endpoint configuration, endpoint and
training job types and to BCM Data Exports' export type, but neither namespace gave IAM the tags it stores, so an
aws:ResourceTag condition on one of their actions never matched.
SageMakerStoredResourceArns reads SageMakerService.storedTags: the tags of the caller's model, endpoint configuration,
endpoint or training job the ARN names, in its Region, by the resource part the ARN starts with, read in place and
copied under the monitor AddTags and DeleteTags change them under. BcmDataExportsStoredResourceArns reads
BcmDataExportsService.storedTags: the ResourceTags an export's create gave it, read in place under its ARN.
StoredResourceTagIamIntegrationTest checks a caller allowed sagemaker:DescribeModel and bcm-data-exports:GetExport
only on resources tagged team=blue reaches the blue one and is refused the red one; both fail without the readers.
SageMakerServiceTest checks the read, its copy, the ARNs that name nothing, and that a model, an endpoint
configuration, an endpoint and a training job of one name answer their own tags by their own ARNs.
The domain status DescribeElasticsearchDomain and the OpenSearch domain
calls share now carries DomainProcessingStatus: Creating while the domain
starts, Active once it is ready, and Deleting once it is deleted.
terraform-provider-aws's aws_elasticsearch_domain create waits on it
reaching Active, so every create timed out before.
Closes#7767
AllocateAddress, AssociateAddress, ReleaseAddress, CreateNetworkInterface,
DeleteNetworkInterface, AttachNetworkInterface and DetachNetworkInterface
ignored DryRun and did the real call. They now answer it with
DryRunOperation and change nothing.
As AWS answered these calls in us-east-1, the dry run is answered before
any resource is looked up, so an unknown or in-use allocation, interface,
instance, subnet or attachment still gets DryRunOperation. Only what needs
no lookup is refused first: a tag specification Floci refuses, and a
member the call's model marks required, with MissingParameter.
Part of #8220
FLOCI_SERVICES_IAM_OUTBOUND_FEDERATION_ISSUER_ID fixes the default
account's outbound web identity federation issuer to
https://<uuid>.tokens.sts.global.<suffix>, so a stack can name that URL,
and the key set route the same UUID keys, before the feature is enabled.
Unset, the issuer is minted as before. Other accounts always mint their
own, since an issuer resolves back to its account by that UUID alone.
The value must be the lowercase 8-4-4-4-12 form the discovery routes
match, or Floci refuses to start. An issuer already minted outlives a
disable, so the setting takes hold only on a volume that has not enabled
the feature yet. When a stored issuer overrides it, at the start or on a
re-enable, that is logged at debug with both values.
Cognito user pools now word their refusals as AWS does, built in one
place (CognitoErrors). Codes and statuses are unchanged.
- An unknown user answers "User does not exist." on the admin and
signed-in operations, and "Username/client id combination not found."
on ForgotPassword, ConfirmForgotPassword, ConfirmSignUp and
ResendConfirmationCode.
- "Incorrect username or password.", "Invalid Access Token",
"Invalid Refresh Token" and "Group not found.".
- A missing app client answers "User pool client does not exist." on
DescribeUserPoolClient and UpdateUserPoolClient, "User pool client
<id> does not exist." elsewhere, and names the pool for another
pool's client. The pool is checked before the client.
- UpdateUserPool and CreateUserPoolClient on a missing pool answer with
an empty message.
- "Domain already exists.", RevokeToken's "Unsupported token type", the
duplicate custom attribute message and the two MFA preference
sentences.
- AdminInitiateAuth answers "Auth flow not enabled for this client" for
a disabled flow, refresh included. A client whose flows are only the
legacy values still refreshes.
Every by-id client lookup goes through describeUserPoolClient, and the
in-pool check through one clientInPool.
AWS::ApiGateway::Stage now stores MethodSettings on create and update.
Each entry is keyed the way API Gateway keys a stack's method settings,
the ResourcePath without its leading slash and then the HTTP method: /*
with * is */*, the root is ~1/GET, and /~1pets~1owners is
~1pets~1owners/GET.
An update writes only the methods and fields the templates declare. An
entry the new template drops is removed, a field dropped from a kept
entry returns to its default, and methods set outside the stack are
kept. Rollback restores only the fields the update changed and removes
the entries it added.
Closes#9513
The Service Reference ends every DMS resource type's ARN format in a wildcard where the resource goes
(arn:${Partition}:dms:${Region}:${Account}:endpoint:*), which the table reader matches as written, so no DMS request
was checked on the resource it names: one naming an endpoint, an instance or a task by its ARN stayed on *, and no
aws:ResourceTag condition on a DMS resource could match.
The DMS User Guide gives what goes there: "An ARN for an AWS DMS resource uses the following syntax:
arn:aws:dms:region:account number:resourcetype:resourcename". tools/aws/fetch_dms_arn_formats.py vendors that page
(the syntax, the sentence saying what its resource name is, and its table of formats) into
tools/aws/sources/dms-arn-formats.json, pairs the syntax with each Service Reference DMS format ending in a wildcard
by its resource type, and writes that format with the page's placeholder where the wildcard was
(arn:${Partition}:dms:${Region}:${Account}:endpoint:${resourcename}). A reworded page, or a table row whose type no
such format has, is refused. regen_iam_request_resources.py takes those formats as they stand (ARN_FORMAT_SOURCES,
granted for dms alone), each checked to differ from the Service Reference's only where its wildcard was, and verifies
the source against the live pages beside the other vendored sources.
The generator's existing machinery then names a DMS resource by the ARN a request passes, or fills the format from
the identifier a request names it by. DmsStoredResourceArns finds such an identifier, or an ARN DMS holds, as DMS
stores it (an endpoint's, an instance's or a task's ARN ends in the id DMS minted, not in its identifier; one stored before keys carried the account is the default account's and found too), and reads
the tags of an endpoint, instance, task or subnet group for aws:ResourceTag, both in place. A subnet group's ARN
ends in its identifier as DMS stores it, in lower case ("This value is stored as a lowercase string"), so the reader
resolves an ARN naming one in another case to that one (resolveStoredArn). A request leaving out
an optional ARN names the resource DMS uses for one naming none, of which it has none. A replication instance whose create
names no subnet group goes into the account's default replication subnet group, so the reader answers that group as
the one such a create acts on (findImplicitDefault), and the create is checked on subgrp:default.
The fetcher also copies what AWS answers each DMS create with, from AWS's recorded exchanges with DMS (the AWS
Emulator evaluation suite's wire tests, "a recorded exchange with AWS") and botocore's examples: whether the ARN of
what the create makes ends in a member of its request (a subnet group's in its ReplicationSubnetGroupIdentifier, an
event subscription's in its SubscriptionName) or in a value the request does not give (an endpoint's, an instance's,
a task's, a certificate's: botocore's example answers EndpointIdentifier "test-endpoint-1" with
endpoint:RAAR3R22XSH46S3PWLC3NJAWKM). The generator's rule for a variable a create's response answers, which stays open
whatever member a rule would fill it from, reads that too (with_recorded_mints), both for what a create is checked
on and for what its tags are checked on: CreateEndpoint, CreateReplicationInstance and ImportCertificate are checked on
what they make with its id open (rep:*), the tags of CreateReplicationTask, CreateDataProvider and
CreateInstanceProfile on what they make likewise, and no other row of the table changes. The creates of data
migrations, migration projects, replication configs and assessment runs have no recorded answer and keep their
fills. A modify renaming an instance is still checked on rep:<new name> beside its own ARN, nothing
being recorded for it.
The regeneration also takes the Service Reference's new SageMaker candidate, leaderboard and model monitor config
actions.
A pool whose consolidationPolicy is WhenEmptyOrUnderutilized (the default)
or Balanced (Auto Mode's built-in pools') now consolidates a node whose
workload pods have stayed the same for its consolidateAfter. When they fit
on the pool's other Ready nodes, the node is tainted, drained and removed as
an empty node is. Otherwise, when a smaller type the pool allows holds them,
the node is tainted karpenter.sh/disrupted:NoSchedule, a replacement is
launched, and the old node goes once the replacement is joined and Ready.
A pool replaces one node at a time, and the budgets that cover Underutilized
count. A do-not-disrupt pod, a pod pinned to named nodes, or a
PodDisruptionBudget allowing no disruption keeps the node; once a
replacement is Ready, such a pod holds the old node until a later pass can
drain it. A replacement that is gone, or not Ready within 10 minutes, is
called off: the old node's taint is lifted, and it is uncordoned if a failed
drain left it cordoned. WhenEmpty pools keep only removing empty nodes.
Part of #8914
Request templates of WebSocket AWS and HTTP integrations were rendered against
the whole Lambda proxy event with a nearly empty $context. $input is now the
client's message (base64 for a binary frame, empty on $connect and
$disconnect), and $context the route's request context, in response templates
too, where $input stays the integration's reply. VtlContext's
gatewayResponseContext is renamed requestContext, and gateway responses behave
as before.
Refs #9835
DescribeRouteTables reported a route to a deleted NAT gateway as active. Route
state for a NAT gateway target is now read from the gateway record in the route
table's account and region when routes are described or sent to route table
listeners: a gateway that is gone, or not available, reads as blackhole, and the
route keeps its destination, origin and gateway ID until it is replaced or
deleted. Deleting a NAT gateway writes no route table, so a failed delete or a
CreateRoute or ReplaceRoute racing it cannot leave a stored state behind.
DeleteRouteTable takes the table lock that an egress-only internet gateway
delete holds while it blackholes routes, so that write cannot bring a deleted
table back.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
Signed-off-by: Jackson Price <jxnprice@amazon.com>
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
A container definition's healthCheck was stored and returned but never given to
Docker. The image's HEALTHCHECK ran instead and decided healthStatus and whether a
dependsOn HEALTHY condition was met, so a task whose dependency had its check only
in the task definition failed to start.
The definition's check is now set on container creation, with ECS's defaults
(interval 30, timeout 5, retries 3) for the members it leaves out, since Docker
would otherwise take them from the image. A definition without a healthCheck
creates the container with a NONE test, so the image's check doesn't run and
health stays UNKNOWN, as on ECS. ContainerSpec and ContainerBuilder gain an
optional health check; other services leave it unset and keep the image's.
Closes#9831
"Presto, the previous version of Trino, is still available for use with Amazon EMR", and Floci ran nothing for a
cluster with Presto. With presto.enabled on, such a cluster runs the Presto project's PrestoDB as Floci runs Trino: its
coordinator beside the metastore, its workers on the core and task nodes, the presto- classifications, presto-cli for
its steps and a host of its own for clients outside the cluster. A cluster that names Trino too runs Trino, as the two
"can't run simultaneously on the same cluster". PrestoDB authenticates a client only over its own HTTPS and lets
everyone in over HTTP, so a cluster whose presto-config sets http-server.authentication.type runs no PrestoDB, and its
host answers 403 with why.
Since #9182 the master is NOSUPERUSER NOREPLICATION, so PostgreSQL refuses
ALTER ROLE ... REPLICATION from it and the workaround the page gave no longer
works. The page now says so, except where the master is the bootstrap
superuser, and that a member of rds_replication logging in with its password
cannot open a replication connection and needs an IAM token for one.