Commit Graph
928 Commits
Author SHA1 Message Date
soreavis 7d9b9aedd2 feat(cloudformation): honor resource-level DeletionPolicy (#2167)
A resource's DeletionPolicy attribute was never read off the template,
so every managed resource was deleted regardless of what it declared:
deleteStackResources and rollbackCreatedResources both called
provisioner.delete unconditionally.

Read DeletionPolicy alongside Type in executeTemplate and apply it at
both delete sites. Retain keeps the resource on every stack operation.
RetainExceptOnCreate keeps it too, except when the create that made it
is rolled back — deleting it there is the entire meaning of that value,
and rollbackCreatedResources runs only for a failed create.

A retained resource is reported as DELETE_SKIPPED, on the resource and
as a stack event, and is not counted as a failed delete, so the stack
still reaches DELETE_COMPLETE. That also lets a stack owning a
non-empty S3 bucket be deleted, which otherwise fails on the objects.

Any other value falls through to the existing delete. That includes
Snapshot: floci cannot take the snapshots AWS supports for those types,
and AWS does delete the resource under Snapshot, so Delete is the
faithful half. The docs record that and the other divergences.

The policy is set on the resource after the provisioner returns,
because provision() and executeNestedStack() both return a fresh
StackResource that replaces the map entry.

Closes #1555
2026-08-07 17:29:48 -05:00
Priamo Germosen 1795e131a2 feat(applicationautoscaling): add Application Auto Scaling control plane (#2159)
* feat(applicationautoscaling): add Application Auto Scaling control plane

Adds a services/applicationautoscaling package emulating the Application
Auto Scaling API (JSON 1.1, AnyScaleFrontendService. target prefix,
application-autoscaling signing name). This is a distinct service from the
existing EC2 Auto Scaling package, which speaks Query under the
autoscaling signing name.

Implements the nine actions Terraform exercises: RegisterScalableTarget,
DescribeScalableTargets, DeregisterScalableTarget, PutScalingPolicy,
DescribeScalingPolicies, DeleteScalingPolicy, and the ListTagsForResource
/ TagResource / UntagResource trio.

Notable behaviours:

- Identity is the (ServiceNamespace, ResourceId, ScalableDimension)
  triple; RegisterScalableTarget upserts on it and leaves unsupplied
  parameters unchanged, matching AWS.
- ScalableTargetARN uses the application-autoscaling service name while
  PolicyARN uses plain autoscaling and embeds the resource path and policy
  name — the two ARN families genuinely differ.
- Tagging resolves by ScalableTargetARN because the Terraform provider's
  transparent-tagging interceptor calls ListTagsForResource on every read,
  keyed on the ARN it reads from DescribeScalableTargets.
- Target-tracking policies create the real pair of CloudWatch alarms AWS
  creates on the caller's behalf; deregistering a scalable target deletes
  its policies and their alarms.
- Optional configuration fields are only echoed back when supplied, so
  Terraform never sees a value it did not configure.

Scaling policies are stored and described but inert: nothing evaluates
them and no capacity is adjusted, mirroring EC2 Auto Scaling's existing
PutScalingPolicy. This is documented in docs/services/applicationautoscaling.md.

Closes #2157

* refactor(applicationautoscaling): stop exposing the scalable target's tag map

getTags() handed out the live internal map, and the service mutated it in
place at three call sites. listTagsForResource also returned that same
live reference out to the handler layer, so a caller could alter stored
state without going through the service.

getTags() now returns an unmodifiable view, with putTags/removeTags for
the mutations the service actually needs, and a test pins the read-only
contract.

Reported by github-code-quality on #2159.
2026-08-07 17:27:36 -05:00
Feyikemi Ogunsanya b1f953efb1 fix(iam): seed AmazonAPIGatewayPushToCloudWatchLogs managed policy (#2147)
* fix(iam): seed AmazonAPIGatewayPushToCloudWatchLogs managed policy

Floci seeded 52 AWS-managed policies at boot but none matched
API Gateway, so AttachRolePolicy for this standard service-role
policy returned NoSuchEntity. It's the policy attached to the API
Gateway CloudWatch-logs role that aws_api_gateway_account depends
on, so this blocked the first apply of any Terraform config that
enables API Gateway access logging.

Fixes #2121

* test(iam): add regression test for AmazonAPIGatewayPushToCloudWatchLogs seeding

Reproduces #2121: GetPolicy for the API Gateway CloudWatch-logs
managed policy returned 404 NoSuchEntity before the fix.
2026-08-07 17:20:39 -05:00
Olamide Kosile 76b264f667 fix(cloudformation): reconcile AWS::Logs::LogGroup in place on UpdateStack (#2152)
* fix(cloudformation): reconcile AWS::Logs::LogGroup in place on UpdateStack

Fixes #1965

Root cause: provisionLogGroup called CreateLogGroup unconditionally on
every provision, including updates to a stack whose log group already
existed and was untouched. CloudWatchLogsService.createLogGroup throws
ResourceAlreadyExistsException in that case, so any UpdateStack on a
stack with a log group resource rolled back with "The specified log
group already exists", even when nothing about the resource changed.

Fix: on update, reconcile retention and tags in place instead of
recreating, matching the pattern already used for Lambda functions.
LogGroupName isn't updatable in place on real AWS, so a name change
still deletes the old group and creates a new one (replacement).

Also fixed a related gap: auto-generated LogGroupName (no explicit
name in the template) called generatePhysicalName, which mints a new
random name on every call, so an auto-named log group was replaced on
every single update even when unchanged. It now reuses the existing
physical name across updates, matching how auto-generated Lambda
function names are handled.

* fix(cloudformation): fix LogGroup replacement ordering and name-mode tracking

Addresses two review findings on the reconciliation fix:

- A LogGroupName rename deleted the old log group before confirming
  the new name could actually be created. If the new name collided
  with an existing group, CreateLogGroup failed and the update rolled
  back, but the old group was already gone and rollback does not
  restore it - permanent data loss. Now creates the new group first,
  matching the existing create-before-delete pattern already used for
  Lambda function replacement, and only deletes the old group once the
  new one exists.
- Removing an explicit LogGroupName from the template fell through to
  the "no explicit name" branch, which reused the prior physical id -
  the old explicit name - instead of generating a fresh name for the
  new auto-generated mode. Now tracks whether the current name is
  explicit or generated (mirroring FlociLambdaFunctionNameMode) and
  forces a fresh generated name when an explicit name is removed.

* fix(cloudformation): infer LogGroup name mode for pre-fix persisted stacks

A log group persisted by a floci version before FlociLogGroupNameMode
was tracked has no recorded mode, so explicitNameRemoved could never
be detected for it even when it should be.

Fixes it by backfilling the mode from the physical id's shape:
generatePhysicalName always produces <stackName>-<logicalId>-<12 hex
chars>, so anything else must have been an explicit LogGroupName.
Doesn't attempt to un-truncate the (practically unreachable at a
512-character limit) truncation path, conservatively treating that
edge case as explicit.

Added a dedicated unit test exercising both legacy cases directly
against the provisioner, since simulating "created by an older floci
version" isn't reachable through the black-box HTTP integration tests.

* refactor(cloudformation): rename shared name-mode constants off the Lambda prefix

NAME_MODE_EXPLICIT/NAME_MODE_GENERATED are generic mode-value labels
shared by both the Lambda and LogGroup name-mode tracking, not
Lambda-specific, so the LAMBDA_ prefix was misleading now that a
second resource type uses them. LAMBDA_NAME_MODE_ATTR is unchanged,
since that one is a genuinely Lambda-specific attribute key.
2026-08-07 16:10:54 -04:00
floverfelt f6faf0ffe5 fix(s3): Ensure tags are added on multipart s3 uploads. (#2151) 2026-08-07 16:09:18 -04:00
Hector Ventura e3c180b952 fix(ecs): resolve Secrets Manager JSON-key selectors in task definition secrets (#2133)
* fix(ecs): resolve Secrets Manager JSON-key selectors in task definition secrets

containerDefinitions[].secrets[].valueFrom now supports the ECS selector suffix
(:json-key:version-stage:version-id) that CDK emits for Secret.fromSecretsManager
with a field. Parsing mirrors the real ECS agent: the ARN resource is split on
colons and disambiguated by segment count (2 = plain reference passed through
verbatim, 5 = selector with empty segments meaning unset, anything else is the
agent's invalid-ARN error surfaced in stoppedReason). The base ARN is rebuilt
before lookup so partial-ARN resolution keeps working, JSON keys are extracted
top-level-only after the fetch, and SecretsManagerService now validates that a
supplied VersionId and VersionStage name the same version.

Closes #1912

* fix(ecs): document and pin JSON serialization of object selector values

Review follow-up: object/array json-key values serializing as JSON (rather than
Go's map[a:1 b:2] rendering from the agent's %v) is now recorded as the third
deliberate divergence in the javadoc and pinned by a test.
2026-08-06 00:15:18 -05:00
Hector VenturaandMarcel Herhold 760115db14 feat(kms): implement ListKeyPolicies (#2046)
* feat(kms): implement ListKeyPolicies

ListKeyPolicies failed with UnsupportedOperation, so clients enumerating
policy names before a GetKeyPolicy call could not proceed. GetKeyPolicy
and PutKeyPolicy were already supported, so this was a hole in an
otherwise complete area.

Returns the single `default` policy name, which is what the model
prescribes ("The only valid value is default"), with Truncated false and
NextMarker omitted rather than serialized as null, since AWS only emits
NextMarker when Truncated is true.

Limit and Marker are accepted and ignored. One policy name cannot be
paginated, and ListKeyPolicies is the one KMS list operation that does
not declare InvalidMarkerException, unlike ListKeys, ListAliases,
ListGrants, ListKeyRotations, ListResourceTags, ListRetirableGrants and
DescribeCustomKeyStores. There is therefore no marker it could
legitimately reject, and no undeclared error code is invented for one.

Closes #1528

Co-authored-by: Marcel Herhold <herhold.marcel@gmail.com>

* chore: drop hand-written ListKeyPolicies changelog entry (semantic-release owns CHANGELOG.md)

* fix(kms): drop unused ListKeyPolicies pagination params and fix test claims

Review follow-up, validated against the local AWS references: Limit/Marker are
accepted at the wire by never being read (matching moto's list_key_policies), so
the service signature drops the dead parameters and the structurally vacuous
paging unit test goes with them; the integration test remains the real coverage.
The javadoc justification now states the leniency honestly: SDKs do not fully
enforce LimitType [1..1000] client-side (botocore validates only the minimum),
so out-of-range values can arrive and are deliberately tolerated. The ARN
resolution test no longer claims alias coverage the operation does not have.

---------

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
Co-authored-by: Marcel Herhold <herhold.marcel@gmail.com>
2026-08-05 23:36:07 -05:00
Jay 7f51c746cd fix(cloudformation): provision AWS::ApiGatewayV2::Authorizer and wire Route.AuthorizerId (#1760)
* fix(cloudformation): provision AWS::ApiGatewayV2::Authorizer and wire Route.AuthorizerId

CloudFormationResourceProvisioner had no case for AWS::ApiGatewayV2::Authorizer,
so the resource fell through the default stub branch and never reached
ApiGatewayV2Service — the same failure mode #788/#796 fixed for the v1
AWS::ApiGateway::Authorizer type. Stacks reported CREATE_COMPLETE, but
apigatewayv2 get-authorizers came back empty and routes referencing the
authorizer carried no authorizerId, so a JWT-authorized route silently
served every request unauthenticated.

Adds provisionApiGatewayV2Authorizer, modeled on the neighboring v2
Route/Integration/Stage provisioners, mapping the CFN PascalCase properties
(Name, AuthorizerType, IdentitySource, JwtConfiguration, AuthorizerUri,
AuthorizerPayloadFormatVersion, AuthorizerResultTtlInSeconds,
EnableSimpleResponses) onto the existing ApiGatewayV2Service.createAuthorizer
camelCase request shape. Also fixes provisionApiGatewayV2Route, which built
its request map without reading AuthorizerId at all even though
ApiGatewayV2Service.createRoute/updateRoute already handle it.

Fixes #1758.

* fix(cloudformation): accept scalar IdentitySource on ApiGatewayV2 Authorizer

resolveStringListOrEmpty silently returned an empty list when a template
supplied IdentitySource as a bare scalar string rather than the documented
array form, dropping the identity source instead of persisting it.
ApiGatewayV2Service.createAuthorizer/updateAuthorizer already accept a
scalar string for identitySource (identitySourceRaw instanceof String), so
the CFN provisioner was stricter than the service it calls.

Adds resolveIdentitySource, a local resolver that accepts both a scalar
string and an array. Adds a regression test asserting the scalar form is
persisted, alongside strengthening the existing test to assert
IdentitySource itself (previously unchecked).

Addresses review feedback on #1760.

* fix(cloudformation): populate AuthorizerId attribute, add scoped delete for AWS::ApiGatewayV2::Authorizer

- Fn::GetAtt Authorizer.AuthorizerId now resolves: provisionApiGatewayV2Authorizer
  only set the physical id, never the resource's attributes map, so GetAtt (which
  reads a separate map from Ref) fell back to a literal placeholder string.

- Stack deletion now actually removes the authorizer: the generic type/physicalId
  delete switch had no case for AWS::ApiGatewayV2::Authorizer at all and silently
  no-op'd. Added a scoped case in delete(StackResource, region) following the same
  shape already used for AWS::EKS::Nodegroup (a resource needing extra context
  beyond type+physicalId, stored as an attribute during provisioning).

Both fixes store ApiId as a resource attribute during provisioning, since it's
needed by the new delete path and wasn't previously retained anywhere.

* fix(apigateway): support $request.querystring.* identity sources for JWT authorizers

extractToken only checked HttpHeaders — it had no query-parameter access at all, so
any IdentitySource entry like $request.querystring.token was silently unusable, and
a request using a valid token there always 401'd. Threads UriInfo through
enforceJwtAuthorizer/extractToken and adds a $request.querystring. branch mirroring
the one enforceRequestAuthorizerV2 already has for Lambda REQUEST authorizers.

* chore: retrigger CI

The Build and Test job failed on a single flaky error in
RuntimeApiServerTest.extensionRegister_racedAgainstStop_eventuallyDeliversShutdown
(EOFException on an HTTP/2 read while racing extension registration against
server stop) — 1 of 8325 tests. This branch changes no Lambda code; that test
is from #1773 and lives on main independently. Passes locally on repeat runs.
2026-08-05 22:23:47 -05:00
lex00 f71903379c fix(cloudformation): AWS::IAM::ManagedPolicy exposes PolicyArn for Fn::GetAtt (#2056)
CloudFormation documents PolicyArn as the attribute for this type, so a
template written against AWS reads it back with
Fn::GetAtt [<policy>, PolicyArn]. The provisioner only recorded the value under
"Arn", so that GetAtt did not resolve and the unresolved literal propagated into
whatever consumed it — typically a role's ManagedPolicyArns, which then failed
with "Policy <logicalId>.PolicyArn does not exist" and rolled the stack back,
several resources away from the cause.

Both keys are now recorded; "Arn" stays for anything already reading it.
2026-08-05 22:16:48 -05:00
Oleh Melnyk 875e0f2d3b feat(bedrock): add proxy backend for real LLM responses via OpenAI-compatible API (#1789)
* feat(bedrock): add proxy backend for real LLM responses via OpenAI-compatible API

* fix(bedrock): preserve leading text when a tool call response also has content

OpenAI-compatible backends can return assistant text alongside tool_calls in
the same response (e.g. a preamble before invoking a tool). The Converse
translation only emitted the toolUse block in that case, silently dropping
the text.

* fix(bedrock): use InternalServerException for proxy serialization failures

InternalFailure isn't a bedrock-runtime error shape in botocore/the Java
SDK, so clients couldn't map it; InternalServerException is the declared
500 for this API.

* fix(bedrock): map proxy backend timeouts to ModelTimeoutException (408)

HttpTimeoutException (connect or request timeout) was falling into the
generic catch and surfacing as ModelErrorException/424, which the AWS
SDKs treat as terminal. Bedrock's dedicated 408 shape is retryable under
the default SDK retry strategy, so this distinction is load-bearing, not
cosmetic.

Also makes the request timeout configurable
(proxy.request-timeout-seconds, default 60s) since larger models on
CPU-backed backends may need more headroom than the default.

* fix(bedrock): fail fast on InvokeModel under the proxy backend

Falling back to StubBackend's canned response meant a caller who
configured a real proxy backend and called InvokeModel got a
plausible-looking, entirely fabricated completion with no signal beyond
a server-side log line. That's inconsistent with Converse, which already
fails loudly on misconfiguration, and worse: InvokeModel is still the
default entry point for many SDK wrappers, so this could silently mask
a broken integration.

Also fixes the streaming-endpoint error messages, which blamed "the
Floci stub" for a limitation that's actually unconditional (streaming
isn't implemented for any backend).
2026-08-05 17:17:02 -05:00
Jay e048e52ce0 test(lambda): wait for the parked poll instead of sleeping in extension stop race (#2131)
extensionRegister_racedAgainstStop_eventuallyDeliversShutdown slept 5ms to let
the extension's /event/next poll connect and park before racing stop() against
it, then asserted SHUTDOWN came back on that request. The sleep asserts the
poll has parked without checking. On a loaded machine it expires first, so
stop() closes the listening socket while the request is still in flight: the
poll never reaches the handler, stop()'s SHUTDOWN fan-out finds no waiting
context to hand the event to, and the client sees the connection die instead of
the SHUTDOWN the test is about.

That surfaces as an EOFException (connection accepted, then torn down) or a
ConnectException (lost the race before the connect even landed) out of
asyncNext.get(), and it failed CI this way once in 8325 tests.

Replace the sleep with awaitExtensionParked(), polling a new package-private
RuntimeApiServer.isExtensionParked() until the poll has provably parked, so the
race the test sets up is the one it means to test. isExtensionParked reads
under the same lock as the rest of the extension state, per the class's
documented locking discipline; RegisteredExtension.hasWaitingContext() peeks
without consuming, unlike takeWaitingContext().

The test still fails if the "poll pendingEvents before checking stopped" fix in
the /event/next handler is reverted, so this removes the flake without
weakening the regression it covers. Verified by breaking that fix and watching
this test go red, and by reproducing the original failure under CPU saturation
before and after the change.
2026-08-05 17:12:55 -05:00
Alex Bannaandabanna 62a576c8d4 feat(cloudformation): provision AWS::SecretsManager::SecretTargetAttachment (#1804)
* feat(cloudformation): provision AWS::SecretsManager::SecretTargetAttachment

AWS::SecretsManager::SecretTargetAttachment previously fell through the
default branch, so its Ref yielded a generated placeholder rather than the
secret ARN. Per the CloudFormation resource reference, this resource's Ref
returns the ARN of the secret named in SecretId, and consumers such as
Secret.fromSecretCompleteArn(...) require the complete ARN (with the
trailing -6char suffix).

Resolve SecretId (a Ref to the Secret, a friendly name, or a raw ARN) to
the canonical complete ARN via describeSecret and expose it as the
resource's physical id / Arn attribute, falling back to SecretId as-given
if the lookup fails. Deleting the attachment is a detach no-op — it must
not delete the underlying secret.

* fix(cloudformation): require SecretId on SecretTargetAttachment

SecretId is a required property of AWS::SecretsManager::SecretTargetAttachment.
Resolving it as optional let a template omit it and still create (falling back to
the logical id); reject a missing SecretId instead. Adds a regression test.

* fix(cloudformation): complete secret target attachment lifecycle

* fix(cloudformation): require attachment metadata on delete

* fix(cloudformation): tolerate detached secret overwrites

* fix(cloudformation): align secret target attachment behavior

* docs(cloudformation): document secret target attachments

---------

Co-authored-by: abanna <abanna@users.noreply.github.com>
2026-08-05 17:11:25 -05:00
lex00 bdad066694 fix(cloudformation): resolve Fn::GetAtt [Vpc, DefaultSecurityGroup] (#1977)
* fix(cloudformation): resolve Fn::GetAtt [Vpc, DefaultSecurityGroup]

provisionVpc now records the VPC's default security group id as the
DefaultSecurityGroup attribute, so GetAtt resolves to the real sg-* id
instead of passing the literal 'LogicalId.DefaultSecurityGroup' string to
downstream resources (breaks CDK's Custom::VpcRestrictDefaultSG handler).

Fixes #1976

* refactor(cloudformation): extract AWS::EC2::VPC into a per-service provisioner
2026-08-04 22:26:03 -05:00
lex00 4e0a815f20 feat(cloudformation): provision AWS::EC2::LaunchTemplate (#1973)
* feat(cloudformation): provision AWS::EC2::LaunchTemplate

Create the launch template in Ec2Service from LaunchTemplateData
(ImageId, InstanceType, KeyName, SecurityGroupIds, UserData,
IamInstanceProfile). Ref resolves to the launch template id and
Fn::GetAtt exposes LatestVersionNumber/DefaultVersionNumber, which CDK
ASGs and instances reference. DeleteStack removes the template.

Fixes #1971

* feat(cloudformation): resolve EC2 instance config from its LaunchTemplate reference

An AWS::EC2::Instance that sets LaunchTemplate instead of direct
properties now fills ImageId/InstanceType/KeyName from the referenced
template's data (AWS resolution order), so instances launched from a
launch template no longer fail with 'The request must contain the
parameter ImageId'.

* refactor(cloudformation): move AWS::EC2::LaunchTemplate into a per-service provisioner

Follows the CfnResourceProvisioner pattern instead of growing the monolithic
switch: Ec2LaunchTemplateCfnProvisioner injects only Ec2Service and is picked
up by CloudFormationResourceRegistry via CDI. Provision and delete arms for
AWS::EC2::LaunchTemplate are removed from CloudFormationResourceProvisioner
along with the now-unused private provisionLaunchTemplate method. EC2 instance
resolution against a referenced launch template stays put, since
AWS::EC2::Instance is not extracted yet.

An IamInstanceProfile given only by Name is now normalized to its
instance-profile ARN, matching the EC2 query API path; previously the bare
name was stored as if it were an ARN.

Adds unit coverage for the new provisioner (attributes, generated name,
profile ARN normalization, security groups, delete).

* test(cloudformation): delete the launch-template instance stack so EC2 state stays clean

The instance case left its stack standing, so a running instance (and its
network interface) leaked into the shared emulator state for the rest of the
suite. That pushed the total interface count past the MaxResults=5 boundary
Ec2IntegrationTest's DescribeNetworkInterfaces pagination cases assert on, and
they failed in full-suite runs while passing in isolation. Deleting the stack
terminates the instance, which describeNetworkInterfaces skips.

* fix(cloudformation): update a launch template in place instead of recreating it

UpdateStack re-provisions every resource, and the provisioner called
createLaunchTemplate unconditionally. An explicit LaunchTemplateName therefore
hit InvalidLaunchTemplateName.AlreadyExistsException on every update, and an
omitted one generated a fresh random name, creating a second template and
orphaning the first.

A template whose name has not changed is now updated by publishing a new
version and keeping its physical id, which is how AWS::EC2::LaunchTemplate
behaves when only its LaunchTemplateData changes. An unnamed template keeps the
name generated at create time rather than minting a new one. A changed name is
a replacement: the new template is created first and the previous one deleted
only after that succeeds.
2026-08-04 22:25:29 -05:00
lex00 1a99721ae0 feat(cloudformation): provision AWS::EC2::VPCGatewayAttachment (#1972)
* feat(cloudformation): provision AWS::EC2::VPCGatewayAttachment

Attach the internet gateway to the VPC via Ec2Service so route tables
pointing at the IGW behave like AWS. The physical id encodes vpc|igw so
stack deletion can detach. The VpnGatewayId variant records the
attachment without an attach call (no VPN gateway model).

Fixes #1970

* refactor(cloudformation): move VPCGatewayAttachment into a per-service provisioner

The monolithic switch in CloudFormationResourceProvisioner is being split into
per-service CfnResourceProvisioner implementations, so AWS::EC2::VPCGatewayAttachment
lands in the new structure instead of growing the switch.

Ec2VpcGatewayAttachmentCfnProvisioner injects only Ec2Service and is picked up by
CloudFormationResourceRegistry through CDI, no registration needed. The provision
logic and the physical-id encoding (vpcId|gatewayId) carry over unchanged, and
delete() detaches the internet gateway so stack deletion no longer leaves the
attachment orphaned.

Removes the AWS::EC2::VPCGatewayAttachment arms from the provision and delete
switches along with provisionVpcGatewayAttachment and
detachVpcGatewayAttachmentSafe, leaving CloudFormationResourceProvisioner
identical to main.

* fix(cloudformation): validate VPCGatewayAttachment and make its delete type-safe

Four review findings on the attachment provisioner.

A template that omitted VpcId still reported CREATE_COMPLETE: the null went
into attachInternetGateway, so DescribeInternetGateways exposed an attachment
with no VPC and every later detach on that gateway threw on the null compare.
VpcId is now required, as is exactly one of InternetGatewayId or VpnGatewayId.

The VpnGatewayId form recorded a physical id and did nothing else, so
CloudFormation reported CREATE_COMPLETE for an attachment that does not exist
and cannot be observed — there is no VPN gateway model behind it. It now fails
the resource with an explicit message instead of claiming success.

Updates orphaned the previous pair. The new pair is attached first and the old
one detached only after that succeeds, so a failed update leaves the previous
attachment intact; an unchanged update no longer re-attaches and duplicates.

Deletion classified the gateway by the id's igw- prefix, so an igw-* value
supplied as VpnGatewayId could detach a gateway the stack never attached. The
physical id now carries a kind tag (igw|<vpcId>|<gatewayId>) and delete acts
only on ids this provisioner wrote.
2026-08-04 22:24:36 -05:00
Alex Banna 5cb26ff117 fix(cloudformation): treat delete of an already-removed DynamoDB table or Lambda function as idempotent (#1803)
* fix(cloudformation): treat delete of an already-removed DynamoDB table or Lambda function as idempotent

When a stack is torn down after a rollback has already deleted some of its
resources, CloudFormation re-issues the delete against resources that no
longer exist. DynamoDB DeleteTable and Lambda DeleteFunction both raise
ResourceNotFoundException in that case, which flipped the stack to
DELETE_FAILED and wedged the stack name against a later create.

Route the AWS::DynamoDB::Table and AWS::Lambda::Function delete cases
through deleteDynamoTableSafe / deleteLambdaFunctionSafe, which swallow
ResourceNotFoundException (treating an absent resource as already deleted,
as AWS does) while still re-throwing any other AwsException so genuine
conflicts continue to surface as DELETE_FAILED.

* test(cloudformation): cover idempotent delete boundaries

* chore(ci): retrigger flaky checks
2026-08-04 22:22:13 -05:00
Alex Banna 48b2139b4f fix(cloudformation): keep uniqueness suffix when truncating generated resource names (#1802)
* fix(cloudformation): keep uniqueness suffix when truncating generated resource names

CloudFormation auto-generates a physical name as
`{stackName}-{logicalId}-{random}` for resources declared without an
explicit name. When that string exceeded the resource type's name-length
cap, generatePhysicalName truncated the whole string with
`substring(0, maxLength)`, which dropped the trailing random token. Every
auto-named resource in a long-named stack then collapsed onto the same
truncated name, breaking Ref/GetAtt lookups — most visibly a
`Custom::LogRetention` whose `ServiceToken` (a GetAtt of its provider
Lambda's Arn) resolved to a different, colliding function.

Truncate only the descriptive prefix and always keep the random suffix,
matching how CloudFormation shortens a generated name while preserving its
uniqueness token, so distinct logical resources keep distinct physical names.

* fix(cloudformation): preserve uniqueness suffix in extracted ProvisionContext name generator

The #1825 registry refactor lifted generatePhysicalName into ProvisionContext
verbatim, so migrated resource types (SQS) once again truncated the trailing
uniqueness token when a stack name neared the length limit. Apply the same
suffix-preserving truncation there so extracted provisioners stay consistent
with the monolith.

* fix(cloudformation): harden generated name regression test
2026-08-04 22:21:23 -05:00
Alex Banna 91e06ebebf fix(apigateway): import authorizers and security requirements from OpenAPI (#1798) 2026-08-04 22:20:26 -05:00
Priamo Germosen 7e4e3e8c50 feat(mwaa): add Amazon MWAA emulation backed by real Airflow (LocalExecutor) (#2086)
* feat(mwaa): add Amazon MWAA emulation backed by real Airflow (LocalExecutor)

Adds a new services/mwaa package following the EKS lifecycle pattern
(Controller/Service/EnvironmentManager, one Docker container-set per
resource, readiness polling) and the Neptune/ElastiCache proxy pattern
(MwaaWebProxy/MwaaProxyManager: Floci owns the host-facing port, the
backing container stays internal-only).

Each environment is backed by two real containers — postgres:16-alpine
for the metadata DB and apache/airflow:<version>-python3.12 running
LocalExecutor — with AirflowVersion genuinely selecting the image tag
(validated against a configured allow-list), unlike EKS's cosmetic-only
version field. MwaaWebProxy fronts the real Airflow webserver and
intercepts POST /aws_mwaa/cli, bridging it to a docker-exec'd `airflow`
CLI call and returning the documented {stdout, stderr} shape.

DAGs and requirements.txt sync from S3 on a poller, reusing the existing
S3Service in-process rather than a new AWS-facing surface. The Airflow
container is pointed back at Floci via LaunchedContainerAwsEnv (the same
mechanism Lambda/ECS containers already use), so a DAG's own boto3 calls
resolve against Floci instead of real AWS.

StartupScriptS3Path is supported end-to-end: fetched from S3 at create
time, injected before the container starts (create -> inject -> start,
mirroring EksClusterManager's config-injection sequencing), sourced
before migrate/scheduler/webserver so exported vars propagate. The
airflow user gets a passwordless sudo grant (verified against the real
image — sudo ships but isn't passwordless by default, and AWS's own
startup-script examples assume sudo just works), and a fixed set of
Floci-critical env vars (Fernet key, DB DSN, executor, AWS-SDK-redirection
vars) are snapshotted before and restored after the script runs, mirroring
real MWAA's reserved-environment-variable protection.

Verified end-to-end against real Docker (not just the mock=true unit
suite): environment reaches AVAILABLE, proxy pass-through and the CLI
bridge both work with real output, a DAG uploaded to S3 syncs and parses,
a second environment on a different AirflowVersion pulls a genuinely
distinct image, and delete tears down both containers/volumes and the
proxy cleanly.

45 new tests (unit + RestAssured integration, all against mock=true in
the default suite so Docker is never required for `mvnw test`); full
suite otherwise unchanged.

* fix(mwaa): hard-fail startup-script injection failures, release proxy ports on delete

Two issues from review:

copyFileIntoContainer swallowed every failure identically, including the
one case where that's wrong: a configured StartupScriptS3Path that fails
to copy into the container. The entrypoint's "if [ -f /startup.sh ]"
guard would silently skip it and the environment would reach AVAILABLE
having never applied the requested setup, contradicting the documented
intent of gating environment creation on startup-script failure (matching
real MWAA). copyFileIntoContainer now reports success/failure; the
startup-script call site checks it and throws, while DAG sync and the
best-effort sudoers grant keep their existing soft-fail behavior.

deleteEnvironment allocated a proxy port via PortAllocator on create but
never released it on delete, unlike every other service that uses
PortAllocator (Lambda, MSK, EC2, ECR) — repeated create/delete cycles
would eventually exhaust the configured proxy port range even with zero
MWAA proxies actually running.

* fix(mwaa): roll back allocated proxy port and containers on create failure

If startEnvironment() succeeded (containers running) but PortAllocator.allocate
or MwaaProxyManager.startProxy failed afterward, createEnvironment's catch
block set CREATE_FAILED without releasing the reserved port or stopping the
containers that had already started — leaking both on every such failure.

Mirrors NeptuneService.createDbCluster/rollbackDbCluster's already-proven
shape for this exact class of problem (container + proxy + port, partial
failure must roll back everything): a provisioned flag set only after every
step succeeds, and a try/finally that runs rollbackFailedCreate whenever it
doesn't — stopping the proxy (a no-op if it never started), stopping any
containers that did start (MwaaEnvironmentManager.stopEnvironment already
null-checks each container id, so it's safe for partial startup too), and
always releasing the port.

* fix(mwaa): correct CreateEnvironment error shape, namespace container names, add docs

Two items from maintainer review:

- Duplicate CreateEnvironment threw ResourceAlreadyExistsException, a shape the
  operation doesn't declare (verified against the real botocore mwaa/2020-07-01
  model: CreateEnvironment's only errors are ServiceUnavailableException,
  ValidationException, InternalServerException) — SDK clients couldn't map it.
  Now throws ValidationException.

- dbContainerName/airflowContainerName built names via raw string concatenation
  instead of routing through ContainerStorageHelper.dockerName like every other
  Docker-backed service (EKS, RDS, ...), so MWAA alone didn't participate in the
  FLOCI_DOCKER_RESOURCE_NAMESPACE convention that keeps multiple Floci instances
  sharing one Docker daemon from colliding. Both static methods now take the
  EmulatorConfig and route through the shared helper; volume names inherit the
  fix automatically since they're built by extending the container name.

Also adds docs/services/mwaa.md (mkdocs nav updated) following eks.md's
structure — operations table, mock/real mode, the web/CLI proxy, startup-script
behavior (sudo grant, reserved-variable protection), config reference, ARN
format, CLI/SDK examples, and an honest "Not Implemented" section covering the
known gaps already discussed on the PR (PluginsS3Path, cross-account container
naming, restart restoration).
2026-08-04 22:16:14 -05:00
Aniket Shukla 5f7d4d2dc8 fix(s3): recognize virtual-hosted-style requests over HTTP/2 (#1954)
* fix(s3): recognize virtual-hosted-style requests over HTTP/2

Browsers negotiate HTTP/2 via ALPN over HTTPS, and HTTP/2 (RFC 9113) has no
Host header — the authority is carried in the :authority pseudo-header.
S3VirtualHostFilter read only getHeaderString("Host"), which is null over
HTTP/2, so virtual-hosted-style requests fell through to path-style handling:
the bucket label in the authority was ignored and the first path segment was
treated as the bucket instead.

Resolve the effective authority from the request URI (populated from
:authority) when the Host header is absent, so bucket routing works on both
HTTP/1.1 and HTTP/2.

Closes #1866

* fix(s3): detect website requests over HTTP/2 via request-URI authority

Over HTTP/2 there is no Host header, so S3Controller.isWebsiteRequest saw a null host and served API XML instead of website HTML for virtual-hosted website buckets. Resolve the effective authority from the request URI (reusing S3VirtualHostFilter.resolveHost) so website index/error-document handling works on HTTP/2 too; the filter's path rewrite preserves the s3-website authority for this.

Tests: isWebsiteRequest detection over HTTP/1.1 and HTTP/2 (S3ControllerWebsiteRequestTest), and that the filter rewrite keeps the s3-website authority downstream (S3VirtualHostFilterTest).
2026-08-04 22:03:38 -05:00
Arindam Choudhury 79031a240a fix(s3): apply CreateBucketConfiguration tags on bucket creation (#2115)
CreateBucket accepted a <Tags> array in the request body but ignored it.
The body was parsed for LocationConstraint only, so tags supplied at
creation were silently dropped: the request returned 200, and a
following GetBucketTagging or S3 Control ListTagsForResource reported an
empty tag set.

AWS applies these tags. The CreateBucket API reference documents Tags
inside CreateBucketConfiguration as "an array of tags that you can apply
to the bucket that you're creating", gated on the s3:TagResource
permission.

The gap is visible through the AWS Terraform provider, which sends
bucket tags this way rather than via a separate PutBucketTagging call.
Against Floci an aws_s3_bucket with a tags map applies cleanly but lands
with tags = {} in state, so every subsequent plan proposes to add them
again -- a diff that never converges.

Parse the same <Tag> key/value pairs handlePutBucketTagging already
parses, and route them through the existing s3Service.putBucketTagging
once the bucket exists.

Verified end to end: with this change a terraform apply of a tagged
aws_s3_bucket records the tag in state, get-bucket-tagging returns it,
and the next plan reports no changes. The unpatched image, same config
and provider version, still reports tags = {} and a pending change.
2026-08-04 22:01:46 -05:00
floverfeltandFlorian Overfelt b543aa4baa feat(lambda): support extra /etc/hosts entries on Lambda launch (#2073)
* feat(lambda): support extra /etc/hosts entries via FLOCI_SERVICES_LAMBDA_EXTRA_HOSTS

* feat(lambda): support ipv6 addresses.

---------

Co-authored-by: Florian Overfelt <joverfelt@meso-scale.com>
2026-08-04 21:50:25 -05:00
Alex Banna fa96b791b4 fix(codebuild): stabilize start and retry responses (#2052) 2026-08-04 21:49:17 -05:00
Feyikemi Ogunsanya 88408d8574 fix(ec2): return AWS-parity MissingParameter for CreateSubnet without VpcId (#2094)
* fix(ec2): return AWS-parity MissingParameter for CreateSubnet without VpcId

CreateSubnet passed a null VpcId straight into the VPC lookup, producing
"The vpc ID 'null' does not exist" instead of the MissingParameter error
real EC2 returns for a required-but-absent parameter (#2089).

* test(ec2): cover CreateSubnet missing VpcId at unit level

Asserts createSubnet(null vpcId) throws MissingParameter rather than
InvalidVpcID.NotFound with a literal "null" in the message.

* test(ec2): cover CreateSubnet missing VpcId over the wire

Exercises the Query API handler directly (no VpcId form param) to pin
the AWS-parity MissingParameter response end-to-end.

* test(ec2): cover blank VpcId for CreateSubnet at unit level

Greptile flagged that isBlank() also covers empty/whitespace VpcId,
a branch the original tests didn't exercise directly.

* test(ec2): cover blank VpcId for CreateSubnet over the wire

Companion to the unit-level blank VpcId case, exercised through the
Query API handler.
2026-08-04 21:48:02 -05:00
Alex Banna 6a214e84d6 fix(apigateway): use last duplicate header value (#1806) 2026-08-04 21:46:19 -05:00
Aniket Shukla 733c72d02a fix(cognito): reject unconfirmed users in SRP auth (#2027) 2026-08-04 21:43:08 -05:00
Luis Ruiz Pavón 76f602fafa feat(cloudformation): support AWS::Events::EventBus and EventBusPolicy (#1794)
* feat(cloudformation): support AWS::Events::EventBus provisioning and deletion

* fix(cloudformation): delete EventBridge rules against their own event bus on stack teardown

* test(cloudformation): verify custom event bus rule delivers to SQS end to end

* feat(cloudformation): support AWS::Events::EventBusPolicy (Action/Principal form)

* feat(cloudformation): support AWS::Events::EventBusPolicy Statement form with merge by Sid

* fix(cloudformation): route CREATE rollback through resource-aware delete so custom-bus rules are cleaned up

* chore(cloudformation): warn instead of debug when a stack event bus cannot be deleted
2026-08-04 21:41:56 -05:00
lex00 58743487a7 feat(iam): seed Amazon Bedrock managed policies (#2034)
* feat(iam): seed Amazon Bedrock managed policies

AmazonBedrockFullAccess and AmazonBedrockReadOnly were absent from the seeded
AWS-managed policy catalog. CloudFormation attaches managed policies inline when
creating a role, so it never noticed; Terraform (and the raw IAM API) call
AttachRolePolicy, which validates the policy exists and 404'd with NoSuchEntity
on these two. Seed them alongside the existing Bedrock AgentCore policy, matching
the pattern used for the RDS (#1559) and EKS (#1216) additions.

* fix(iam): match the AWS-published Bedrock policy descriptions
2026-08-04 21:38:22 -05:00
lex00 43aea0983d feat(iam): seed the managed policies CDK bootstrap and the scenario stacks attach (#2064)
* feat(iam): seed the managed policies CDK bootstrap and the scenario stacks attach

Four AWS-managed policies were missing from the catalog, and each surfaced the
same way: "Policy arn:aws:iam::aws:policy/<name> does not exist" reported on the
role that consumed it, rolling the whole stack back several resources from the
cause.

- AWSCloudFormationReadOnlyAccess — attached by the roles `cdk bootstrap`
  creates, so CDKToolkit rolled back and no CDK application could deploy at all.
- AmazonAthenaFullAccess, AmazonRedshiftFullAccess, AmazonS3TablesReadOnlyAccess
  — attached by the QA roles the aws-bench ec2-multiregion scenario deploys.

Supersedes #2059, which carried only the first of the four.

* fix(iam): drop the AWSCloudFormationReadOnlyAccess duplicate landed by #2057

* fix(iam): match the AWS-published descriptions for two seeded policies

Both verified with iam:GetPolicy against real AWS.

AWSCloudFormationReadOnlyAccess was seeded by #2057 as "Provides read only
access to Cloud Control and CloudFormation."; AWS returns "Provides access
to AWS CloudFormation via the AWS Management Console."

AmazonS3TablesReadOnlyAccess said "Provides read-only access to Amazon S3
Tables."; AWS returns "Provides read only access to all S3 table buckets."
2026-08-04 21:37:20 -05:00
Alex Banna 78ba5b3457 feat(iam): list entities attached to managed policies (#1808) 2026-08-01 16:36:11 -05:00
TiM a8ed218c57 fix(s3): accept a percent-encoded bucket/key separator in copy sources (#2060)
* fix(s3): accept a percent-encoded bucket/key separator in copy sources

The AWS SDK for .NET percent-encodes the whole x-amz-copy-source value, so a
v4 client sends `bucket%2Ffolder%2Fkey.txt` with no literal slash anywhere.
Splitting the raw header on indexOf('/') found no separator there, so every
CopyObject and UploadPartCopy from that SDK failed with 400 InvalidArgument,
including copies of top-level keys.

Treat whichever comes first, a literal '/' or an encoded %2F, as the
bucket/key separator. Bucket names admit neither '/' nor '%', so the first
occurrence of either is unambiguously the separator and never part of the
bucket name. The split still happens before decoding, so an encoded slash
inside a key stays key content and a literal '?' is still preserved.

Both handlers now share one parseCopySource helper rather than duplicating
the split.

Adds regression coverage for the fully-encoded .NET wire format, a lowercase
%2f, a leading encoded separator, the mixed encoded-separator/literal-slash
form, UploadPartCopy, and malformed encoding reached through an encoded
separator.

Closes #2038

* test(s3): verify the bytes copied through an encoded separator

The encoded-separator UploadPartCopy part was uploaded but left out of
CompleteMultipartUpload, so the test only proved the request returned 200,
not that the encoded source resolved to the same object.

Complete the part and assert the trailing slice, so a parse that resolved the
wrong key would fail on content rather than pass on status.
2026-08-01 16:31:36 -05:00
Aniket Shukla 2889fbdef8 fix(lambda): report resolved executed version (#2026) 2026-08-01 16:21:04 -05:00
lex00 3baf4f4849 feat(ec2): return an empty set for DescribeVpnGateways (#1975)
* feat(ec2): return an empty set for DescribeVpnGateways

There is no VPN gateway model, so an empty vpnGatewaySet is AWS-accurate
for an account without VPN gateways. Unblocks the CDK CLI's VPC context
provider (Vpc.fromLookup), which always issues this describe and aborts
the whole lookup on UnsupportedOperation.

Fixes #1974

* test(ec2): assert the vpn gateway set is empty, not merely present

The substring check passed for any response containing <vpnGatewaySet, including
a non-empty one, so it did not pin the empty-result contract. Uses the item
count, matching the other empty EC2 collection tests.
2026-08-01 16:20:13 -05:00
soreavis a01b707bdc feat(sqs): retain MessageGroupId on standard queue messages (#1891)
* feat(sqs): retain MessageGroupId on standard queue messages

Standard queues dropped MessageGroupId on SendMessage, so
ReceiveMessage never returned it. Since the July 2025 fair-queues
launch, standard queues accept MessageGroupId and return it as a
message system attribute.

Store the value in the standard-queue branch of sendMessage; both
protocol handlers already parse it on send and return it on receive,
covering single and batch sends. Delivery is unchanged: group locking
only applies in the FIFO claim path, so same-group standard messages
still deliver in parallel, matching AWS.

Closes #1496

* test(sqs): give the new test a unique @Order

* chore: retrigger ci
2026-08-01 16:19:27 -05:00
MarcReimann-Otto fcb22be76b fix(1790): better populate describe alarm responses (#1792)
* fix(cloudwatch): describe-alarms puts out more fields in an ordering that is closer to how aws does it.

* fix(cloudwatch): added dimensions array to the output, also added tests for actions and dimensions
2026-08-01 16:10:29 -05:00
Preston-Cai 2c743299ec feat(ec2): added attach and detach volume support (#1787)
* feat(ec2): added attach and detach volume support

* fix(ec2): added same AZ check and fixed unit tests fragility

* fix(ec2): added instance state check for EBS flow

* fix(ec2): updated action set and adjusted exception precedence
2026-08-01 16:00:58 -05:00
Jay 9f0dec9317 feat(lambda): implement the Lambda Extensions API (#1773)
* feat(lambda): implement the Lambda Extensions API
2026-08-01 15:59:34 -05:00
Daniel Zwicker bb7c45ce1b feat(cognito): implement ResendConfirmationCode (#2071)
Closes #2067
2026-08-01 15:56:36 -05:00
Jason van Zyl 205a8f174b feat(cloudcontrol): include EC2 resource tags (#1933)
* feat(cloudcontrol): include EC2 resource tags

* test(ec2): isolate tag assertions

* fix(cloudcontrol): emit AWS-shaped EC2 tags

* fix(cloudcontrol): filter malformed EC2 tags
2026-08-01 15:55:54 -05:00
Aniket Shukla 847c30a52d fix(lambda): reset volatile DynamoDB Streams ESM checkpoints on restart (#2077)
A DynamoDB stream and its sequence numbers live only in memory (the record
buffer and the AtomicLong counter in DynamoDbStreamService are never
persisted), so a restart recreates the stream empty and its sequence numbers
restart from 000000000000000000001. An event source mapping, however, persists
its shard checkpoint (shardSequenceNumbers) on graceful shutdown. After a
restart the poller resumed from that stale checkpoint with an
AFTER_SEQUENCE_NUMBER iterator, which points past every record in the new
stream epoch — so every freshly written record was silently skipped (no
invoke, no error, no log) until the new sequence numbers climbed back above
the stale value.

Discard persisted shard checkpoints for DynamoDB Streams ESMs at startup, so
the poller resumes from TRIM_HORIZON and delivers records from the new epoch,
matching the volatility of the stream itself. The invalidation is now logged
instead of failing silently.

Fixes #2076.
2026-08-01 15:54:09 -05:00
Liam MacPherson ab733798a3 fix(pipes): register kafka-clients reflection metadata for native image (#2068)
* fix(pipes): register kafka-clients reflection metadata for native image

Kafka and MSK pipe sources worked on the JVM but silently delivered nothing
from the native image. kafka-clients ships no native-image metadata, and Floci
depends on it directly rather than through the Quarkus Kafka extension, so
AbstractConfig could not resolve the consumer's CLASS-typed settings:

  poll error: Invalid value org.apache.kafka.common.serialization.ByteArrayDeserializer
  for configuration key.deserializer: Class ... could not be found (ConfigException)

PipesPoller catches that per poll cycle and logs a warning, so the pipe stayed
reported as RUNNING while no records reached the target.

The registered list is what the GraalVM tracing agent recorded across a
self-managed Kafka pipe and an MSK pipe run end to end. SASL and SSL defaults
are excluded: Floci connects over PLAINTEXT, and registering DefaultJwtValidator
aborts the native build because its constructor references jose4j, an optional
kafka-clients dependency Floci does not ship.

* fix(pipes): narrow Kafka reflection list to config-resolved classes

The registration carried three entries the GraalVM tracing agent reported but
ConsumerConfig never resolves: AppInfoParser.AppInfo, AppInfoParser.AppInfoMBean
and the shaded ExtensionRegistry. The guard test derives its expectations from
ConsumerConfig, so it could not see them — dropping one would have left the test
green while native regressed.

Native runs deliver 5/5 on both self-managed Kafka and MSK without them, with
AppInfoParser and the telemetry reporter logging normally, so they are removed
rather than pinned by a change-detector assertion. The registration is now
exactly the config-resolved set and the test asserts equality in both
directions, so list and guard cannot drift.

Also fixes a hole in the test itself: metric.reporters resolves to a class name
rather than a Class, so JmxReporter was registered but unguarded. Collection now
mirrors AbstractConfig.getConfiguredInstances and accepts both forms.

* fix(pipes): guard the reflection list against the real consumer properties

PipesKafkaNativeSupportTest re-declared the properties createConsumer sets
instead of reading them, so it was pinned to a copy. Adding a config-resolved
setting such as interceptor.classes — or the sasl.* that MSK IAM auth would
need — left the test green while the native build lost a registration and the
consumer failed silently through the PipesPoller swallow this PR exists to close.

consumerProperties is now package-private, createConsumer calls it, and the test
reads it, so the registration and its guard cannot drift.

Also corrects the test javadoc: the compatibility suite already runs against the
native image, it just has no Kafka source case yet.

* fix(pipes): disable KIP-714 metrics push for pipe consumers

enable.metrics.push defaults to true, so a pipe consumer would push client
telemetry to the user's broker given one that advertises support. Floci has no
reason to do that.

It also closed an open question from the previous commit. The tracing agent
recorded a reflective lookup on the shaded protobuf ExtensionRegistry, which is
only reachable through the telemetry path — and neither apache/kafka nor the
Redpanda container Floci starts for MSK ships a ClientTelemetry plugin, so no
broker available to us exercises it. Turning the push off removes the question
rather than leaving it untested.

Verified against the native image: both self-managed Kafka and MSK pipes deliver
5/5 to SQS, and ClientTelemetryReporter no longer appears in the logs. Binary
size is unchanged at 202.1MB — the telemetry classes stay statically reachable,
only the reflective path goes away.
2026-08-01 15:45:36 -05:00
MAN$I VERMA 96c7aa68ee fix(apigateway): fall through to less specific resources on method mi… (#1630)
* fix(apigateway): fall through to less specific resources on method mismatch (#1547)

* fix(apigateway): do not fall back to proxy wildcard on method mismatch of configured resource

* style(apigateway): import java.util.ArrayList and use short class name
2026-08-01 15:35:40 -05:00
Ron Yehuda b8edd37b0c fix(s3): include EventBridgeConfiguration in GetBucketNotification response (#2072) 2026-08-01 15:33:55 -05:00
TiM f4e8bd8edf fix(lambda): carry the owning account into published version snapshots (#2041)
PublishVersion builds its snapshot field by field and left accountId unset, so
every published version reported a null owning account while $LATEST reported
the real one for the same function. Consumers that key off the account then have
to re-derive it from the function ARN or fall back to a default: codeObjectKey
substitutes 000000000000 for a null account, and anything keying IAM state on
the function account has nothing to key on.

Copy accountId alongside the other snapshot fields so a version carries the same
owning account as the function it was published from. The account was never
lost, the version ARN already embeds it, it just was not on the model.

Fixes #2040
2026-08-01 15:31:29 -05:00
Alex Bannaandabanna aadc93e306 feat(rum): add CloudWatch RUM app-monitor service (#1797)
* feat(rum): add CloudWatch RUM app-monitor service

Adds a minimal CloudWatch RUM service (restJson1) covering the app-monitor
lifecycle — CreateAppMonitor, GetAppMonitor, UpdateAppMonitor, DeleteAppMonitor,
ListAppMonitors — backed by an in-memory store.

Previously restJson1 RUM requests (e.g. POST /appmonitor) fell through to the S3
path-style catch-all (@Path("/{bucket}")) and returned an XML error that
restJson1 SDKs (and the CDK AwsCustomResource used for RUM AppMonitor custom
resources) cannot parse. Literal /appmonitor and /appmonitors paths take JAX-RS
precedence over S3's /{bucket} template (the same mechanism eks/mq use), so the
routes win with no extra routing wiring.

Verified with aws-cli 2.33.18 against a dev-mode emulator: CreateAppMonitor
returns an Id, GetAppMonitor/ListAppMonitors round-trip, DeleteAppMonitor then
GetAppMonitor returns ResourceNotFoundException.

* fix(rum): make monitor updates atomic

* fix(rum): align app monitor lifecycle with AWS

* chore: retry flaky Node compatibility check

* fix(rum): address app-monitor review feedback

---------

Co-authored-by: abanna <abanna@users.noreply.github.com>
2026-08-01 15:28:54 -05:00
Kushida 04873bfd09 fix(ssm): report invalid batch parameter names (#2075) 2026-08-01 11:53:29 -05:00
floverfeltandFlorian Overfelt 0142dc434f feat: Add AWSCloudFormationReadOnlyAccess as a managed policy. (#2057)
Co-authored-by: Florian Overfelt <joverfelt@meso-scale.com>
2026-07-31 00:16:13 -05:00
Hector VenturaandMarcel Herhold 02385da37b feat(apigateway): support floci:override-id for v1 and v2 (#2045)
* feat(apigateway): support floci:override-id for v1 and v2

API IDs were generated randomly, so endpoint URLs changed on every
recreate. v1 accepted an undocumented `_custom_id_` tag and echoed it
back as a normal tag; v2 had no override at all. Other services already
pin IDs through the reserved `floci:override-id` tag.

Both CreateRestApi and CreateApi now accept `floci:override-id`, routed
through ReservedTags.getOverride so the value is validated rather than
used verbatim: non-blank, no whitespace or control characters, and no
`/`, `?`, `#`, since those break the endpoint URL. Override keys are
consumed rather than stored, so they no longer appear in the returned
tags, and supplying either key to TagResource is rejected because an ID
cannot change after creation.

`_custom_id_` keeps working as a deprecated fallback and is now stripped
the same way; `floci:override-id` wins when both are present so callers
can set both during a migration. The key stays API Gateway specific: the
shared strip and reject helpers are untouched, so KMS and Cognito still
treat `_custom_id_` as an ordinary tag.

Error code is BadRequestException, declared by CreateRestApi, CreateApi
and TagResource on both services. The shared reject helper's
ValidationException is declared by neither, which is why API Gateway gets
its own guard rather than reusing it.

Closes #1593

Co-authored-by: Marcel Herhold <herhold.marcel@gmail.com>

* fix(apigateway): reject duplicate override ids with ConflictException

CreateRestApi (v1) and CreateApi (v2) now return 409 ConflictException
when the resolved API id already exists in the region, instead of
silently overwriting the existing API, matching how KMS and Cognito
treat duplicate override ids.

---------

Co-authored-by: Marcel Herhold <herhold.marcel@gmail.com>
2026-07-29 23:40:27 -05:00
Aniket Shukla b62d1e762e fix(cloudformation): preserve subnet public IP setting (#2031) 2026-07-29 22:27:15 -05:00
TiM c0522593e5 fix(dynamodb): resolve nested document paths in ADD and DELETE update actions (#1908) 2026-07-29 21:56:48 -05:00