* feat(lambda): add InvokeWithResponseStream
* feat(lambda): report a streaming handler's error in InvokeComplete
* fix(lambda): send response stream chunks while the function runs
* fix(lambda): build Invoke qualifier violations with the shared helpers
* test(lambda): exit the streaming handler from the write callback
Every Service Matrix row now has its operation count checked, or a stated
reason it cannot be. The REST rows map their JAX-RS controllers in
action_count_sources, with:
- rename_actions for a method not named after its AWS action, and a list
for a method that answers several actions by query parameter
(CreateRestApi and ImportRestApi on POST /restapis?mode=import)
- route_prefix and skip_route_prefix on a REST source, so API Gateway's v1
and v2 rows split the one controller that serves both
- a tag_handler source mode: a TagHandler class is what gives a service the
three tagging actions the shared /tags controllers serve
- exclude_actions for operations that always fail (InvokeModelWithResponseStream
answers 501, ExecuteSql BadRequestException, Amazon MQ's user calls
BadRequestException for RabbitMQ brokers)
A new coverage gate fails when a row is neither checked nor listed under
hand_counted with its reason, when two rows share a link target, or when a
row has no numeric count. It replaces the required-sources list. S3 is the
one hand-counted row: its handlers pick most operations by query string.
Most REST rows were undercounted, EKS by the most (7, served 35). IoT Data
gets its own anchor, as it shared iot.md with IoT Core and its count was
never read. The AppSync, CloudFront, EKS, Lambda and Pipes pages now list
the operations their controllers serve: AppSync's listed names that do not
exist, and CloudFront's called stored-only operations unsupported.
Closes#4999
AWS's simulator fills in an organization context of its own beside the
principal keys, aws:PrincipalOrgID, aws:PrincipalOrgMasterAccountId and
aws:PrincipalOrgPaths, and says why that matters for exactly these policies:
"because these keys are populated for you, SCPs and other policies that use
principal or organization conditions are evaluated correctly". None of the
three reached a simulation here, so a service control policy handed to one and
keyed on the organization it guards matched nothing, where AWS matches it.
The keys are answered by the service that holds the organization, through a
narrow port Organizations implements beside the two it already does, and are
written onto the request context by the writer that already fills a principal's
keys on every path. An account in no organization carries none of them, which
is the availability both published keys declare, "included in the request
context only if the principal is a member of an organization", and an absent
key matching nothing is what refuses a statement written on one. A hierarchy
that cannot be walked up is no path rather than a failed call, the way an
organization that cannot be resolved already answers no SCP levels.
A real request carried none of the three either, so the same policy matched
nothing on the call a simulation stands for. A caller now comes back from the
credential lookup in the organization its own account belongs to, and the
account-root principal the filter stands in for is put in its account's
organization as well, so every context the filter fills carries the keys, the
one per resource a request names among them, and an identity policy, a resource
policy and a trust policy read them from the same place.
The path stops at the account's parent. An entity path is built "using the IDs
of the organization, root, and all OUs in the path down to and including the
OU" and ends with the account's own id, while the key's own published condition
compares o-a1b2c3d4e5/r-ab12/ou-ab12-11111111/ou-ab12-22222222/ with
StringEquals and "returns true for principals in accounts that are attached
directly to the ou-ab12-22222222 OU", which a value carrying the account id
could never equal. An account the organization holds at its root, the
management account among them, carries o-.../r-.../.
aws:PrincipalAccount was populated for a user source alone, so a role named as
a policy source carried neither its own account nor its organization. Both
describe the account the ARN names rather than the credential it stands for,
and both are answered for either source now. The session-shaped keys stay
user-only, there being no session behind a role named as a source.
Both simulators answered one result per action and resource, each naming the
resource it was given. The result's reference publishes the opposite: "the
simulator now returns a single EvaluationResult per action, regardless of how
many resource ARNs are provided", its top-level fields carrying "the aggregate
decision across all requested resources" with "the most restrictive decision
across all resources" at the top, and each resource answering for itself under
ResourceSpecificResults, which is where it sends a client that read them off
the top-level result before. A page is keyed by action now rather than by pair,
and a simulation whose resource is the wildcard, "either explicitly, or when
the ResourceArns parameter blank", carries no per-resource section at all.
EvalResourceName names no resource either: it carries "the ARN template for the
simulated resource type ... or * if no ARN format is defined for the action.
This is not a specific customer-provided resource ARN". The templates come from
the two generated tables built from AWS's Service Reference, which publishes
the resource types each action acts on and each type's ARN formats. An action
whose published types carry more than one format answers *, the value the field
gives an action with no format at all, and so does an action of a namespace no
table reads: which of several templates AWS names is published in no
machine-readable source, s3:GetObject acting on an object and on an access
point object with the field's own example naming the object's. The IAM page
records that difference.
Beyond its decision, a result carried nothing. For a same-account simulation,
the one kind this emulator models, AWS reports four more members, and a client
that reads any of them saw an empty element: the statements that decided the
scenario, the context keys the policies wanted and the call did not supply, and
what the organization levels and the permissions boundary said about it.
MatchedStatements is "a list of the statements in the input policies that
determine the result for this scenario", and each entry names the policy it came
from and the place it sits in that policy's text. The identifiers are the
published ones: a supplied document is PolicyInputList.N under the position it
arrived under, as AWS's own example reports it, a policy embedded in an entity
is its own name with that entity's type, and a managed policy is its own name
with whether AWS owns it. A grant the account applies without attaching anything
is named by neither, no policy naming it. An allow reports every statement that
allowed, an explicit deny reports the one that denied, "the deny statement is
the only entry included in the result", and an implicit deny reports none.
The positions follow AWS's own response to the character. Its example supplies a
document whose statement braces sit in column 15 of line 3 and column 3 of line
7, and reports line 3 column 16 through line 7 column 4, so each position is the
character just past a brace. That is where a streaming parse stands after
reading the opening brace and after reading past the statement, and a case pins
that document against those four numbers.
What AWS leaves out is left out. The member "doesn't include statements from
service control policies (SCPs)" and "only statements from identity-based and
resource-based policies appear here", so a deny that came from a level, from a
session policy or from the boundary reports no statement, and the boundary
reports its own effect under PermissionsBoundaryDecisionDetail instead, which is
what the same-account example shows for one that allowed the action.
MissingContextValues names the keys "required by the included input policies but
that were not provided by one of the input parameters". A key is wanted when a
statement the evaluation reaches for the action names it: the variables its
resources are written with, which a value has to resolve before a resource can
be compared at all, and, for a statement whose resources match, the keys its
conditions compare. A statement the action does not match is reached by nothing
and wants nothing, which is what gives each resource's list its own content. The
same exclusion holds, a key "referenced only by an SCP" not being returned; a
key supplied with no values at all counts as supplied, an empty set being a
value rather than an absence; and a variable under a document version that gives
${...} no meaning names no key.
OrganizationsDecisionDetail and PermissionsBoundaryDecisionDetail report whether
each of those two allowed the action, for a simulation that was handed levels or
carries a boundary. Each top-level flag is the most restrictive of the
resources' answers, as every other top-level field is, and the boundary's is
reported for each resource as well.
A key an operator answers for without a value is not one the policy requires,
and is not named among the missing: an ...IfExists operator publishes "if the
key is not present, evaluate the condition element as true", a Null asking for
absence is satisfied by the absence itself, and the two the evaluation already
reads that way follow, a ForAllValues quantifier holding over no values and a
negated operator holding against a key that matches nothing. A Null asking for
presence does require the key, and names it. The top-level list carries one key
however two statements spell it, a context key not being case sensitive, which
is how the evaluation that answered them read it too.
Whichever element a statement writes its resources in is read for variables,
Resource or NotResource: the comparison takes its patterns from either and
resolves them either way, so a value supplied for one of them can change the
answer, which is what the member is for. An excluding pattern whose variable
has no value excludes nothing and one carrying a value excludes what it names,
which the enforcement cases pin, so the key it carries is wanted.
A caller a site builds for itself carries the organization as one resolved from
a credential does, so a policy written on the three keys reads the same context
wherever it is evaluated: the trust caller a state machine's execution role is
checked as, the account-root principal three sites fall back to, the role a
Redshift copy acts as, and the principals a trust policy is asked about on an
account's behalf, which the trust evaluator reads through the same narrow port.
The lookup that answers them is on the authorization path, so it reads as
little as it can. An emulator holding no organization at all answers from the
store's own emptiness, an account that is in one is found once and carries its
own parent into the path rather than being looked up again, and the two
resolvers that answer an ARN alone no longer ask: nothing there fills a request
context, so no key is owed.
The template is read whatever case an action is written in, policy action names
being case-insensitive. Outside IAM's own actions the table is keyed by the
operation a request is dispatched as, so an action whose name is not its
operation's answers * as well: lambda:InvokeFunction is the action of the
Invoke operation, and what joins the two names is published in no
machine-readable source either. The IAM page records that beside the other.
The decision path is unchanged. The walk that answered a decision now answers a
report, the decision-only face reading the same walk without collecting what it
does not need, so the paths that only ask whether an action is allowed pay for
nothing more. A cross-account simulation is still not modelled: no resource
policy is evaluated, so ResourcePolicy, CallerArn and a populated
EvalDecisionDetails remain out, and the IAM page says so.
The IAM page also carried a difference this emulator no longer has. The
simulator's limitation on service control policies with global conditions is
gone from the guide, which says now that "the policy simulator evaluates SCPs,
including condition keys and resource scoping in deny statements" and evaluates
them "with service-aware logic, including global condition keys", which is what
the level walk already did. The page quotes the current sentences instead.
On AWS a function's Hyperplane network interfaces sit in the subnets
its VpcConfig names, and EC2 refuses DeleteSubnet, and so DeleteVpc,
while one is there. Floci's Lambda never told EC2 a function used a
subnet, so DeleteSubnet succeeded under a VPC-configured function and
left it naming a subnet that was gone.
- LambdaService is a VpcDependencyProvider: a function of the caller's
account, or a published version of one, holds each subnet its
VpcConfig names and the VPC it is configured in
(LambdaFunctionStore.listWithVersionsForAccount, which also reads a
record stored before accounts were kept apart, unprefixed until it
is next read).
- CreateFunction and UpdateFunctionConfiguration save a function that
names subnets under EC2's subnet lock, so a DeleteSubnet either sees
it or runs before it is stored. A VpcConfig the request set is
resolved again under the lock, so a subnet deleted since the request
was validated is unknown, as one never created is, and the function
infers no VPC from it.
ECS awsvpc tasks already hold their subnet through the network
interface each task is given, which DeleteSubnet counts.
LambdaVpcResourceValidationIntegrationTest has DeleteSubnet refused
under a function, then under its published version once $LATEST moves
to another subnet, and allowed once the version is deleted, and a
subnet deleted while a function is created leaves it no inferred VPC.
LambdaFunctionStoreAccountScopeTest covers the unprefixed record.
ec2.md and lambda.md say so.
A Lambda extension's exec and the container's exit watcher each hold a
Docker connection for the container's whole lifetime, and both still ran
on the control-plane client. Enough warm containers, especially with
extensions, could fill that pool and stall every create, start, stop and
remove call, the failure the streaming split was made to prevent.
Both now use the @StreamingDocker client. The exit watcher's inspect is
a short call and stays on the control-plane client, with its retries.
The streaming transport now replays a container wait that fails before
the daemon answers, as the control-plane one does, so a stale socket
does not spend one of the watcher's re-arms. Exec starts and log and
attach streams are still never replayed.
Each live Lambda container now holds its log follow, its exit watcher and
one exec per extension on the streaming pool, so its default rises from
512 to 2048 to cover the 500 containers the runtime API port range allows
with two extensions each. The control-plane default stays at 1024.
Closes#2224
* fix(lambda): accept layer ARNs when deleting versions
* test(lambda): share layer publication cleanup
* test(iam): include layer deletion in the resource inventory
* fix(lambda): read Lambda's IAM resources whole from the generated table
ListFunctionUrlConfigs answers GET /2021-10-31/functions/{FunctionName}/urls,
which returned 404 before. It returns the stored URL configurations of the
unpublished function and its aliases, with signed markers scoped to the
function, account and Region, and refuses GovCloud and China like the other
URL operations. MaxItems and the marker go through LambdaPagination, and a
missing or foreign function answers Function not found.
The URL, S3 code and permission tests share one Node.js ZIP builder,
LambdaCodeFixtures.nodeJsZip.
Signed-off-by: Jackson Price <jxnprice@amazon.com>
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
DeleteFunction answered 204 for every function. AWS answers 202 with {}
when it deletes a durable function or a published version of one, and
Floci now does the same. A plain function and a missing version still
answer 204.
Floci listed every operation in the invocation event and in
GetDurableExecutionState. AWS leaves out the operations under a child
context closed without ReplayChildren=true, and everything below them.
Both now use one filtered view, and a context closed without
ContextOptions shows ReplayChildren: false. The checkpoint answer is
unchanged.
* feat(lambda): pass the X-Ray trace header through durable chained invokes
* fix(lambda): give a PassThrough invocation a new Parent for an unsampled header without one
Closes#7979
Resolve symlinks on the working directory's path, relative or absolute,
and check every directory on the resolved path. Stop the check at a
function's EFS mount path, which Lambda enters as the access point's user.
Build the Dockerfile-only build context in one place,
DockerBuildContext.ofDockerfile, for the helper image and the two Docker
tests that built it by hand.
It created an application named test-app, which AppConfigIntegrationTest looks up by name when both run in one shard.
Validate the compact UTF-8 JSON environment before function creation or configuration mutation. Both paths previously accepted the 5,000-character value reported in #7995. Cover exact byte boundaries, aggregate variables, Unicode, JSON escaping, and rejected-update atomicity through the AWS SDK.
Stop quota serialization through a bounded UTF-8 counting sink without allocating complete JSON and byte-array copies. Keep unchanged legacy environments out of CloudFormation configuration updates while validating changed variables and preserving environment removal. Add early-stop, one-megabyte input, Unicode buffer-boundary, and legacy-stack rollback regressions.
Include AWS's String measured diagnostic while retaining at most 5,120 UTF-8 bytes and terminating larger input early. Drop incomplete trailing UTF-8 characters before adding an ellipsis. Keep the 1 MB robustness request on CreateFunction, and assert every SDK configuration-update body stays below the separate 5,120-byte request limit. Cover complete measured JSON and bounded Unicode previews.
Bind the embedded DNS listener to the advertised address so connected resolvers accept replies on multi-interface hosts. Preserve the current network-selection behavior.
Ensure the test-owned Vert.x instance is closed even if closing its DNS socket fails. Preserve all UDP source assertions.
Extract a package-private query helper accepting name, type and transaction ID and use it in the reply-source regression. Preserve production DNS behavior and all existing assertions.
Signed-off-by: Andre Kurait <akurait@amazon.com>
* fix(lambda): return the streamed body from a RESPONSE_STREAM function URL
A function URL in RESPONSE_STREAM mode parsed only the HttpResponseStream
prelude and dropped the body written after its eight NUL bytes, so callers got
the status and headers with an empty body. Split the stream at the delimiter
and return the rest as the body; a stream without a prelude is a 200
application/octet-stream, as on AWS. The stream is still buffered.
Closes#7837
* fix(lambda): stream the body of a RESPONSE_STREAM function URL as it is written
The runtime API now hands a streamed response to the invocation chunk by chunk,
ahead of the BodyHandler that buffers every other response, and completes the
invocation only when the stream ends, so the timeout, the concurrency permit
and the container stay held for the whole stream. The function URL answers as
soon as the head is known and writes each chunk as it arrives. The prelude is
read only when the stream's content type is
application/vnd.awslambda.http-integration-response; any other stream keeps
the content type the handler set.
* fix(lambda): check the streamed function URL response without timing it
The runtime API and controller tests pin chunk-by-chunk delivery, so the
end-to-end test only checks the status, content type and body.
Label runtime and code-copy containers with protected deployment and run identities. Reconcile previous runs at Docker startup and retry incomplete cleanup on cold starts, preserving current environments and named volumes.
Honor the Lambda reconciliation switch at startup and before cold starts. Share the owned-container sweep with ECS, retaining each service run policy and reporting persistent failures once until recovery.
With Docker-backed VPC networks, one container of an awsvpc task joins
its VPC's Docker network at the task ENI address, so the address
DescribeTasks reports answers. A Lambda function with VpcConfig joins
the same network at an address leased from its first subnet, skipping
addresses an interface already holds, and returns it once its container
is removed. Peer and Cloud Map addresses still resolve on the network a
container was created on.
Closes#7639
* fix(lambda): validate VPC resources before configuration changes
Require declared subnets and security groups in the request account and region to belong to one VPC. Validate replacement settings before mutating the function. Preserve detachment, published-version snapshots and actual declared-resource fixtures.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
* fix(lambda): preserve unknown VPC placeholder compatibility
Keep unknown subnet and security-group IDs in responses without inferring VpcId. Reject mixed known VPCs before mutation even when unknown IDs are also present. Restore placeholder EFS/CloudFormation fixtures and cover partial unknowns, updates and version snapshots. Addresses maintainer review 5766333414.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
---------
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
* fix(lambda): persist ParallelizationFactor on stream event source mappings
CreateEventSourceMapping and UpdateEventSourceMapping dropped ParallelizationFactor, and
the responses never returned it. A Terraform aws_lambda_event_source_mapping with
parallelization_factor set therefore showed a change on every plan.
The field is now validated (an integer from 1 to 10, Kinesis and DynamoDB Streams sources
only), stored, and returned on every stream mapping, 1 when none was set, as AWS does.
SQS mappings still omit it. The pollers still process one batch per shard at a time; the
docs say so.
* fix(lambda): keep ParallelizationFactor on a null update and reject values beyond long
An UpdateEventSourceMapping with "ParallelizationFactor": null cleared the stored factor,
so a mapping set to 10 read back as 1. A JSON null is an absent member, as
FunctionResponseTypes already treats it, and now leaves the factor unchanged.
The range check ran after narrowing to long, so 18446744073709551617 wrapped to 1 and was
accepted. The value is now range-checked before it is narrowed.
* fix(lambda): share one range check across the event source mapping integers
MaximumBatchingWindowInSeconds, MaximumRetryAttempts, MaximumRecordAgeInSeconds,
ScalingConfig.MaximumConcurrency and ParallelizationFactor each repeated the same numeric,
whole-number and range check. One boundedInteger helper now serves all five, with the
error messages unchanged. It checks the range before narrowing, so a value beyond long
such as 18446744073709551617 no longer wraps to 1 and passes in the other four.
* fix(lambda): pass LoggingConfig log format and level to the runtime
A function with LogFormat=JSON logged text: neither launcher set AWS_LAMBDA_LOG_FORMAT or AWS_LAMBDA_LOG_LEVEL, which the runtime interface clients read. Both launchers now pass them, and a JSON function without an ApplicationLogLevel gets INFO, the level the API reports, through one default shared with the response.
Closes#6774
* docs(lambda): note the log format and level the runtime receives
* refactor(lambda): build the runtime environment in one place for both launchers
ContainerLauncher and KubernetesPodLauncher wrote the same AWS_LAMBDA_* lines, the LoggingConfig ones included. LambdaRuntimeEnv.of now builds them once.
Select runtime images with the effective Docker platform while preserving runtime-wide defaults, explicit platform precedence and code-volume helper platform.
Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
* feat(lambda): list provisioned concurrency configurations
Dispatch List=ALL to a paginated view of existing provisioned concurrency allocations. Preserve qualified ARNs, current status and existing pool lifecycle.
Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
* fix(lambda): share function ARN region resolution
Share the existing Lambda region validation and error message across function resolution and provisioned-concurrency lookup/listing.
Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
---------
Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
Preserve the requested alias ARN while returning the resolved published version configuration. Retain snapshot-versus-latest regressions for both read APIs.
Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
* feat(lambda): make reactive S3 sync toggleable and optionally async, reporting LastUpdateStatus while it runs
* fix(lambda): run async reactive S3 syncs as the uploader's account, keep InProgress continuous, and queue the latest source per function
* fix(lambda): clear a failed reactive sync's LastUpdateStatus on UpdateFunctionConfiguration, and test async syncs from a second account
* test(lambda): share LambdaCodeSourcesProfile for the async reactive sync test, reuse LambdaWebZips, and extract the failed-sync setup
* feat(lambda): add init-timeout-seconds so a cold runtime gets its own init budget
* fix(lambda): count the init budget from container start, apply it only until the first /next poll, and cover it in SQS visibility
* test(lambda): check the dispatch wait directly instead of on the clock, and correct the init budget docs
* fix(lambda): reject provisioned concurrency for SnapStart versions
Reject provisioned concurrency admission and configured alias retargeting for published SnapStart versions before mutation. Preserve older version snapshots and unconfigured alias behavior.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
* test(lambda): remove redundant SnapStart SDK fixture
Retain the pool regressions and existing alias retarget SDK coverage as requested in review. Remove the duplicate SDK case and its custom zip construction.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
---------
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
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>
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>
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>
Close admission during drain and retain failed removal ownership. Retry late releases within a separate bounded cleanup attempt, validate drain configuration at startup, and safely reopen after reset.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
Floci accepted ApplicationLogLevel and SystemLogLevel under Text and
dropped them, which a test pinned and the docs described as Floci's own
call rather than probed behaviour. Measured on Lambda (eu-west-1,
2026-10-18): CreateFunction and UpdateFunctionConfiguration refuse either
level under Text, whether LogFormat names Text or is left to that
default, with InvalidParameterValueException "LogLevel is not supported
when LogFormat is set to "Text". Remove LogLevel from your request or
change the LogFormat to "JSON" and try again." In a stack, a valid level
under Text passes the template's validation and fails the resource with
Lambda's message. Floci now refuses it in validateLoggingConfig, so the
API and the CloudFormation update check, which validates through
loggingSettings, both do; and its enum errors list the levels in Lambda's
order: [FATAL, TRACE, WARN, ERROR, INFO, DEBUG] and [WARN, INFO, DEBUG].
The default format is worked out in one place, logFormat, for the
validation and for loggingSettings.
Tests: a level under Text refused on create and on update through the API
(LambdaVpcSnapStartLoggingIntegrationTest, replacing the test that pinned
the old behaviour) and through the SDK (LambdaFunctionConfigTest), by
loggingSettings (LambdaServiceTest), and by a stack update
(CloudFormationLambdaLoggingConfigIntegrationTest); the enum messages'
order. They fail on main.
* fix(lambda): send a function's logs to the log group its LoggingConfig names
Floci stored LoggingConfig.LogGroup and read it back, but every execution
environment still wrote to /aws/lambda/<name> and told the function so in
AWS_LAMBDA_LOG_GROUP_NAME. Measured on AWS (eu-west-1, 2026-10-16): a
function whose LoggingConfig names a group writes INIT_START, START, its
own output, END and REPORT there, Lambda creates the group when it is
missing, and /aws/lambda/<name> is never created. AWS_LAMBDA_LOG_GROUP_NAME
and AWS_LAMBDA_LOG_STREAM_NAME name that group and stream.
Once LoggingConfig names a group, which several functions can share, each
stream's name carries the function's name: 2026/10/16/my-fn[$LATEST]<id>
instead of 2026/10/16/[$LATEST]<id>. It does even when the group named is
/aws/lambda/<name> itself, so the rule is whether a group is named, not
whether it differs from the default.
Both launchers, Docker and Kubernetes, and GetFunctionConfiguration's
LoggingConfig now take the group and the stream from one place,
LambdaLogDestinations.
Floci skips delivering a log group to a Lambda subscription destination
that writes its own logs there, which would feed the function its own
output forever. That check assumed the group was /aws/lambda/<name>, so a
forwarder subscribed to the group its LoggingConfig names would loop. It
now asks LambdaLogDestinations for the function's group, and falls back
to the default name, from the same place, for a function it cannot find.
* fix(logs): skip only a function's own streams when it forwards its log group
The guard that keeps a subscription from feeding a Lambda destination its
own output looked the function up by name in the caller's account and
Region at $LATEST, and skipped the whole group once it matched. In a group
LoggingConfig names, which several functions can share, a forwarder then
lost every other function's logs; a destination naming a published version
or alias was checked against $LATEST's group; and a function in another
account than the ambient one was not found, so its own custom group was
fed back to it.
The function is now the one the destination ARN names, through
getFunctionByArn, with its account, Region and qualifier, and in a named
group only the streams carrying its name are skipped, the shape measured
on AWS for a named group (2026/10/16/<name>[$LATEST]<id>); every stream of
the default group is still the function's own. A destination ARN that
does not parse as a function's is not a loop and is no longer caught as
any RuntimeException.
Tests: another function's stream in a shared group reaches the
forwarder while its own is skipped, and a destination naming a published
version is checked against that version's group (both fail on the
previous head); the stream ownership rule in LambdaLogDestinationsTest.
* fix(docker): preserve explicitly configured DNS resolvers
Honor explicit --dns entries before injecting the embedded resolver and public fallbacks. Keep automatic DNS for containers without configured resolvers, and verify the shared builder and Lambda launcher preserve the requested list.
Signed-off-by: Andre Kurait <akurait@amazon.com>
* fix(lambda): keep AWS endpoints reachable with explicit DNS
Signed-off-by: Andre Kurait <akurait@amazon.com>
---------
Signed-off-by: Andre Kurait <akurait@amazon.com>
Under IAM enforcement, SES published event-destination events and identity notifications to
whatever SNS topic it was configured with, through an internal call nothing checked, so a caller
refused sns:Publish could still put messages on a topic by pointing a configuration set at it. On
AWS, SES publishes as ses.amazonaws.com and the topic's policy decides: it has to allow SES, under
an aws:SourceArn naming the configuration set or identity whose configuration names the topic.
- ServiceCallAuthorizer decides a call one AWS service makes to another's resource on its own
behalf from the target's resource policy alone, read through the same providers the request
filter uses and picked by the target ARN's service. A target with no policy refuses, and with
enforcement off every call is allowed. ResourcePolicyProviders collects what the providers
supply, for the filter and the authorizer alike.
- IamConditionContextResolver.serviceCallContext builds that call's request context from the IAM
User Guide's global keys: aws:PrincipalIsAWSService, aws:PrincipalServiceName and
aws:PrincipalServiceNamesList, aws:SourceArn and aws:SourceAccount, aws:ResourceAccount and
aws:RequestedRegion, and none of the keys that describe an IAM principal. A publish to an SNS
topic from SES also carries aws:SourceOwner, which the SNS Developer Guide lists SES among the
services setting, and which the default topic policy checks.
- SnsResourcePolicyProvider supplies a topic's policy and the account in its ARN, also when the
topic does not exist. A topic with no Policy attribute gets the default a new topic has, for the
topic's own account. Topic policies so also take part in a JSON-protocol request that names a
topic, as any resource policy does.
- SesEventPublisher asks before publishing to SNS: for an event destination with the configuration
set's ARN, for an identity notification with the ARN of the identity that names the topic, the
sender's own or its domain's, both with the sending account. A refused event is dropped. A
notification SES cannot publish, because the topic is gone from its own account or its policy
refuses SES, also takes the topic out of the identity's bounce and complaint settings and turns
email feedback forwarding back on, as the SES Developer Guide describes; a delivery setting
stays. The identity's notification settings are written under the identity lock, so that
write and an API call changing them cannot lose each other.
- CreateReceiptRule and UpdateReceiptRule ask the same question of an action's TopicArn, with the
rule's ARN as aws:SourceArn, and answer InvalidSnsTopic when the topic's policy does not let SES
publish, which the SES API Reference lists as "could not publish to the topic, possibly due to
permissions issues". The rules still route no mail.
- A resource policy statement that names the caller only through its account, by its id, root ARN
or S3 canonical user ID, delegates to that account (IAM User Guide, "AWS account principals"):
across accounts it is still the owner's half of the grant, but within the account it no longer
grants on its own, and the caller's identity policies have to allow the request. Floci let such
a statement grant on its own, for bucket and function policies already, so a topic policy naming
its own account would have let every user of the account publish.
- A Deny's NotPrincipal follows the IAM User Guide ("AWS JSON policy elements: NotPrincipal"): it
spares an IAM caller only when it names the caller's account as well as the caller, since without
the account AWS "might deny access to the entire account", and never spares one with a permissions
boundary attached, which it "will always deny". CallerArns says whether a boundary is attached to
the user or to the role a session assumed. An Allow's NotPrincipal still grants everyone it does
not name, as Access Analyzer warns it can.
The AWS GovCloud (US) User Guide lists "AWS Lambda Function URLs is not
available"
(https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-lambda.html)
and the China guide "Amazon Lambda Function URLs is not available in the
China Regions"
(https://docs.amazonaws.cn/en_us/aws/latest/userguide/lambda.html), but
CreateFunctionUrlConfig created one in every partition, on a host no
source publishes for either of them.
CreateFunctionUrlConfig now refuses a request whose region is in
aws-us-gov or aws-cn with an InvalidParameterValueException, which the
lambda model declares for the operation. No source shows AWS's message,
so the wording is Floci's own, as for the API Gateway EDGE gate. The
AWS::Lambda::Url provisioner creates through the same service method, so
a stack in those partitions fails with that error. Get, Update and Delete
act on an existing config and are unchanged. The ISO and EUSC partitions
are left as they are because no source covers them, and the open
question about the function URL host now names only those two.
The Java compat suite skips LambdaFunctionUrlTest in those two partitions,
so the China partition nightly stays green.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
Under IAM enforcement, a Lambda task naming a function in another account was refused outright,
because Floci evaluated no Lambda function policy when #5079 added the check, and a task on a
function in the state machine's own account was not checked at all. Function policies now take
part in authorization (#5476), so a task is decided the way Lambda decides the Invoke call the
execution role makes (Step Functions Developer Guide, "I can't invoke a Lambda function from
another account"): within one account the role's policies or the function's policy can allow it,
and across accounts both have to (IAM User Guide, cross-account policy evaluation logic).
- LambdaTaskAuthorizer evaluates the role's policies, its permissions boundary and its account's
SCPs together with the function policy LambdaResourcePolicyProvider supplies. The role ARN has
to name an existing role, path included, matched as STS AssumeRole matches one
(IamService.roleArnMatches), and the role is evaluated under the ARN IAM holds for it.
- The task is authorized against the function ARN LambdaArnUtils.functionArn gives for its
reference: a full ARN as written, a name or partial ARN completed in the state machine's
partition, Region and account, with the version or alias it names, as Lambda authorizes an
invoke.
- A task whose Credentials name a role invokes the function as that role, once the execution role
has assumed it (Developer Guide, Task state "Credentials"). The role's trust policy has to allow
the execution role, with the state machine's ARN as sts:ExternalId, which the cross-account
tutorial's trust policy checks. The execution role's own policies have to allow sts:AssumeRole
on the role too when it is in another account, or when the trust policy names only the execution
role's account, since an account principal delegates to the account (IAM User Guide, "AWS
account principals"); AssumeRolePolicyEvaluator.decide tells the two grants apart. RoleArn is
read the way the task's Parameters or Arguments are. A role the execution role cannot assume
fails the task with States.Permissions, the Developer Guide's error for a task without the
privileges to run.
- A refusal to invoke fails the task with Lambda.AccessDeniedException. The cause names the role's
session as the Step Functions Developer Guide shows it
(arn:aws:sts::<account>:assumed-role/<role>) and ends in the IAM User Guide's context for the
policy type that refused it, explicit denials first, each in AWS's evaluation order: service
control policies, the resource-based policy or role trust policy, identity-based policies, the
permissions boundary.
* docs(partition): bring the partition pages up to date with the smoke coverage and EDGE rules
partitions.md still listed the eleven services the smoke test started with
and said Step Functions runs in all eight partitions through the emulator,
which only IAM does. It now states the rule (every minting service has a
case or a listed exemption), names EUSC among the partitions without
CloudFront, and replaces the sign-in client id open question, which the
model answers, with the one that is open: the cross-device redirect host.
lambda.md said a layer ARN outside the aws partition is refused; the check
is against the caller's partition. appsync.md implied the AppSync service
principal varies by partition; it does not.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
* docs(partition): note the endpoint's own origin in the cross-device redirect question
Since #5552 the cross-device redirect is also accepted on the endpoint
the authorize request arrived on, so the open question is only about
which AWS host is accepted outside the commercial partition.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
---------
Signed-off-by: Hector Ventura <hectorvent@gmail.com>