* fix(lambdaweb): refuse a function name another region already has
AWS keeps web function names unique across the regions of an account.
CreateWebFunction with a name another region has is 409
ConflictException "A function named <name> already exists in the
account. Function names must be unique across all regions in an
account.", at the same point as the same-region conflict.
* fix(lambdaweb): key the function name lock by account
* perf(lambdaweb): find a name in other regions without copying every key
* feat(ses): add the v2 reputation entity operations
Implement ListReputationEntities, GetReputationEntity,
UpdateReputationEntityPolicy and UpdateReputationEntityCustomerManagedStatus.
Every tenant is a reputation entity referenced by its full ARN. The policy
and the customer-managed status live on the tenant record, and the status
is the tenant's aggregate SendingStatus. A tenant whose status is DISABLED
is now refused on SendEmail and SendBulkEmail with MessageRejected.
Shapes, messages and validation order follow probes against real SES.
* test(ses): surface unexpected tenant cleanup failures in the reputation compat test
Load an opt-in regional catalog when EC2 is enabled, canonicalize and validate its IPv4 entries, and reuse the read-only discovery and security-group paths. Resolve AWS-managed CIDRs for policy evaluation and firewall generation alongside customer-managed lists.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
A Task can now use the six optimized EMR Serverless integrations the
Step Functions guide lists: createApplication, startApplication,
stopApplication, deleteApplication, startJobRun and cancelJobRun, each
request-response and .sync. Each calls Floci's EMR Serverless in the
state machine's Region. They failed with "Unsupported resource" before.
A Task names the API's members in PascalCase where the API writes them
in camelCase, so a request and a response are mapped against botocore's
EMR Serverless model, now vendored as aws/emr-serverless-shapes.json by
tools/aws/regen_emr_serverless_shapes.py: a structure's members are
renamed, a map keeps the keys the state machine wrote (tags,
InitialCapacity's DRIVER, a configuration's Properties such as
spark.executor.memory), and a member the model does not have is
dropped. A member, ApplicationId and JobRunId included, may be written
in either case. One the model has and Floci's request class lacks is
refused rather than dropped, and a test holds the classes to the model.
request_shapes.py can now keep output shapes for it. A request
without ClientToken gets a random one, as the SDK fills an idempotency
token in; the guide's examples leave it out.
The result is the API's response in PascalCase, or {"ApplicationId"}
where the API answers nothing, as the guide's table says. The guide
finds no difference between a .sync response and the API's, so a .sync
result is the starting call's own: state machines read a
createApplication.sync result's ApplicationId and a startJobRun.sync
result's JobRunId. A .sync Task records TaskSubmitted and polls
GetApplication or GetJobRun until the state the guide names, as the
elasticmapreduce ones do; a run that ends FAILED or CANCELLED, or an
application that can no longer get there, fails the Task with
States.TaskFailed and the describe response as the cause. A wait that
ends early cancels the run of a startJobRun.sync, stops the application
of a startApplication.sync and deletes the one a createApplication.sync
made, the call each integration's IAM policy grants beyond its own and
its read. EMR Serverless answering that the application or run is gone
or past undoing is logged and leaves the Task ending as it was; any
other failure is raised.
An EMR Serverless error keeps its code under EmrServerless., the
exception prefix the guide gives the service; no record shows the
optimized integration's. A Task without the ApplicationId, or a
cancelJobRun without the JobRunId, it acts on fails with
States.TaskFailed before EMR Serverless sees it.
CreateApplication now stores the configurations UpdateApplication
already did (runtime, monitoring, scheduler, disk encryption,
interactive, Identity Center and job-level cost allocation), and
ImageConfiguration keeps applicationLevelDigestResolution. Both were
dropped, from a Task and from the API alike. A runtime configuration
kept only its properties, lifted out of their member: Jackson bound the
properties member to the field of that name holding every member read.
It keeps its classification and properties now, on update as well.
GetApplication no longer returns the application's clientToken, which
its Application has no member for and which the .sync waits read. The
token stays with the stored application, which CreateApplication's
retries are matched on.
The .sync wait loop the elasticmapreduce integrations had is now shared
by both, as are their request and failure helpers, and the two EMR
Step Functions tests share their state machine helpers.
Part of #6046 (part 11).
Under IAM enforcement an RDS or DMS request that names a role went through without iam:PassRole on
it. AWS's Service Reference lists iam:PassRole, passed to rds.amazonaws.com or dms.amazonaws.com,
for each of these operations, so a caller allowed to change a database could attach any role in
the account to it.
RDS, to rds.amazonaws.com:
- AddRoleToDBCluster, AddRoleToDBInstance, RemoveRoleFromDBCluster, RemoveRoleFromDBInstance,
CreateDBProxy and ModifyDBProxy pass RoleArn, and StartExportTask passes IamRoleArn;
- CreateDBInstance, CreateDBInstanceReadReplica, ModifyDBInstance, CreateDBCluster,
ModifyDBCluster, RestoreDBClusterFromSnapshot and RestoreDBClusterToPointInTime pass the
Enhanced Monitoring role, MonitoringRoleArn ("The user that enables Enhanced Monitoring must be
granted the PassRole permission.");
- they, RestoreDBInstanceFromDBSnapshot and RestoreDBInstanceToPointInTime pass the directory role
DomainIAMRoleName names, checked on the ARN IAM holds it under, since the name carries no path;
- CreateDBCluster and the two cluster restores pass each role in AssociatedRoles, at any index and
in either list form, as the RDS handler reads them;
- ModifyOptionGroup passes the role each option it includes takes in its IAM_ROLE_ARN setting, as
SQL Server's native backup and audit options do, read as the handler reads OptionsToInclude.
DMS, to dms.amazonaws.com: CreateEndpoint and ModifyEndpoint pass ServiceAccessRoleArn and the
role members the DMS model gives each engine's settings structure (ServiceAccessRoleArn,
SecretsManagerAccessRoleArn, SecretsManagerOracleAsmAccessRoleArn), and CreateReplicationInstance
and ModifyReplicationInstance pass KerberosAuthenticationSettings.KeyCacheSecretIamArn.
docs/services/iam.md lists the operations and the roles they pass.
Under IAM enforcement a REST request whose route no rule maps is let through unchecked. No EKS
route had a rule, so any signed caller could create, read, change or delete clusters, node groups,
Fargate profiles, add-ons, access entries and Pod Identity associations with no EKS permission, and
without iam:PassRole on the roles they named. A Pod Identity association hands its service
account's pods the credentials of its role, so a caller could have pods run as any role in the
account.
Every operation of the eks model now has a rule and is checked as the action of its own name, as
the Service Authorization Reference gives it, including the routes Floci does not serve yet, and
IamRestRouteCoverageTest checks the whole model. Floci takes an access entry's principal as the
rest of the path, so a GET or DELETE under an entry reads or deletes an entry: the entry's access
policy routes, which Floci does not serve, run as DescribeAccessEntry and DeleteAccessEntry and are
checked as those.
Each is checked against the resource the reference gives it, in the caller's account, where EKS
looks everything up:
- a cluster against the ARN EKS holds it under, or cluster/<name> in the request's Region for one
it holds none of, and CreateCluster against the cluster its body names, as the EKS user guide's
example policy for creating a cluster grants it;
- a node group, Fargate profile, add-on, access entry or Pod Identity association against the ARN
EKS holds it under, which ends in an id the request does not carry, read through
EksService.findResourceArn with the lookups its handlers make; listing and creating them, and the
other routes under a cluster, against the cluster;
- DescribeUpdate against the add-on the update was made to, since the updates Floci keeps are its
add-ons' and EKS returns one whether or not the request names its add-on, and otherwise the
cluster;
- a tagging request against the caller's cluster named after the ARN's last /, as EKS tags it.
The roles each operation passes need iam:PassRole, with iam:PassedToService the value the Service
Reference gives: the cluster role, node role, Fargate pod execution role and an add-on's service
account and Pod Identity roles go to eks.amazonaws.com, a Pod Identity association's roleArn to
pods.eks.amazonaws.com ("The IAM principal that is creating the association must have
iam:PassRole."), and an EC2_LINUX or EC2_WINDOWS access entry's principal to ec2.amazonaws.com.
The router also matches a path with a trailing slash as the path without it, while the rules
matched the slash: POST /clusters/, GET /schedules/ and GET /2015-03-31/functions/<name>/ reached
their operation unchecked. A route is now matched without its trailing slash, as the router
matches it. An S3 path is matched as sent, as before: an S3 key may end in a slash, as a folder
marker's does, and S3's rules already take a bucket's one trailing slash.
docs/services/iam.md says which EKS routes are mapped, what each is checked against and the roles
they pass.
* fix(rds): run MySQL and MariaDB with their parameter group values
A DB cluster parameter group or DB parameter group was stored but never
reached the engine: the container started with only the authentication
option, so the database kept MySQL's built-in defaults.
Every container start (create, reboot, stop and start, emulator restart)
now passes the group's overrides as --loose-<name>=<value> server options:
the cluster parameter group for a cluster, the DB parameter group for a
standalone instance. The loose prefix makes the server skip an Aurora-only
parameter with a warning. Formula values and the parameters that decide
where the server listens and keeps its data are left out, and Floci's
authentication options come last so the proxy keeps working.
DescribeDBClusters now reports DBClusterParameterGroup.
Fixes#5946
* fix(rds): layer the Aurora writer's parameter group and switch groups on modify
Review follow-up:
- require_secure_transport and skip_grant_tables are no longer passed to
the server, like port and socket: Floci's proxy talks to MySQL without
TLS, and skip_grant_tables turns networking off, so either would lock
every client out.
- An Aurora cluster's engine now runs with its DB cluster parameter group
and the writer instance's DB parameter group on top, so an
instance-level value such as max_connections reaches the database.
Creating the writer restarts the cluster's container when its group
changes the engine's options; every later start reads the writer's
group too.
- ModifyDBCluster takes DBClusterParameterGroupName and ModifyDBInstance
takes DBParameterGroupName. The group is checked against the engine
before anything else in the request is applied, recorded at once, and
used from the database's next start (a reboot), as on AWS.
* fix(rds): apply Aurora groups on a writer reboot and report incompatible-parameters
Review follow-up:
- RebootDBInstance on an Aurora cluster's writer restarts the database the
cluster's members share, which is how AWS applies a changed DB cluster
parameter group or writer DB parameter group. A reader's reboot still
only restarts its endpoint.
- time_zone reaches the server as --default-time-zone, since MySQL has no
time_zone option, and Aurora's binlog_format=OFF, which turns binary
logging off and which MySQL refuses as a value, as --skip-log-bin.
- A server that stops while starting with its parameter group's options
leaves no container, and its instance, or every member of its cluster,
reports incompatible-parameters until a reboot starts it with values the
server accepts. Floci logs the server's error lines.
- DescribeDBClusters names a default DB cluster parameter group only when
DescribeDBClusterParameterGroups lists it.
- The integration test reboots the writer rather than the cluster, checks
that binary logging is off, covers a refused value, and skips through
RdsRequests.assumeDocker.
---------
Co-authored-by: Priamo <pgermosen@gmail.com>
* feat(lambdaweb): serve the Lambda metadata endpoint
AWS gives each environment AWS_LAMBDA_METADATA_API, AWS_LAMBDA_METADATA_TOKEN
and AWS_LAMBDA_RUNTIME_API, all at one server. It answers the zone id to a
Bearer token with any method, "Client.Unauthorized" with 401 to anything
else, Go's 404 to another path before the token, and a 307 to the clean
path.
* fix(lambdaweb): take the metadata port outside the Runtime API range
The width of that range is the Lambda concurrency, and its ports are only
reached over the Docker network, as any other port is. A listen that fails
now closes its server.
* fix(lambdaweb): start the metadata server before a start mints a session
A metadata server that could not start left the role session and the token
of an environment that never ran.
Reclaim disposable anonymous volumes while preserving adopted containers during failed recovery. Retain pre-reboot dumps and failed cleanup ownership across partial teardown. Preserve the original database when only proxy shutdown fails. Share startup orchestration while retaining the opt-in cleanup policy.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
Normalize subnet IPv6 responses and expose regional availability-zone network borders. Keep the read-only regional test at a unique execution order.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
Every SES v2 operation reads its body through readOptionBody, now also
CreateEmailIdentity, CreateEmailTemplate, UpdateEmailTemplate,
CreateCustomVerificationEmailTemplate,
UpdateCustomVerificationEmailTemplate and TagResource, which read a body
that is not a JSON object as one without members. Only an empty body is
read as one without members; a whitespace-only body, malformed JSON and
anything but whitespace after the object are a SerializationException
without a message, as AWS answers them. The hand-rolled copies in the
tenant, contact, account, identity, import job, send, dedicated IP,
suppression and template controllers, which answered malformed JSON
with a BadRequestException carrying Jackson's message, are gone, and so
is the import job controller's own strict reader. The operations that
answer an empty body with "Request body is required." no longer give
that answer for a whitespace-only one.
Honor group preferences and inherited targets in the shared launch path. Preserve failed launch state, limit fallback to capacity shortages, and validate all supplied numeric Query target members. Reuse existing SDK coverage.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
Pin the Rocky 10 backing image to the release already advertised by its catalog identity and documentation.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
Normalize Route53 record identity without mutating records before batch commit. Reuse the shared ASCII record-name normalization for alias comparison, as requested in maintainer review.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
The configured Rocky 9 image reports 9.3, while the catalog advertises 9.6. Use the explicitly versioned Rocky image and update the documented mapping.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
Require reserved capacity for direct, template, Fleet and Auto Scaling launches. Preserve the targeted shortage message shared with restart. Keep CloudFormation timeout fixtures in their separate contribution.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
* feat: support Redshift Data API client token idempotency
* test: verify Redshift Data API retry compatibility
* fix: address Redshift Data admission and cleanup races
* refactor(redshift-data): remove implicit in-memory receipt constructor
Match the IoT Data Long response contract instead of emitting floating-point seconds. Cover both retained read responses with fixed values, missing-timestamp controls, and SDK wire round trips.
Fold only ASCII DNS letters and accept an optional trailing dot while keeping distinct target values and rejected batches intact. Exercise compatibility cases using the suite endpoint.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
* feat(lambdaweb): check the execution role as AWS does
AWS refuses a revision whose execution role is in another account with
403 AccessDeniedException. It refuses a role that does not exist or does
not trust lambda.amazonaws.com with 400 ValidationException, and that
check gives no aws:SourceAccount or aws:SourceArn. An environment
assumes the role with the function as its source, and a request gets
502 Platform.CannotAssumeRole when Lambda can no longer assume it.
* fix(iam): match a wildcard principal and the service keys in service trust
{"AWS": "*"} lets Lambda assume a role, and a Deny on it refuses the role.
Lambda sets aws:PrincipalIsAWSService to true and aws:PrincipalServiceName
to its principal when it checks the role and when an environment assumes it.
* fix(lambdaweb): answer CannotAssumeRole when the role goes during a start
A role deleted after the trust check gave the container the account's
placeholder credentials. AWS answers 502 Platform.CannotAssumeRole for a
deleted role.
* fix(organizations): return OU and account paths
* fix(organizations): stabilize list path rendering
Render selected resources from request-local parent IDs without leaf rereads. Preserve scoped ancestry errors and tolerate concurrent removal or movement. Reduce account collection scans for a full 20-row page from 21 to 1.
* refactor(organizations): share ancestry walk and path format
Keep live, CloudFormation, and cached list paths on one traversal with caller-supplied parent lookups. Preserve scoped fallback and stale-row handling, and cover root-to-leaf path parity at three depths.
Retarget provisioned alias allocations while retaining quota and cleanup ownership. Isolate failed replacement writes or unsupported targets to their allocation so unrelated configurations continue reconciling. Retry the retained allocation when its target or storage recovers.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
Return ReservationCapacityExceeded when a matching targeted reservation lacks capacity at precheck or admission, including restart. Preserve mismatch errors and existing resource cleanup.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
* feat(redshift): support default IAM roles for COPY and UNLOAD
* fix(redshift): distinguish default role keyword from literals
* fix(redshift): accept blank default IAM roles
Delegated access has two ceilings and only one of them belongs to the request.
The twelve hours sessionDurationType declares are held at the filing, where
SessionDuration arrives. The other is the approver's, and the user guide's own
note states it: "The maximum duration for delegated access is 12 hours.
However, root users can only approve delegation requests with a duration of 4
hours or less. If a request specifies more than 4 hours, you must use a
non-root identity to approve the request." Nothing read it, so the account root
could approve a twelve-hour delegation and the credentials it bought ran that
long.
It is read at the approval rather than at the filing, because that is where the
approver is known: a request longer than four hours is refused for root and the
same request is approvable by an IAM user or role of that account, which is the
remedy the note itself names. Root is the caller whose ARN ends in :root, what
this family already names an approver by, and what a key naming no IAM user
resolves to, so approving a long request locally means signing as a user rather
than with a bare account id.
AcceptDelegationRequest models NoSuchEntity, ServiceFailure and
ConcurrentModification and nothing for this, and no source gives the code AWS
answers, so AccessDenied is chosen and recorded in docs/services/iam.md: the
guide states the rule as which identity may approve, which is what the
release's own OnlySendByOwner rule already answers that way.
Five tests. Three on the service: the refusal at five hours with the privileged
user then approving the same request, the cap itself approved at four hours
exactly, and twelve hours approved by a user to show the cap is the approver's.
Two over the wire: the same refusal where the account id is the signing key,
and the release's id check answered for an id that breaks its pattern rather
than one that is absent, which the absent half's test left uncovered.
* feat(msk): add SCRAM secret association metadata APIs
Add association, listing and disassociation endpoints with persisted metadata and secret validation. Broker user management and reconciliation follow separately.
* test(msk): enhance cleanup logic in MskTest for SCRAM secrets and KMS keys
* fix(msk): accept resolved secret ARNs with generated suffixes
* fix(msk): reject KMS alias ARNs for SCRAM secrets
Closes#6229
* fix(msk): reject partial secret ARNs with operation-specific errors
* fix(msk): clean up SCRAM associations for deleted clusters
Add scheduled, account-aware cleanup of association left after cluster delete
* fix(msk): allow disassociation of deleted SCRAM secrets
* feat(firehose): store and echo CloudWatchLoggingOptions on S3 destinations
CreateDeliveryStream and UpdateDestination silently dropped CloudWatchLoggingOptions because the S3 destination model had no such member. The block is now stored and echoed on both ExtendedS3DestinationDescription and S3DestinationDescription, defaulting to {"Enabled": false} when omitted, as real AWS does. UpdateDestination merges it member-wise, so an update naming only Enabled keeps the stored log group and stream.
* fix(cloudformation): forward Firehose processing and logging configuration
FirehoseCfnProvisioner now reads RoleARN, ErrorOutputPrefix, CloudWatchLoggingOptions and, for the extended S3 destination only, ProcessingConfiguration, resolving intrinsics before handing them to the service. A Lambda transform declared in a template therefore runs on delivery and is echoed by DescribeDeliveryStream, as on AWS. An omitted member stays null so an UpdateStack keeps the stored value, and an unreadable block fails the resource with ValidationError.
* test(cloudformation): cover a stack Firehose stream's Lambda transform end to end
A stack-created extended S3 stream now reads back its role, error prefix, logging options and
Lambda processor, runs that processor on delivery, and picks up a new function on UpdateStack.
* docs(firehose): describe logging options and the CloudFormation members applied
Document how CloudWatchLoggingOptions is stored, defaulted and merged on the S3 destinations, and note which DeliveryStream properties the CloudFormation provisioner applies.
* fix(cloudformation): validate a Firehose stream's forwarded destination like CreateDeliveryStream
The provisioner now runs the same wire-shape validation CreateDeliveryStream applies, so a bad processor or CompressionFormat fails the resource instead of being stored. A structured destination member present as anything but an object also fails rather than being silently dropped.
* docs(cloudformation): name every Firehose property the provisioner applies
* fix(firehose): validate CloudWatchLoggingOptions names against AWS constraints
LogGroupName and LogStreamName are now checked against AWS's 512-character bound and their modeled patterns, reporting both rules when both fail, as probed against real AWS.
* chore: retrigger CI after a transient npm publish race
native arm64 / sdk-test-node ran npm install between the publication of @aws-sdk/lib-storage 3.1156.0 and @aws-sdk/client-s3 3.1156.0, and failed with ERESOLVE.
* test(firehose): share the delivery and Lambda transform helpers in FirehoseRequests
Moves encode, putRecordBatch, firstKey and the record-id driven Lambda transform answer out of CloudFormationFirehoseIntegrationTest and FirehoseLambdaTransformIntegrationTest into one testing fixture both now use.
* fix(firehose): require both log names when CloudWatch logging is enabled
With Enabled true, a missing or empty LogGroupName or LogStreamName is now refused with AWS's InvalidArgumentException, group before stream, on the merged result for UpdateDestination and ahead of the other semantic checks, as probed against real AWS.
* fix(firehose): fill the defaults on a Redshift destination's S3 backup
Create and describe now apply the S3 defaults, including CloudWatchLoggingOptions Enabled false, to a Redshift destination's backup configuration as well as its intermediate one, so persisted streams heal on read.
* feat(sqs): publish AWS/SQS queue metrics to CloudWatch
Every active queue now reports the AWS/SQS metrics once a minute on the
QueueName dimension: the depth gauges, ApproximateAgeOfOldestMessage, the
send, receive, delete and empty-receive counters, SentMessageSize, and for
FIFO queues the in-flight groups and deduplicated sends. The samples follow
what SQS sends on AWS, so alarms, GetMetricData and GetMetricStatistics see
queue metrics without PutMetricData.
The CloudWatch metric store is now journaled under persistent mode, as the
CloudWatch Logs event store is, since it takes a write per metric per active
queue every minute.
Closes#6275
* fix(sqs): stamp queue metrics with the minute that ended
The publisher now ticks just after each minute boundary and stamps its
samples with the minute that ended, so a call counts in the minute it was
made instead of the minute of a startup-relative tick. A queue whose write
fails no longer stops the others, and the log names it. A queue deleted and
created again between the snapshot and the lookup is skipped instead of
reporting the old queue's depth under the new one.
* fix(sqs): bound AWS/SQS metric history and finish the tick on shutdown
The publisher now drops AWS/SQS datapoints older than the 15 days AWS keeps
one-minute data, once an hour, so the history it generates for an active
queue stays bounded. On shutdown it stops before the storage flush and waits
for a running tick, so the last minute is not written after the store closed.
* test(sqs): keep the scheduled metrics tick out of the test run
The acceptance test publishes its own ticks, but the scheduled one could
still stamp the test queue's depth into a complete period newer than them,
since a tick stamps the minute that just ended. floci.services.sqs.
cloudwatch-metrics-enabled now turns the tick off, and the test
configuration does, as it does for the S3 lifecycle sweep. It also lets a
user opt out of the AWS/SQS metric volume.
* test(sqs): build the metrics test's queue service with SqsServiceFactory
* fix(dsql): enforce IAM and the cluster's policy on the control plane
A cluster's resource-based policy governs DSQL's control plane as well as
its connections (measured, eu-west-1): a Deny of dsql:GetCluster,
UpdateCluster, TagResource or GetVpcEndpointServiceName refuses that call,
and a call it does not name still answers. With IAM enforcement on, Floci
left every DSQL control plane route unchecked: no rule in
IamActionRegistry mapped one, so the policies, identity or resource, were
never read there.
IamActionRegistry maps every operation of DSQL's model to its action, the
stream operations Floci does not serve included, and
IamRestRouteCoverageTest now checks all of them against botocore's routes,
vendored for DSQL by regen_rest_routes.py. ResourceArnBuilder names the
resource each call is checked against, as the Service Authorization
Reference gives it: the cluster, the stream, or the ARN a tagging route
names, minted in the request's partition. CreateCluster and ListClusters
are checked against cluster/*, as DSQL checks them (measured; the
reference lists ListClusters with no resource). The enforcement filter
then reads the cluster's policy through DsqlResourcePolicyProvider, as it
reads a topic's or a function's.
* fix(dsql): check tagging at /tags too, where the ARN is in the query or body
Asked in review: Floci serves DSQL's tagging at /tags as well as at
/tags/{arn}, naming the ARN in the resourceArn query parameter or body field,
and the rules matched only the path form, so a bare /tags call reached DSQL's
tag handler unchecked. The rules now match both, as Scheduler's do, and the
control plane test tags, lists and untags through each form.
* fix(ses): answer SES v2 wire-type errors with AWS's messages
A scalar for a map member is "Expected map or null", a string, boolean,
object or list for an integer member gets the Integer conversion message,
and a number is narrowed to an int the way AWS reads it (1.5 is accepted,
a value above the int range saturates before the range check). A body that
is not a JSON object is a SerializationException instead of a BadRequest.
* test(ses): give the new SES v2 tests their own order and share the non-object bodies
* fix(lambdaweb): let heap flags in NODE_OPTIONS replace the defaults as AWS does
AWS drops both of its heap flags when NODE_OPTIONS names
--max-old-space-size or --max-semi-space-size, and puts those on the
command line in their place. Floci kept its own flags, so a larger heap
set in NODE_OPTIONS lost to --max-old-space-size=1024.
* test(lambdaweb): copy a quoted heap value from NODE_OPTIONS as AWS does
AWS puts --max-old-space-size="1536" on the node command line with its
quotes. Node refuses that value, so the start fails with
Runtime.ExitError.
* docs(lambdaweb): put the NODE_OPTIONS sentences after the require.main one
* test(lambdaweb): share the default heap flags in the NODE_OPTIONS tests
Initialize and route qualifier-owned provisioned environments without invoking handlers during initialization. Keep configuration outcomes committed while failed removal remains owned for retry, and bound cleanup after late invocation release. Preserve on-demand spillover and the separate alias-retargeting stage.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
DSQL evaluates a cluster's resource-based policy when a client connects
(measured, eu-west-1): an explicit Deny that applies to the caller refuses
the connection with the hint "User: <caller> is not authorized to perform:
dsql:<action> on resource: <cluster ARN> with an explicit deny in a
resource-based policy", under the statement's conditions, aws:PrincipalArn
and aws:SourceIp among them, and a statement that does not apply leaves the
caller's own policies to decide. With IAM enforcement on, the endpoint
checked only the caller's identity policies.
DsqlResourcePolicyProvider supplies a cluster's policy through
ResourcePolicyProviders, as the SNS and Lambda providers do, and the
endpoint evaluates it with the caller's policies and SCPs as
LambdaTaskAuthorizer and LambdaWebIamAuth evaluate a function's policy:
evaluateResourcePolicyFor, then evaluateResolvedResourcePolicy, with the
client's address as aws:SourceIp. With enforcement off nothing is
evaluated, as for every other policy in Floci.
DsqlService already built the cluster policy's context for the lockout
check and the "is not authorized" sentence for the tag refusals; both now
come from DsqlPrincipals (policyContext, notAuthorized), which the endpoint
uses too, instead of a third copy.
The policy also governs control plane calls on DSQL (measured), but Floci's
IAM enforcement names DSQL's control plane resources as *, so that is left
as it is.
A bucket with Object Lock is versioned for good. PutBucketVersioning
with Suspended on such a bucket now answers 409 InvalidBucketState and
leaves it Enabled, and PutObjectLockConfiguration on a bucket whose
versioning is unset or suspended answers 409 InvalidBucketState and
enables nothing, matching the AWS-recorded messages. CloudFormation goes
through the same PutBucketVersioning path, so an update that suspends a
locked bucket rolls back.
Both checks run with the write under the bucket monitor, and CreateBucket
with Object Lock now enables versioning and the lock in one step, so no
concurrent request can leave a locked bucket suspended.
Buckets stored in either state by an earlier release load as they were;
the null-version protection for them is unchanged, and its tests now set
that state on the stored bucket.
TagResource, UntagResource and ListTagsForResource now take job run ARNs
(.../applications/<id>/jobruns/<id>), which the model's ResourceArn
allows ("the supported resources are Amazon EMR Serverless applications
and job runs"). They work on the tags StartJobRun stores, so GetJobRun
reports the current set, under the same rules as an application's: at
most 50 tags, no "aws:" prefix. An ARN must be the run's own, so one of
another application or account names nothing, and once an application
is deleted its runs' ARNs name nothing, as its own ARN already does. A
session ARN, which the pattern also allows, now answers
ResourceNotFoundException rather than ValidationException, as sessions
are not emulated.
ListJobRunAttempts (GET .../jobruns/{jobRunId}/attempts) and GetJobRun's
attempt parameter report attempts. Nothing runs, so no run fails and
none is retried: every run is one attempt, number 1, created and updated
with the run. GetJobRun, ListJobRuns and ListJobRunAttempts carry it.
GetJobRun with attempt 1 or none returns the run; another attempt
answers ResourceNotFoundException, in Floci's words, as no source shows
AWS's answer for an attempt a run never made, and leaves the run as it
was.
Also from the #6202 review:
- From release emr-7.11.0 a BATCH run's executionTimeoutMinutes must be
1 to 10080. The model: "the maximum value is 10080 minutes (7 days)
starting with Amazon EMR release 7.11. Setting a value of 0 to disable
the timeout is no longer supported for BATCH mode job runs." Earlier
releases and STREAMING runs keep 0 to 1,000,000. No source gives the
error; ValidationException, in Floci's words. The check runs before
auto-start, under the application's lock, so a refused run leaves the
application as it was.
- ListJobRuns refuses a state or mode that does not exist and more than
8 states, and ListApplications a state that does not exist and more
than 7, with the framework ValidationException. A typo listed nothing
before. ListApplications' maxResults outside 1 to 50 now answers the
same framework message, joined with any states violation.
- EmrServerlessRegionIntegrationTest uses EmrServerlessRequests, which
gains tagsPath, and pins a job run ARN across Regions;
EmrServerlessTagIntegrationTest moves onto the same helpers.
The enum and range violations are now SmithyValidationErrors.notInEnum,
notAllInEnum and outOfRange, which EMR Serverless uses.
Part of #6046 (part 9).
Add the requested control-plane stage: Put/Get/Delete validation, persistent desired configuration, qualified IAM resources, and cleanup on version, alias, and function deletion. Share the function concurrency lock with reservation changes. Runtime initialization and invocation routing remain separate.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
The ninth and last operation of IAM temporary delegation, and the last one the
model publishes that is not an M3 404: a delegation request now comes back as a
Markdown summary instead of UnsupportedOperation, which takes IAM to 177 of the
180 operations botocore 1.43.113 publishes.
AWS generates that text with a large language model, so this is the one piece of
the family that cannot be its answer. What is sourced is the format, the
reference's own example answering "Human readable summary in Markdown format",
and the shape: EntityArn 20 to 2048, Locale 2 to 12, SummaryContent up to 10000
characters and the four SummaryState values. Every line is read off the record,
so one request summarizes the same way twice: what is being asked for, by whom,
for how long, and where it has got to. The services and actions the console
credits its AI summary with are the one half missing, for the same reason
nothing renders a PermissionPolicy here, that no API registers the template AWS
resolves one from, so the template and its parameters are named instead.
Who may read a summary is who may read the request, which the reference states
outright, so the lookup is GetDelegationRequest's and so is the NoSuchEntity it
answers. The request is authorized against the ARN Floci mints around the id
EntityArn names, which is the one its five by-id siblings already resolve: a
policy naming one request authorizes that request alone, and a deny on it holds
however the caller respells the ARN. An ARN of another service names no request
of IAM's to summarize.
Four answers are chosen rather than read, each recorded in docs/services/iam.md:
an ARN of another entity type is NOT_SUPPORTED, a locale Floci does not write is
NOT_AVAILABLE with no content, a value that is no ARN at all is the modeled
InvalidInput, and an id inside a well formed ARN that no id could match is
NoSuchEntity rather than a constraint failure.
The text is the requester's, and the summary is Markdown, so it is escaped
rather than passed through: the model lets a description, a message and a
parameter value carry newlines and backticks, which would otherwise forge a
heading, a bullet or a code span inside a document read as Floci's own account
of the request. A parameter value the record does not hold is left out, and an
indexed value arriving as a key with nothing under it is no longer stored as
one.
* fix(ec2): skip addresses stored resources hold when the VPC network allocates
The VPC network's allocator reads only its lease table, but a launch that
names an address while a failed launch is still giving it back keeps the
address without a lease, and so does a network interface created with its
own address. assignPrivateIp now asks for another address while the one it
got is held by a stored instance, network interface or NAT gateway in any
account, so a later launch's Docker attach no longer fails on an address
that is already in use. The addresses it walks past are given back once it
is done, since their holders took no lease of their own.
Closes#6283
* fix(ec2): keep the fallback off addresses the VPC network walk skipped
When the walk past held addresses runs the Docker-backed allocator dry,
the synthesised fallback checked only the caller's account, so on a shared
default subnet it could hand out the address another account's resource
holds. It now skips the addresses the walk found held as well.
* test(ec2): share the mocked-network and RequestContext setup in Ec2ServiceTest
requestContexts builds the RequestContext CDI mock that four helpers and
tests each built for themselves, and mockedVpcNetworkService replaces the
mock-mode new Ec2Service(..., vpcNetworks) the private-address tests
repeated. The comment on why jakarta.enterprise.inject.Instance is written
out in full lives in requestContexts.