In the docker runner mode a Hive application's job run failed without
running ("Floci runs Spark job runs only"). It now runs: Floci starts
hive in a container of the release's EMR Serverless Hive image
(public.ecr.aws/emr-serverless/hive/<release>, or the new
hive-image-template), with Tez in local mode in Hive's JVM, S3A on
Floci's S3 and the Glue Data Catalog client, the image's metastore, on
Floci's Glue in the run's account.
- hive gets the core-site, tez-site and hive-site classifications as
--hiveconf settings, the application's then the run's, a run's
classification replacing the application's; then -i initQueryFile
and -f query; then the run's parameters, whose --hiveconf settings
take priority, as the user guide ranks them.
- The run's hive.exec.scratchdir and hive.metastore.warehouse.dir are
used as it sets them, in S3. Tez in local mode copies a session's
staging folder, which Hive puts under the scratch folder, to the same
path in the container, a copy that silently does nothing where the
image's hadoop user cannot create that path. The container starts as
root, makes that path hadoop's, sets the Tez addresses EMR
Serverless's runtime would set, then runs hive as hadoop in its home
folder, with the groups Docker gives it. The scratch folder is the
last hive.exec.scratchdir setting, in any form Hive's CLI reads:
--hiveconf name=value, --hiveconf=name=value, with one dash or two,
or the value as the next argument.
- A Hive application's custom image is its HiveDriver worker type's,
else the application's; Tez's tasks run in the driver's container, so
a TezTask image is not used.
- The driver's stdout.gz and stderr.gz go to the run's HIVE_DRIVER log
folder, and its CloudWatch log streams are under HIVE_DRIVER, the
entry of logTypes it reads; Hive's own log stays in the container.
- A run whose driver is not its application's type, hive on a Spark
application or sparkSubmit on a Hive one, fails without running.
spark-defaults go through the same classification merge. The
Docker-gated EmrServerlessHiveDockerIntegrationTest runs the user
guide's Hive job and a failing query in the emr-7.5.0 Hive image, which
the CI prefetch pulls for its shard. EmrServerlessRequests'
createApplication takes the application's type, and S3TestClients'
deleteBucket empties and deletes a test's bucket.
Under IAM enforcement, DataSync, EMR, Rekognition and IAM Identity
Center requests were checked on `*`, so a grant scoped to a DataSync
agent, an EMR cluster, an Identity Center permission set or a
Rekognition custom model was refused, and a deny scoped to one never
applied.
The generated table of the resources requests name now reads them, 276
operations, from AWS's Service Reference and botocore as it reads the
earlier batches: their namespaces move from the generator's
NOT_COVERED to NAMESPACES and the table is regenerated, nothing in it
edited by hand; 1385 operations over 33 namespaces. Each resource
type Floci serves has the ARN format it mints: DataSync's
`agent/agent-<id>`, `location/loc-<id>` and `task/task-<id>`, EMR's
`cluster/<id>`, and IAM Identity Center's instances and permission
sets, with no Region or account. Of Rekognition, Floci serves the image
analyses alone, which act on no resource but a custom model.
Corrections, each with its reason:
- EMR requests naming a cluster by its job flow id, JobFlowId or
JobFlowIds (AddInstanceGroups, AddJobFlowSteps, DescribeJobFlows,
TerminateJobFlows and the four Set operations), are checked on that
cluster: a job flow's id is the cluster's.
- EMR's AddTags and RemoveTags are checked on the cluster their
ResourceId names, the one Floci tags, not on the one their ClusterId
gives, which only scopes a session-scoped resource's tags. Read as
generated, a ClusterId the grant covers would have let a request tag
another cluster.
- EMR's ModifyInstanceGroups may leave out its ClusterId ("Required:
No") and name each instance group by its id alone, which EMR then
finds the cluster of. Such a request is checked on the cluster each
group is in, where it was checked on `*`; a null ClusterId is read as
none, as the handler reads it. An InstanceGroups that is not a list
names no group to the check, and the handler now refuses it as naming
none, where it modified the groups an object's values named.
- Rekognition's stream processor operations are checked on
`streamprocessor/<Name>`: the Developer Guide's example gives a
processor named streamProcessorForCam the ARN
`...:streamprocessor/streamProcessorForCam`.
- IAM Identity Center's CreateAccountAssignment,
DeleteAccountAssignment and ProvisionPermissionSet are also checked on
the account their TargetId names, `account/<id>`, which the action
acts on beside the instance and the permission set. A
ProvisionPermissionSet for ALL_PROVISIONED_ACCOUNTS names no TargetId
and provisions the permission set to every account it is provisioned
to (the User Guide: up to 3,500 accounts that way, one with
AWS_ACCOUNT), so it is checked on each of them, where a grant on the
instance and the permission set alone let it through. Its TargetId
names the account only for AWS_ACCOUNT, so a null one with
ALL_PROVISIONED_ACCOUNTS names none.
The two lookups are the existing `through` entries, which named the
cluster or workgroup a Redshift Data session runs on: one may now read
each value of a list's field, and apply only `when` the request names
its resource no other way. StoredResourceArns.through gives a list of
ARNs, which EmrService and SsoAdminService now answer from what they
store, EmrService under the lock its handlers change clusters under.
Fixes the new formats needed:
- DataSync's ARN formats, and IAM Identity Center's applications' and
trusted token issuers', name their account `${AccountId}` where every
other format has `${Account}`. The generator now reads that slot as
`${Account}`, so the caller's account fills it; a new Identity Center
application was otherwise checked on `arn:aws:sso::*:application/*/*`,
which no account-scoped grant matches.
- Identity Center's application providers are AWS's own,
`arn:aws:sso::aws:applicationProvider/<id>`. An ARN of a type whose
format fixes the account as `aws` is now checked in that account
alone, not also as the caller's own copy, which does not exist and
which a grant on the provider did not cover. An ARN of any other type
giving the account `aws` is still checked as the caller's too.
- A permission set, an application or a trusted token issuer an
Identity Center create makes is in the instance its InstanceArn
names, whose id its ARN carries, `permissionSet/<instance id>/<id>`.
It was checked with both ids open, which no grant scoped to an
instance's permission sets matched. The generator now fills a variable
no member fills from the ARN of another type the action acts on whose
format is that variable alone, given by the ARN member named after it.
Left as generated, on `*`: Rekognition's CreateStreamProcessor and
StartMediaAnalysisJob, which name their collection or model two
structures deep, where the table reads none, and which Floci does not
serve.
Elastic Beanstalk and Redshift Serverless, which have as few resource
types, stay unread, each with its reason: an environment's ARN carries
an application name its requests do not give, and Redshift Serverless'
ARNs end in ids its requests name by name, so both need the stored
ARNs found first.
iam.md lists the four services, and AWS Payment Cryptography, which
the table already read, and gives the corrections, the rule for an
AWS-owned resource's ARN, and the cluster, accounts and instance the
lookups and the creates are checked on.
Captures from a real account on issue 6042 answer three refusals this
emulator had written for itself, each wrong in its code or its status
rather than only in its wording.
ChangePassword answered InvalidParameterValue 400 naming the user for a
wrong old password. AWS answers AccessDenied 403 and "Either the new
password does not conform to the account password policy or the old
password was incorrect.", which is now what it sends, as captured. The
sentence names both of the operation's causes without saying which one
refused the call, so a caller who cannot prove the current password
learns nothing about the policy either.
That it names the policy half does not settle the policy half. The
capture covers a wrong old password with a conforming new one, nothing
records AWS answering it for a password the policy refuses, and the
model declares PasswordPolicyViolation on this operation for exactly
that case, so a new password the account policy refuses keeps that error
and the rule it names, as it does on CreateLoginProfile and
UpdateLoginProfile. The old password is still read first, so a request
with both halves wrong answers the capture.
PolicySourceArn on SimulatePrincipalPolicy and
GetContextKeysForPrincipalPolicy resolved an entity out of whatever
followed the last slash, so arn:aws:iam:user/bob simulated as the user
bob. It is now held to AwsArnUtils.isArn before either simulator
resolves it, answering InvalidInput "Invalid ARN provided in the
request: <value>". A valid ARN that names neither a user nor a role
still answers the entity-type refusal it answered before.
GetAccessKeyInfo answered InvalidParameterValue quoting an id the
account never issued. AWS answers ValidationError "Access key ID is not
valid.", for an AKIA and an ASIA id alike, which also settles that it
refuses such an id rather than decoding the account out of it.
The wire and unit tests pin the two halves of the password refusal
answering differently and the order they are read in, both simulators
against three unparseable values and a well-formed one, and the key
refusal over both id formats. One enforcement test had pinned the
unparseable ARN resolving, which the capture overturns.
docs/services/iam.md and docs/services/sts.md carry the three answers,
what each capture covers, and what it leaves open.
Three comments that described these answers before the captures are
corrected with them: handleGetAccessKeyInfo's Javadoc, which still
called its old refusal a documented deviation,
StsAccessKeyInfoIntegrationTest's class comment, which said the same,
and validatedPolicySourceArn's, which said a value clearing 20
characters and parsing as no ARN is left alone and that what AWS answers
for one is not recorded.
CreateDomain and UpdateDomainConfig dropped the zone awareness count, the
dedicated master type and count, EBS IOPS and throughput, advanced
options and the address type, and Floci had no off-peak window or
software update options, so a domain created by
terraform-aws-modules/opensearch planned a change after every apply.
Store and report them, with AWS's defaults for a new domain.
CreateEventBus dropped KmsKeyIdentifier, DeadLetterConfig and LogConfig, which UpdateEventBus already stored, so a bus created with them read back without them. Store them on create and echo them in the response, as the model's CreateEventBusResponse does.
* feat(ec2): add Client VPN endpoints, associations, rules and routes
Store Client VPN endpoints with their target network associations,
authorization rules and routes, and export the OpenVPN client
configuration from the server certificate held in ACM. Fifteen EC2
Query actions; no VPN server runs.
* fix(ec2): apply Client VPN describe filters and pin associated subnets
Apply AWS's filters on the four Client VPN describe operations and refuse
unknown ones. Report selfServicePortalUrl for an endpoint with the portal
enabled. Require every requested security group to exist. Register
associations as subnet and VPC dependencies, saved under the subnet
reference lock. Compare rule and route CIDRs as networks. Replace the
endpoint's lists instead of changing them in place, and let only a
missing ACM certificate leave the export without its CA.
* refactor(ec2): share the Query protocol helpers and the id hex generator
Move the EC2 Query parameter and response helpers Ec2QueryHandler kept
private (getList, getFiltersList, boolParam, intParam, tagSetXml,
booleanResponse, xmlResponse) into Ec2QueryProtocol, which the Client VPN
handler now uses too, and replace the four randomHex copies in
Ec2Service, Ec2IpamService, FlowLogService and Ec2ClientVpnService with
Ec2Ids.randomHex. The Client VPN test builds its requests through
testing.Ec2Requests.
* style(ec2): brace the loop exits in Ec2QueryProtocol
The Podman docs and the web console's start-failure message told SELinux users to relabel the socket mount with :z. On a rootless podman machine (SELinux enforcing) that recipe fails: the web console cannot start and a Lambda invoke returns "Docker is not reachable (Permission denied)". :z fixes access to the socket file, but SELinux also denies connectto from the Floci container (container_t) to the Podman service (container_runtime_t), which a relabel can't fix; --security-opt label=disable avoids it. With it, the same recipe starts the console and invokes a Python Lambda.
* fix(ec2): support NAT gateway secondary addresses
* fix(ec2): update a NAT gateway's secondary addresses in place
A CloudFormation update that changed only a NAT gateway's Secondary*
properties replaced the gateway. The replacement was created while the old
gateway still held its Elastic IP or fixed private address, so it came back
failed with Resource.AlreadyAssociated (or InvalidIPAddress.InUse) and the
update failed. The schema does not mark the secondaries create-only, so AWS
changes them in place and the gateway keeps its id.
Ec2Service.updateNatGatewaySecondaryAddresses sets a gateway's secondaries
to the requested ones: kept ones stay, dropped Elastic IPs are handed back,
new ones are checked as CreateNatGateway checks them, and every check runs
before anything changes. The provisioner calls it instead of replacing, and
records the prior secondaries so a rolled-back update puts them back.
* fix(ec2): keep a NAT gateway's picked secondary when listed ones change
The counted slots of an in-place secondary update kept the first secondary
with no Elastic IP and an address the request does not list. With
SecondaryPrivateIpAddresses [A] and a count of 1 changed to [B] and 1, that
was the dropped listed A, while the address the subnet had picked was given
up. Counted addresses always follow the listed ones, so the counted slots now
keep the last such secondaries, in order.
Tests cover a count changed in place (an unrelated change keeps the same
addresses; 1 to 2 keeps the first; 2 to 1 keeps one of them), the picked
address surviving a listed change, and secondary Elastic IPs swapped between
listed addresses or moved to a new one, with DescribeAddresses showing each
held at its new address.
* test(ec2): pin which counted NAT gateway secondary an update keeps
The counted slots keep the last unlisted secondaries, so a count lowered
from 2 to 1 keeps the second address; the test now asserts that, and that
raising the count from 1 to 2 adds a new address in the subnet after the
kept one. The comment no longer claims counted addresses always follow the
listed ones: slot position is the only record of an address's origin, and
across updates a once-listed address can move behind a picked one.
* fix(ec2): read a NAT gateway under the allocation lock before updating its secondaries
The secondary-address update read the gateway before taking the lock that
DeleteNatGateway holds. A delete finishing in between left the update
holding a stale copy, which it then wrote back, re-associating the Elastic
IPs the delete had released and overwriting the association of a gateway
that had since taken the primary one. The gateway is now read again under
the lock, and one that is gone or deleted is refused with NatGatewayNotFound.
* test(cloudformation): read NAT gateway addresses through XmlParser
The secondary-address tests picked addresses out of DescribeNatGateways and
DescribeAddresses with a regular expression and substring checks that
depended on element order. They now select the non-primary items of
natGatewayAddressSet through XmlParser.
* test(ec2): cover a NAT gateway stored as deleted by a racing tag write
CreateTags writes a NAT gateway back under the gateway's tag lock, which
DeleteNatGateway does not take. A tag write that read the gateway before a
delete therefore stores the very record the delete marked deleted, so the
secondary-address update's deleted-state check is reachable. The test pauses
the tag write's put, deletes the gateway, lets the put finish, and asserts
the update refuses the record with NatGatewayNotFound and holds no Elastic
IP for it.
* refactor(ec2): fill a NAT gateway's address slots in one place
CreateNatGateway and the secondary-address update each walked the gateway's
slots the same way: take the listed Elastic IP and address at each
position, assign a free address where none is listed, build the address,
and give back what was assigned if a later slot fails. Both now call
fillNatGatewaySlots. Create passes its primary address as slot 0 and marks
it primary afterwards; the update passes the slots its kept secondaries
already fill. The order addresses are assigned in, the error codes and the
release on failure are unchanged.
* test(ec2): cover NAT gateway lease release and reuse the shared test helpers
No test covered the lease a NAT gateway gives back when its addresses run
out part way, so the shared slot-filling walk could lose its release with
every test green. Two tests now run a /28 subnet out of addresses, one
through CreateNatGateway and one through a secondary-address update, and
verify the lease taken on the VPC network is released and that the update
leaves the gateway as it was.
The concurrent-delete test now builds its service with mockModeService()
and waits for the blocked update with ThreadStates.awaitBlockedOrDone.
* test(ec2): build the small NAT subnet with privateSubnet
* fix(eks): let guest kubelet own worker node registration
Honor an explicit image catalog capability on initial join and replay. Preserve simulated registration by default and retain join bookkeeping and listeners.
Closesfloci-io/floci#7419
* test(eks): clean up the kubelet registration worker independently
Retain the launched instance ID and terminate it in the original account and region. Attempt worker, tracking and cluster cleanup independently and verify the worker reaches terminated state.
* feat(bedrock-agentcore): add the harness control plane
CreateHarness, GetHarness, UpdateHarness, DeleteHarness, ListHarnesses and ListHarnessVersions were
unknown, so aws_bedrockagentcore_harness could not be created. Harnesses are stored per Region with a
name-<10 alphanumerics> id and settle in READY at once. Each update appends an immutable version, and
members a create leaves out take the defaults AWS fills in, including an AgentCore Runtime
environment named harness_<name>. Tags work on harness ARNs through the shared /tags route.
InvokeHarness moves into the new /harnesses controller unchanged: a request is matched against one
root resource class, so the data-plane controller rooted at / would no longer see /harnesses/invoke.
* fix(bedrock-agentcore): match a harness role ARN with AwsArnUtils.PARTITION_REGEX
* fix(bedrock-agentcore): serve InvokeHarness from a data-plane class of its own
InvokeHarness sat in the control plane's /harnesses controller, so it inherited its JSON-only
@Produces (an Accept: application/vnd.amazon.eventstream request was refused with 406) and was gated
by no service flag, since the controller was missing from ResolvedServiceCatalog.
It now has its own class rooted at /harnesses/invoke, the more specific root, registered with the
data plane, and the harness controller is registered with the control plane.
* refactor(bedrock-agentcore): share one random id suffix helper
The harness registry, and the memory, tools and gateway services before it, each carried their own copy
of the alphanumeric alphabet and the random suffix builder. One random(alphabet, length) and
randomAlphanumeric(length) in BedrockAgentCoreControllerSupport now serve all four; the gateway keeps
its lowercase alphabet for gateway ids.
Record SignIn events for USER_PASSWORD_AUTH, ADMIN_USER_PASSWORD_AUTH,
ADMIN_NO_SRP_AUTH and USER_SRP_AUTH on pools with the Plus feature plan
and threat protection in AUDIT or ENFORCED mode, and list them newest
first with MaxResults and NextToken paging. Other pools get
UserPoolAddOnNotEnabledException. A wrong password is Fail, a sign-in
interrupted by a challenge stays InProgress until it ends in tokens, and
no EventRisk is reported since Floci performs no risk evaluation.
Events are matched to their pool and user by the stored owner, not the
key prefix alone, and a sign-in that ends after its user is deleted
records nothing.
Closes#6137
* feat(redshift): add PutResourcePolicy, GetResourcePolicy and DeleteResourcePolicy
aws_redshift_resource_policy could not be created: the provisioned Redshift API had none of the three operations. They now take the ARN of a Redshift Serverless namespace or a provisioned cluster, the targets of a zero-ETL integration, matched exactly in the caller's account and Region. The policy is kept on its namespace or cluster, so it goes with the resource, and is stored and echoed, not evaluated.
* feat(redshift): return resource policies and their errors as AWS does
Checked against AWS with read-only GetResourcePolicy calls: a stored policy comes back with Version and
Statement first and each statement's Effect, Principal, Action, Resource and Condition first,
pretty-printed, so it is now stored in that form. A namespace that does not exist answers "The requested
namespace doesn't exist."; an ARN in another Region, a namespace id that is not a UUID and an ARN of any
other resource type are InvalidParameterValue with AWS's messages, not UnsupportedOperation.
Adds an SDK compatibility test for the three operations.
* fix(redshift): keep a namespace's resource policy across updates
The Namespace copy constructor, used by tagging, untagging and UpdateNamespace, did not copy the
resource policy, so any of them dropped it. findClusterByArn now reads the ARN through AwsArnUtils.
Without a Version, GetResourcePolicy reached Elastic Load Balancing, which defines the name but does
not serve it; it now goes to Redshift.
* fix(redshift): refuse an empty resource policy before looking the resource up
* fix(cloudformation): delete a stack whose create is still running only once the create stops
* fix(cloudformation): leave a deferred delete to the execution it waits on and report its failure
* fix(cloudformation): refuse a new execution once a delete has been deferred
* test(cloudformation): wait for stack statuses with the shared CfnStackWaits helper
The Web API Reference gives SegmentNumber a minimum of 0 and says "if
the total number of segments is 4, SegmentNumber values range from 0
through 3", but not what a SegmentNumber of TotalSegments or more
returns. Floci returns no partitions for one, and
GlueCatalogClientFieldsIntegrationTest pins it. glue.md's GetPartitions
row now says that answer is Floci's reading.
* fix(dynamodb): authorize ListTables against its regional collection
* test(dynamodb): reject ListTables authorization through ignored selectors
* fix: generate the DynamoDB ListTables request resource
Record the measured table collection as a generated correction and dispatch table-owned operations before hand-built fallbacks. Preserve batch, transaction and PartiQL resource extraction.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
---------
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
* fix(autoscaling): match AWS capacity target validation errors
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
* fix(autoscaling): align sparse target error expectation
Preserve sparse-index and rejected-update state assertions while matching the capacity-target validation message.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
* test: reuse shared clients for capacity target validation
Use AwsTestClients for both SDK clients while retaining the account, region, error matrix and rejected-update state assertions.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
---------
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
* feat(redshift): take a DynamoDB table and a Serverless namespace in zero-ETL integrations
CreateIntegration took only a DynamoDB stream ARN as SourceArn and a provisioned cluster ARN as
TargetArn. AWS takes the table ARN and a Redshift Serverless namespace ARN (its model allows no
cluster: ARN), so a Terraform aws_redshift_integration written for AWS failed to create.
Both AWS forms are now accepted and the original ones are kept. A missing table is
IntegrationSourceNotFoundFault and a missing namespace IntegrationTargetNotFoundFault, as the API
reference lists. A namespace is written through its workgroup into the namespace's database. A
table source reads changes from the table's latest stream, following one turned on after the
integration was created.
Stream records never landed: the writer bound ApproximateCreationDateTime as an Instant, which the
PostgreSQL driver refuses, so only backfilled items reached the landing table. It now binds an
OffsetDateTime as TIMESTAMPTZ.
* fix(redshift): drain a table's replaced stream and match the source table ARN
A table source moved to the table's latest stream as soon as it changed, dropping records the old
stream still held, and moved to no stream when DynamoDB Local reported none for a table whose streams
were turned off. It now reads the followed stream until a read comes back empty, or until the stream
has expired, before moving, keeps it while the table reports no stream, and persists the move.
A source table ARN was resolved by its table name alone, so a table of another account, or an ARN
with more after the name, was taken for the caller's table of that name. The resolved table must now
have the supplied ARN. The docs no longer promise IntegrationSourceNotFoundFault for a missing stream.
* test(redshift): use the shared Docker probe and Query request helpers in the zero-ETL test
The Glue Data Catalog client, which Spark's Glue catalog and Hive's
Glue metastore use on EMR, could not read back a table it had just
created on Floci: "NullPointerException: Cannot invoke
java.lang.Integer.intValue() because the return value of
Table.retention() is null". Floci's Table had no Retention, and its
StorageDescriptor no StoredAsSubDirectories, SortColumns, BucketColumns,
SkewedInfo or AdditionalLocations, so what the client wrote was
dropped, and the client unboxes Retention, Compressed, NumberOfBuckets,
StoredAsSubDirectories and an Order's SortOrder without a null check.
Past that, a partitioned table came back with each partition, and so
each row, five times: the client reads a table's partitions in five
GetPartitions segments by default, and Floci answered every segment
with all of them.
Now:
- Table keeps Retention and IsRegisteredWithLakeFormation, and
StorageDescriptor keeps AdditionalLocations, BucketColumns,
SortColumns, SkewedInfo and StoredAsSubDirectories, and the table and
descriptor copies carry them.
- every table and partition a catalog action returns (GetTable,
GetTables, SearchTables, GetTableVersion, GetTableVersions,
GetPartition, GetPartitions, BatchGetPartition) reads Retention as 0,
IsRegisteredWithLakeFormation as false, and a storage descriptor's
Compressed, NumberOfBuckets, SortColumns and StoredAsSubDirectories
as false, 0, an empty list and false when they were written without
them, as the CLI reference's get-tables output shows Glue doing. The
stored records keep their nulls: Spectrum reads a partition's missing
Compressed as its table's.
- GetPartitions honours Segment, "a non-overlapping region of a
table's partitions": a partition is in the one segment its values
hash to, a SegmentNumber past the last holds none, and TotalSegments
outside 1 to 10, a negative SegmentNumber or a missing member is a
ValidationException, and a member that is not an integer a
SerializationException.
- a SortColumns entry that is null, lacks Column or SortOrder, or has a
SortOrder other than 0 or 1 fails the whole CreateTable, UpdateTable,
CreatePartition, UpdatePartition, BatchCreatePartition or
BatchUpdatePartition with a ValidationException before anything is
stored, as the client unboxes SortOrder on read.
- the EMR runner gives the client the job's account as its
hive.metastore.glue.catalogid, on a cluster and in an EMR Serverless
run. Given none, the client in emr-7.10.0 asks STS GetCallerIdentity
for it through an STS client no setting points at Floci, so a step
reached real AWS STS and failed. The job's own account is what an
unset one means, and a cluster's spark-hive-site or a run's
spark-defaults one, for a Data Catalog in another account, still wins.
IsRegisteredWithLakeFormation is always false, as Floci does not tie a
table to a location registered with Lake Formation.
docs/services/iam.md and IamValidationErrors read as if the capture that
moved IAM's required-member message settled it for every member. It settled
one: an omitted Status, answered from a real account on 2026-10-31 as "Value
at 'status' failed to satisfy constraint: Member must not be null" against
the shape the four credential operations share.
Every other omitted member this service answers, the sites checked by hand
and each required member the model walk reads, carries that form on this
service's reading rather than on a recording: the word null was never a
value AWS sent, an absent member having none to carry. The doc separates the
two and keeps that reasoning, IamValidationErrors says the capture covers
Status alone where the form is decided, and the account-properties test,
which quoted the Status capture beside an assertion on an omitted properties
map, says the reading is what carries over there.
Prose and comments only, no behavior change. Follow-up to #7265.
Follow-up to #7300. redshift-data.md and iam.md said a Redshift Data
ExecuteStatement or BatchExecuteStatement naming its SessionId is
checked on the cluster or workgroup the caller's session runs on, as if
AWS stated it. No AWS page says which resource such a request is
authorized on, so both now say the session's target is Floci's
inference: a session runs on the cluster or workgroup named by the
statement that opened it.
* docs(cloudfront): add a runnable private S3 origin example
* docs(cloudfront): keep the private origin example's cleanup running
Set the CLI output format so a text or table default cannot break jq and
leave a distribution behind. Guard the cleanup steps that could stop it
under set -e, including the empty distribution list on Bash before 4.4.
Move the guide's pointer from Supported Operations to CLI Examples.
* fix(ssm): return a SecureString's KMS ciphertext when a read does not decrypt
GetParameter, GetParameters, GetParametersByPath and GetParameterHistory
returned a SecureString's plaintext whether or not the request set
WithDecryption. AWS encrypts the value with KMS on PutParameter, under the
parameter's key with the PARAMETER_ARN encryption context, and returns
that ciphertext unless the read asks for decryption.
PutParameter now encrypts a SecureString with Floci's KMS and stores the
ciphertext with the version, so every read of a version returns the same
value and KMS Decrypt with the parameter's ARN as context returns the
plaintext. A key KMS cannot use, a value over KMS's 4096-byte limit, and
a version stored before this change are still returned unencrypted.
* fix(ssm): log a SecureString stored without a ciphertext and keep the at-rest note
* fix(ssm): say how AWS encrypts Advanced SecureStrings and reuse the shared test client
* fix(s3): place the encryption condition keys on a put, and on a part from its upload
A policy on s3:x-amz-server-side-encryption or
s3:x-amz-server-side-encryption-aws-kms-key-id read neither key, so a Deny under a
negated operator refused every put, encrypted or not.
A PutObject, CopyObject or CreateMultipartUpload now carries both from its headers, each
value as sent, in the enforcement filter and in S3's own bucket policy check. A part or a
completion sends neither header and carries what its upload recorded when it was created.
A part naming an upload not held answers NoSuchUpload, as S3 does under such a policy.
* fix(s3): check as an object write a PUT or POST naming an upload but not routed as a part
The enforcement filter let through a request naming an upload not held, and judged one
naming a held upload by that upload's encryption, on uploadId alone. A PUT with no
partNumber, or a POST asking for a new upload, creates an object or an upload whatever
that parameter says, so it skipped IAM or read the wrong encryption. Both now match the
routes S3Controller takes as a part or a completion. A part copy naming an upload not held
stays checked, since it names a source.
* test(s3): put the multipart encryption cases beside kmsOnlyBucket
The multipart cases copied S3BucketPolicyEnforcementIntegrationTest's two-statement KMS-only policy
and BUCKET_KEY. They now sit beside kmsOnlyBucket and reuse it, with the policy written once
(putKmsOnlyPolicy). The two cases whose upload is opened before the policy stands use a bucket with
no default encryption, as before: S3 records the bucket's default on an upload that asks for none,
where Floci records only what the request asks for.
* feat(redshift): support MAXERROR in COPY
MAXERROR n of 2 or more now asks the backend to skip records it cannot convert
(ON_ERROR ignore) and to fail the COPY at the n-th one (REJECT_LIMIT n - 1),
which needs a PostgreSQL 18 backend. A MAXERROR of 0 or 1 fails at the first
error, as without the option.
* test(redshift): add PostgreSQL 18 MAXERROR integration test
* test(redshift): use shared DockerAvailability and RedshiftConnections in PostgreSQL 18 IT
Address review feedback on PR #7291:
- Call testing.DockerAvailability.isAvailable() instead of carrying a private copy of the probe.
- Use RedshiftConnections.waitForConnection(cluster) instead of duplicating the JDBC connection wait helper.
* fix(stepfunctions): authorize callbacks with generated resource lookups
Preserve measured callback resource authorization, token ownership and closed-token behavior. Use explicit generated member lookups, retaining ordinary name resolution and invalid-token precedence. Preserve current main Redshift session-through lookups, generator type validation and payment alias consumers.
Signed-off-by: Andre Kurait <akurait@amazon.com>
* test(stepfunctions): reuse the SQS callback queue fixture
Create callback queues through SqsTestQueue and await token JSON with the shared in-process helper. Retain the existing callback authorization matrix, token error precedence and cleanup registration.
Signed-off-by: Andre Kurait <akurait@amazon.com>
---------
Signed-off-by: Andre Kurait <akurait@amazon.com>
* fix(redshift): keep tags, VPC and subnet detail on cluster subnet groups
CreateClusterSubnetGroup dropped Tags and passed a null VPC, so
DescribeClusterSubnetGroups returned no Tags, VpcId, SubnetGroupStatus or
SubnetAvailabilityZone and the Terraform provider saw drift on every plan.
Tags are now parsed (Tags.member.N and Tags.Tag.N) and stored on the group,
where DescribeTags/CreateTags already find them under the subnetgroup ARN.
The VPC and each subnet's zone are resolved from EC2 on create and modify;
subnets EC2 does not know are kept unresolved, as before. Groups persisted
earlier load unchanged (the new zone map is nullable).
* fix(redshift): inject Ec2Service through the constructor
Replace the Ec2Service field injection with a constructor parameter held
in a final field. The previous @Inject signature stays as a package-private
delegating constructor passing null, so hand-built test services still
skip subnet resolution.
* test(redshift): build the EC2 setup requests with Ec2Requests
ec2Id now only extracts the id from the response; the auth header and
Action come from the shared Ec2Requests.ec2 helper.
* test(redshift): make ec2Id a plain path extraction
Call sites build the EC2 request with Ec2Requests.ec2 and pass it in;
the account and region are named constants.
Under IAM enforcement, an ExecuteStatement or BatchExecuteStatement
naming only its SessionId was checked on `*`. A policy allowing one
cluster's or workgroup's ARN let a statement open a session there and
refused the next statement in it, and a deny on that ARN under an
allow on `*` let every statement after the first through.
A session runs on the cluster or serverless workgroup it was opened
on: ListSessions filters sessions "by session status, compute target
(cluster or serverless workgroup), or database", and the SessionId
"can then be used in subsequent ExecuteStatement and
BatchExecuteStatement operations". The Service Reference gives a
session no resource type, so the generator's new THROUGH names the
members a request names a resource through, with the types that
resource may be of: redshift-data:SessionId, on a cluster or a
workgroup. Each operation whose request has the member, and whose
action acts on one of those types, gets a generated
`{"types": [...], "through": "SessionId"}` entry, so there are no hand
corrections. The generator's validation and the Java loader reject a
`through` that is not one top-level member, or that sits beside any
other reading key.
For such an entry the reader asks the namespace's StoredResourceArns
through(member, value, region) for the ARN of the caller's resource
at the other end, and keeps it when it matches one of the types. When
there is none, as for a session that is closed, expired or another
caller's, it names nothing and the request stays on `*`; the Data API
then refuses it. RedshiftDataService now implements StoredResourceArns
for redshift-data, since it owns the sessions and builds their owner
scope: through gives the target ARN of the caller's open session,
through RedshiftDataSessions.targetArn, which find now shares; find
still gives the workgroup a name or an ARN finds, through the
resolver.
ExecuteStatement and BatchExecuteStatement gain the entry (1095
operations over 27 namespaces, unchanged). ListSessions takes a
SessionId too, but the Service Reference gives it no resource type,
so it stays on `*`. iam.md's sentence on EventBridge V2, which said
Floci does not serve it, now says how its requests are read.
In the docker runner mode a custom JAR step whose main class starts a
MapReduce job, such as the Management Guide's wordcount of Hadoop's
examples JAR, never ended: its spark-submit read the image's
mapred-site.xml, which names YARN, and the job kept retrying a
ResourceManager at 0.0.0.0:8032. A Jar of
/usr/lib/hadoop-mapreduce/hadoop-streaming.jar, where EMR has it, named
a file the image lacks. And a cluster's mapred-site, hadoop-log4j and
hadoop-env classifications reached none of its steps.
Now, on a cluster:
- a custom JAR or Spark step's spark-submit runs after the Hadoop setup
a command gets, so its HADOOP_CONF_DIR is the copy with Floci's S3,
the cluster's HDFS and MapReduce in local mode, which spark-submit
puts on its class path; a MapReduce job its main class starts runs in
the driver's JVM.
- a Jar of /usr/lib/hadoop-mapreduce/hadoop-streaming.jar runs the
image's /usr/lib/hadoop/hadoop-streaming.jar.
- mapred-site, which will "Change values in the MapReduce application's
mapred-site.xml file", goes in the copied mapred-site.xml ahead of
Floci's local mode and staging folder, which win.
- hadoop-log4j, which will "Change values in Hadoop's log4j.properties
file", follows the copied log4j.properties, a later key winning.
- hadoop-env's export classification starts the copied hadoop-env.sh,
which the hadoop command reads, each value as given, single-quoted,
as spark-env's exports are set without shell expansion; a name a
shell cannot export is left out. The image's own lines come after
and add to HADOOP_CLASSPATH rather than set it, so the Release
Guide's HADOOP_CLASSPATH of /path/to/my.jar keeps the LZO codec the
image's core-site.xml names, without which every job fails.
- a jar the MapReduce home links that the image lacks is named on the
step's standard error, as a job that needs it fails later, on its
class path, and emr.md says which releases this has run on (emr-7.5.0
and emr-7.10.0).
An EMR Serverless run still starts spark-submit as it is. A custom JAR
step's spark-submit reads neither hadoop-env.sh nor Hadoop's
log4j.properties, so those two do not reach it.