Commit Graph
1980 Commits
Author SHA1 Message Date
Vũ Thế Huy d4eeada135 feat(redshift): support MAXERROR in COPY (#7291)
* feat(redshift): support MAXERROR in COPY

MAXERROR n of 2 or more now asks the backend to skip records it cannot convert
(ON_ERROR ignore) and to fail the COPY at the n-th one (REJECT_LIMIT n - 1),
which needs a PostgreSQL 18 backend. A MAXERROR of 0 or 1 fails at the first
error, as without the option.

* test(redshift): add PostgreSQL 18 MAXERROR integration test

* test(redshift): use shared DockerAvailability and RedshiftConnections in PostgreSQL 18 IT

Address review feedback on PR #7291:
- Call testing.DockerAvailability.isAvailable() instead of carrying a private copy of the probe.
- Use RedshiftConnections.waitForConnection(cluster) instead of duplicating the JDBC connection wait helper.
2026-11-02 11:58:15 -04:00
Ovidiu (Ovi) bb5e692b87 feat(dynamodb): emulate Contributor Insights on tables and global secondary indexes (#7326) 2026-11-02 11:30:29 -04:00
Andre Kurait bbe23ed550 fix(stepfunctions): authorize task callbacks against their resource (#7277)
* fix(stepfunctions): authorize callbacks with generated resource lookups

Preserve measured callback resource authorization, token ownership and closed-token behavior. Use explicit generated member lookups, retaining ordinary name resolution and invalid-token precedence. Preserve current main Redshift session-through lookups, generator type validation and payment alias consumers.

Signed-off-by: Andre Kurait <akurait@amazon.com>

* test(stepfunctions): reuse the SQS callback queue fixture

Create callback queues through SqsTestQueue and await token JSON with the shared in-process helper. Retain the existing callback authorization matrix, token error precedence and cleanup registration.

Signed-off-by: Andre Kurait <akurait@amazon.com>

---------

Signed-off-by: Andre Kurait <akurait@amazon.com>
2026-11-02 11:29:30 -04:00
Abhigya ebd2b70b32 fix(apigatewayv2): send HTTP_PROXY backends the client address in Forwarded (#7281) 2026-11-02 10:46:57 -04:00
Allen Sanborn 4438e3df49 fix(redshift): keep tags, VPC and subnet detail on cluster subnet groups (#7211)
* fix(redshift): keep tags, VPC and subnet detail on cluster subnet groups

CreateClusterSubnetGroup dropped Tags and passed a null VPC, so
DescribeClusterSubnetGroups returned no Tags, VpcId, SubnetGroupStatus or
SubnetAvailabilityZone and the Terraform provider saw drift on every plan.

Tags are now parsed (Tags.member.N and Tags.Tag.N) and stored on the group,
where DescribeTags/CreateTags already find them under the subnetgroup ARN.
The VPC and each subnet's zone are resolved from EC2 on create and modify;
subnets EC2 does not know are kept unresolved, as before. Groups persisted
earlier load unchanged (the new zone map is nullable).

* fix(redshift): inject Ec2Service through the constructor

Replace the Ec2Service field injection with a constructor parameter held
in a final field. The previous @Inject signature stays as a package-private
delegating constructor passing null, so hand-built test services still
skip subnet resolution.

* test(redshift): build the EC2 setup requests with Ec2Requests

ec2Id now only extracts the id from the response; the auth header and
Action come from the shared Ec2Requests.ec2 helper.

* test(redshift): make ec2Id a plain path extraction

Call sites build the EC2 request with Ec2Requests.ec2 and pass it in;
the account and region are named constants.
2026-11-02 10:09:50 -04:00
Priamo Germosen c84e9249c9 fix(iam): check a Redshift Data statement in a session on the target the session runs on (#7300)
Under IAM enforcement, an ExecuteStatement or BatchExecuteStatement
naming only its SessionId was checked on `*`. A policy allowing one
cluster's or workgroup's ARN let a statement open a session there and
refused the next statement in it, and a deny on that ARN under an
allow on `*` let every statement after the first through.

A session runs on the cluster or serverless workgroup it was opened
on: ListSessions filters sessions "by session status, compute target
(cluster or serverless workgroup), or database", and the SessionId
"can then be used in subsequent ExecuteStatement and
BatchExecuteStatement operations". The Service Reference gives a
session no resource type, so the generator's new THROUGH names the
members a request names a resource through, with the types that
resource may be of: redshift-data:SessionId, on a cluster or a
workgroup. Each operation whose request has the member, and whose
action acts on one of those types, gets a generated
`{"types": [...], "through": "SessionId"}` entry, so there are no hand
corrections. The generator's validation and the Java loader reject a
`through` that is not one top-level member, or that sits beside any
other reading key.

For such an entry the reader asks the namespace's StoredResourceArns
through(member, value, region) for the ARN of the caller's resource
at the other end, and keeps it when it matches one of the types. When
there is none, as for a session that is closed, expired or another
caller's, it names nothing and the request stays on `*`; the Data API
then refuses it. RedshiftDataService now implements StoredResourceArns
for redshift-data, since it owns the sessions and builds their owner
scope: through gives the target ARN of the caller's open session,
through RedshiftDataSessions.targetArn, which find now shares; find
still gives the workgroup a name or an ARN finds, through the
resolver.

ExecuteStatement and BatchExecuteStatement gain the entry (1095
operations over 27 namespaces, unchanged). ListSessions takes a
SessionId too, but the Service Reference gives it no resource type,
so it stays on `*`. iam.md's sentence on EventBridge V2, which said
Floci does not serve it, now says how its requests are read.
2026-11-02 07:53:36 -06:00
Priamo Germosen db3efe8186 feat(emr): run a custom JAR's MapReduce and apply Hadoop classifications (#7294)
In the docker runner mode a custom JAR step whose main class starts a
MapReduce job, such as the Management Guide's wordcount of Hadoop's
examples JAR, never ended: its spark-submit read the image's
mapred-site.xml, which names YARN, and the job kept retrying a
ResourceManager at 0.0.0.0:8032. A Jar of
/usr/lib/hadoop-mapreduce/hadoop-streaming.jar, where EMR has it, named
a file the image lacks. And a cluster's mapred-site, hadoop-log4j and
hadoop-env classifications reached none of its steps.

Now, on a cluster:

- a custom JAR or Spark step's spark-submit runs after the Hadoop setup
  a command gets, so its HADOOP_CONF_DIR is the copy with Floci's S3,
  the cluster's HDFS and MapReduce in local mode, which spark-submit
  puts on its class path; a MapReduce job its main class starts runs in
  the driver's JVM.
- a Jar of /usr/lib/hadoop-mapreduce/hadoop-streaming.jar runs the
  image's /usr/lib/hadoop/hadoop-streaming.jar.
- mapred-site, which will "Change values in the MapReduce application's
  mapred-site.xml file", goes in the copied mapred-site.xml ahead of
  Floci's local mode and staging folder, which win.
- hadoop-log4j, which will "Change values in Hadoop's log4j.properties
  file", follows the copied log4j.properties, a later key winning.
- hadoop-env's export classification starts the copied hadoop-env.sh,
  which the hadoop command reads, each value as given, single-quoted,
  as spark-env's exports are set without shell expansion; a name a
  shell cannot export is left out. The image's own lines come after
  and add to HADOOP_CLASSPATH rather than set it, so the Release
  Guide's HADOOP_CLASSPATH of /path/to/my.jar keeps the LZO codec the
  image's core-site.xml names, without which every job fails.
- a jar the MapReduce home links that the image lacks is named on the
  step's standard error, as a job that needs it fails later, on its
  class path, and emr.md says which releases this has run on (emr-7.5.0
  and emr-7.10.0).

An EMR Serverless run still starts spark-submit as it is. A custom JAR
step's spark-submit reads neither hadoop-env.sh nor Hadoop's
log4j.properties, so those two do not reach it.
2026-11-02 07:53:24 -06:00
Priamo Germosen b4c539d009 fix(iam): read a status and a service principal from the model (#7265)
Two members were held back from the vendored shapes because this service was
read as answering them in a wording of its own. Captures from a real account,
posted on issue #6042, answer both, and neither reading holds.

`statusType` is shared by `UpdateAccessKey`, `UpdateSigningCertificate`,
`UpdateSSHPublicKey` and `UpdateServiceSpecificCredential`. One hand-written
check answered all four, naming neither the offending value nor the permitted
set, which is what a 2025 recording of one of them carries. AWS names the set,
`Member must satisfy enum value set: [Expired, Active, Inactive]`, and answers
an omitted status as the required member it is rather than as a value outside
the set, which one check reading a null as a bad value could not tell apart.
Both are the model's own wording, so all four read it through the Query front
door and the check comes out.

The set is listed in the order AWS lists it, which is not the order botocore
declares. The values are the model's and the generator holds them to it: only
their order is read from the capture.

`AWSServiceName` on `CreateServiceLinkedRole` answered `InvalidInput` with a
sentence about its own bounds, where AWS answers a constraint violation naming
the declared pattern. A principal that satisfies the pattern and names no
service AWS has is still `InvalidInput`, so the layering the capture leaves in
place is the shape first and then whether the service exists.

The required-member message loses the word that stood where the value would
go. IAM names a member and leaves its value out everywhere, and the one
message carrying `Value null at` did so for want of a capture either way; the
capture answers `Value at 'status'`. The form moves in the one object that
decides it, so the eight refusals this package writes by hand move with the
walk, and the services that do quote their values keep the word.

The message quotes the pattern AWS quotes, which is not the one the shape
declares. botocore aliases that member to the shape it gives a group name,
`[\w+=,.@-]+` at 1 to 128 characters, where AWS's message gives
`[\w+=.@-]*`: the comma is gone and a `*` stands where the minimum is 1.
Only the message is in hand rather than the shape, so the generator records
AWS's text beside the model's and one object decides which text any
violation quotes, the way the enum order is read from the capture while the
values stay the model's. A comma is still admitted and an empty principal
still refused, and an empty one now breaks the minimum and the pattern at
once, as every other string member here does. The comma is what a second
capture would settle, and the difference is recorded in
`docs/services/iam.md`.
2026-11-02 07:53:11 -06:00
Vũ Thế Huy 2be776aa4f feat(firehose): authorize the roles of a Redshift destination (#7296)
* feat(firehose): authorize the roles of a Redshift destination

With IAM enforcement on, check the role of the intermediate S3Configuration
(trust firehose.amazonaws.com, s3:PutObject) before a batch is staged, and
the destination RoleARN (same trust, s3:GetObject) before the COPY runs.
A refused staging keeps the records buffered; a refused load retries against
the object already staged, so a batch is never staged twice.

The COPY still carries no credentials; minting them and authenticating the
proxy's S3 read come in follow-up changes.

* fix(firehose): guard transform error writes and validate staging roles

Check staging role permissions on Lambda transformation error output before writing to S3 so rejected writes keep batches buffered. Validate S3 destination role ARNs during destination creation/update and ensure empty roles are not exempt from authorization checks when IAM enforcement is active.

* fix(firehose): keep ordinary S3 streams on 4-arg transform overload

Avoid calling the 5-arg transform overload for ordinary S3 streams so existing 4-arg mocks (such as in FirehoseDataFormatConversionTest) continue to match.
2026-11-02 09:43:36 -04:00
Ovidiu (Ovi) 33e12b3cf7 fix(lambda): persist ParallelizationFactor on stream event source mappings (#7299)
* 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.
2026-11-02 09:36:25 -04:00
Vũ Thế Huy cd6e516929 feat(redshift): support FILLRECORD in COPY (#7269)
* feat(redshift): support FILLRECORD in COPY

A text or CSV record that stops short of the last columns is loaded with the
rest of them filled: a character column gets a zero-length string and any other
column NULL, as in Redshift. EMPTYASNULL and NULL AS '' make the character
columns NULL too. Without FILLRECORD nothing changes.

* fix(redshift): bound memory growth for FILLRECORD output

Count transformed output against COPY_TRANSFORM_MAX_OBJECT_BYTES and the shared COPY_TRANSFORM_HEAP_MIB budget as records are written, so short records expanded by FILLRECORD fail with the statement limit or memory budget error rather than exhausting the emulator heap.

* fix(redshift): load missing CHAR columns as NULL on FILLRECORD
2026-11-02 09:33:31 -04:00
galsuchetzky-act a69b3621a0 feat(bedrock): store resource-based policies on guardrail profiles (#7208)
AWS lets a system-defined guardrail profile carry a resource-based
policy as well as a guardrail, and a guardrail with cross-Region
inference is shared only once each destination-Region profile ARN
carries one. The policy is stored in the Region whose endpoint
received PutResourcePolicy, under the ARN passed, so GetResourcePolicy
on a profile ARN through an endpoint that stored nothing returns {}.
A profile policy may allow only bedrock:ApplyGuardrail:
https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails-resource-based-policies.html

PutResourcePolicy, GetResourcePolicy and DeleteResourcePolicy now
accept a guardrail-profile ARN. Its policy is stored per calling Region
and profile ARN, GetResourcePolicy returns {} when that pair holds
none, and DeleteResourcePolicy clears only that pair. PutResourcePolicy
holds the policy to the guardrail language with bedrock:ApplyGuardrail
as the only action. A profile ARN of another account or partition, or
whose profile id is not of the form <prefix>.guardrail.v<N>:<M>, is
ResourceNotFoundException. Which destination Regions are valid for the
calling Region is not checked, and the policy is not evaluated against
callers.

Closes #6671
2026-11-02 09:01:14 -04:00
Simon Claessens b65755da3a feat(rds): export DB snapshots to S3 as Parquet (#7289) 2026-11-02 08:34:19 -04:00
Vũ Thế Huy b92340b243 fix(redshift): skip the header of every object in a COPY (#7266) 2026-11-02 08:30:02 -04:00
Murtuza Chhil 6906759c9a feat(paymentcryptography): the Payment Cryptography control plane (#7090) 2026-11-02 08:14:58 -04:00
Daniël van Ziel 9e270fbfe1 fix(appsync): report Lambda data source function errors as Lambda:<FunctionError> with the function's message (#7288)
* fix(appsync): report Lambda data source function errors as Lambda:<FunctionError> with the function's message

* fix(appsync): keep the raw payload when a Lambda error payload has trailing content
2026-11-02 08:13:22 -04:00
TATSUNO “Taz” Yasuhiro f1c7098d9c feat(lambda-web): add a text/plain Content-Type to app responses that send none (#7285) 2026-11-02 07:47:05 -04:00
Ovidiu (Ovi)andOvidiu 1b87483483 feat(appconfig): implement UpdateApplication (#7209)
* feat(appconfig): implement UpdateApplication

* fix: address AppConfig update review findings

* fix: incorporate AppConfig maintainer feedback

---------

Co-authored-by: Ovidiu (Ovi) <462561+ovidiubute@users.noreply.github.com>
2026-11-02 07:41:06 -04:00
Oleksandr Nikolaichuk 42bc856258 test(cloudformation): run the schema coverage ratchet in CI (#7282) 2026-11-02 07:37:06 -04:00
Abhigya 5d8546a1ff fix(elbv2): add X-Forwarded headers to ALB requests as AWS does (#7278)
* fix(elbv2): add X-Forwarded headers to ALB requests as AWS does

An ALB forwarded client headers unchanged, so a target never learned the
client address and trusted whatever X-Forwarded-For the client sent. The
routing.http.xff_* attributes were stored but never read.

Apply routing.http.xff_header_processing.mode and
routing.http.xff_client_port.enabled on HTTP, WebSocket and Lambda targets,
and set X-Forwarded-Proto and X-Forwarded-Port from the listener connection.
ModifyLoadBalancerAttributes now rejects invalid values for both attributes.

Keep every line of a repeated request header when proxying, and use the last
value in a Lambda event's headers map, as the ALB guide describes.

Take the HTTP API $context.identity.sourceIp from the TCP connection instead
of the caller's X-Forwarded-For, which let a caller spoof it.

* docs(apigatewayv2): limit the X-Forwarded-For hop note to ALB listeners
2026-11-02 07:32:52 -04:00
Abhigya 72321539dd fix(elbv2): add X-Amzn-Trace-Id to requests forwarded to targets (#7280)
An ALB adds or updates X-Amzn-Trace-Id before it sends a request to a target,
but Floci passed through only what the client sent. Generate a Root field when
the header is absent, insert or update a Self field when it is present, keep
other fields, and rewrite to a new Root field above 7 KB of request headers.
2026-11-02 07:28:30 -04:00
Priamo Germosen 048070e699 feat(emr): run hadoop-streaming and hadoop-lzo steps (#7264)
In the docker runner mode a command-runner.jar step running
hadoop-streaming, which "Submits an Hadoop streaming program. In the
console and some SDKs, this is a streaming step", or hadoop-lzo, the LZO
indexer, failed without running, as the image's hadoop had no MapReduce;
and a command's hadoop fs could not reach S3, its classpath having no
AWS SDK v2 and the image's EMRFS not being pointed at Floci.

Now a step's hadoop command, on its cluster:

- runs MapReduce in local mode: links to Spark's shaded Hadoop client,
  the image's only copy of MapReduce, and to the jar Spark's own S3A
  finds the AWS SDK in make up its MapReduce home, so they are on its
  class path whatever HADOOP_CLASSPATH a command sets, and a copy of its
  mapred-site.xml sets mapreduce.framework.name to local. The local job
  runner names a job's -files and -archives by their path alone, which
  the default file system, the cluster's HDFS, resolves, so its staging
  folder is a link to the same path in the HDFS folder.
- reaches Floci's S3 through S3A, with the settings its spark-submit
  gets, now one list for both, ahead of the cluster's HDFS and
  core-site.
- logs to standard error when its log4j.properties is empty, as the
  image's is, in the layout of the Management Guide's step log lines, so
  a failed job's reason is in the step's stderr.
- runs hadoop-streaming from the jar the image has, where the image's
  own hadoop-streaming names /usr/lib/hadoop-mapreduce, which it lacks.

hive-script and pig-script steps still fail without running.
2026-11-01 20:57:59 -06:00
Priamo Germosen 9bd90d6580 fix(iam): check Redshift Data API requests on the cluster or workgroup they name (#7234)
Under IAM enforcement, Redshift Data API requests were checked on `*`,
so a grant scoped to a cluster or a serverless workgroup was refused
and a deny scoped to one never applied.

The Service Reference gives ExecuteStatement, BatchExecuteStatement,
DescribeTable, ListDatabases, ListSchemas and ListTables two resource
types: Redshift's `cluster:${ClusterName}`, which ClusterIdentifier
fills, and Redshift Serverless's `workgroup/${WorkgroupId}`. A
workgroup's ARN ends in the id Redshift Serverless gives it (its
workgroupId, "The unique identifier of the workgroup"; botocore's
WorkgroupNameString takes an ARN ending in workgroup/<uuid>), while a
request names it by WorkgroupName, "The serverless workgroup name or
Amazon Resource Name (ARN)". So the workgroup is a FOUND_BY type,
found by WorkgroupName.

FOUND_BY named a type by its members only where the rule had derived
a fill for the type to replace, as ResourceId fills a scalable target's
${ResourceId}. No member fills ${WorkgroupId}, so FOUND_BY now names
every FOUND_BY type the action acts on whose members the request has,
as its docstring already said. The Application Auto Scaling entries
are unchanged.

RedshiftDataResourceResolver, which resolves the target a request
runs on, now implements StoredResourceArns for redshift-data: it
gives the ARN of the workgroup a name or an ARN finds, through
RedshiftServerlessService.findWorkgroupByNameOrArn, which the
service's own name-or-ARN lookup now uses as well.

Redshift Data joins the table (12 operations, 1048 over 26
namespaces). The six operations above are checked on the cluster's
ARN or on the stored workgroup's, and on `workgroup/*` for a workgroup
there is none of; their SecretArn names neither. A request naming only
its SessionId stays on `*`, and so do CancelStatement,
DescribeStatement, GetStatementResult, GetStatementResultV2,
ListSessions and ListStatements, which the Service Reference gives no
resource type.
2026-11-01 20:57:48 -06:00
Vũ Thế Huy 8c32e9f6ba feat(firehose): run the Lambda processor of a Redshift destination (#7230) 2026-11-01 22:27:39 -04:00
Jimmy Liu Jia 1cbf58a8ae fix(iam): match service-linked role name validation (#7235)
* fix(iam): match service-linked role name validation

Match the recorded AWS ValidationError for malformed AWSServiceName while preserving the documented length and character constraints.

Refs #6042 (item 1)

* fix(iam): align service-linked role validation
2026-11-01 22:24:43 -04:00
Allen Sanborn 268d231690 fix(ssm): resolve Canonical's public Ubuntu AMI parameters (#7268) 2026-11-01 22:15:44 -04:00
TATSUNO “Taz” Yasuhiro b7697f8148 feat(lambda-web): write the platform's own Date header on app responses in place of the app's (#7257)
* feat(lambda-web): write the platform's own Date header on app responses in place of the app's

* test(lambda-web): check the Date header in the headers test on its function
2026-11-01 22:03:46 -04:00
Vũ Thế Huy 105d6732f3 feat(redshift): support DATEFORMAT, TIMEFORMAT and ACCEPTANYDATE in COPY (#7263) 2026-11-01 21:55:35 -04:00
Vũ Thế Huy 1fe8eae011 feat(firehose): deliver Redshift COPY loads to a Serverless workgroup (#7227)
* feat(firehose): deliver Redshift COPY loads to a Serverless workgroup

A ClusterJDBCURL with a redshift-serverless host now resolves the workgroup in
the stream's account and region and loads through its runtime, with its
database and admin user. A URL naming another database fails the delivery
through the existing retry path. Provisioned delivery is unchanged.

* fix(firehose): route Redshift Serverless delivery through the workgroup proxy

Connect Firehose Serverless delivery to the workgroup's proxy endpoint (127.0.0.1:<proxyPort>)
instead of the internal PostgreSQL container, matching provisioned cluster delivery and
enabling S3CopySimulator to intercept COPY FROM 's3://...'.

* fix(firehose): drop managed admin secret override on proxy delivery
2026-11-01 20:46:59 -04:00
Allen Sanborn 3f675c00fb fix(opensearch): accept Elasticsearch 7.1, 7.4 and 7.7 domains (#7256) 2026-11-01 20:28:08 -04:00
Priamo Germosen b4ae0ce9e0 feat(emr): apply a step's Properties, core-site and spark-log4j2 (#7226)
In the docker runner mode a step's HadoopJarStep.Properties, "A list of
Java properties that are set when the step runs. You can use these
properties to pass key-value pairs to your main function", were kept
but never applied, and of a cluster's classifications only
spark-defaults, spark-hive-site and spark-env reached its steps.

Now:

- A custom JAR step's Properties are system properties of the JVM its
  main class runs in, through SPARK_SUBMIT_OPTS, each -Dkey=value in
  single quotes as spark-submit's launcher reads them, after any Java
  options a spark-env export puts there, so a step's own win. A
  command-runner.jar or script-runner.jar step's would be its runner's
  own JVM's, which Floci has none of, and a JVM's system properties do
  not pass to a process it starts, so they go nowhere. The API sentence
  is the only source; emr.md calls this Floci's reading.
- core-site, which will "Change values in Hadoop's core-site.xml file",
  reaches Spark as spark.hadoop. settings ahead of spark-hive-site's,
  as core-site.xml comes ahead of hive-site.xml, with spark-defaults
  winning over both; a command's hadoop command gets it too, after the
  cluster's HDFS settings in its core-site.xml copy, escaped for XML.
- spark-log4j2, which will "Change values in Spark's log4j2.properties
  file", follows the log4j2.properties of the Spark configuration a
  spark-env export of SPARK_CONF_DIR names, else the image's, in a copy
  of the step's own, a later key winning: a Spark step with some runs
  spark-submit after a wrapper that makes the copy, and a command's
  wrapper does the same before its own changes, now from that exported
  folder too, links followed. What is added starts on a line of its
  own, as the image's log4j2.properties has no line break at its end,
  and a value's leading spaces are escaped, as Properties.load would
  skip them.

SparkJobRunner.Job gets coreSite and sparkLog4j2 components, which an
EMR Serverless run leaves empty.
2026-11-01 17:17:26 -06:00
Priamo Germosen b3bee2d407 feat(codeartifact): retain npm packages from a public external connection (#7198)
npm's native registry route can now retain a missing package from a repository's own
public:npmjs external connection and serve it, instead of always 404ing, mirroring the
AWS-documented external-connection behavior already shipped for Maven (#6889) and NuGet (#7104).

Unlike Maven's GAV layout and NuGet's {id}/{version}/{filename} content route, npm's own real
wire protocol has no request shape that names one version: npm install <pkg>@<version> always
fetches the bare package's full packument first (confirmed against pacote's own source,
RegistryFetcher#packumentUrl, always the bare package path) and only picks the version out of
its own versions map afterward. So this does two things together, not just one:

- A bare packument read (the one every real npm install actually sends) merges the real
  registry's own versions and dist-tags into whatever Verdaccio already knows locally, computed
  fresh per request and never written to Verdaccio itself (its own publish protocol has no way
  to record a version's metadata without that version's real tarball bytes in the very same
  call, confirmed against a live container). Every newly-merged version's dist.tarball is
  rewritten to this repository's own proxy URL under a deterministic <bareName>-<version>.tgz
  shape; dist.shasum/dist.integrity are kept exactly as the real registry declared them, since
  there is no real content yet to hash locally.
- A tarball download for a version not yet genuinely retained triggers the real fetch, the
  same claim/fence/origin-tracking machinery Maven and NuGet already use (closing the same race
  against a concurrent DeletePackageVersions/direct push), reusing CodeArtifactService's
  already-generalized claimRetainedVersionOrigin/retainAssetUnderVersionFence methods directly.

New: NpmExternalConnectionClient (the outbound client for public:npmjs) and
CodeArtifactNpmExternalConnectionImporter (the merge and retention logic), wired into
CodeArtifactNpmDataPlane's existing raw proxy.

Deliberately scoped the same way Maven/NuGet's own base PRs were: no caching/TTL on the merge
fetch (a live check against the real registry on every packument read for a connected
repository, matching the same no-caching fidelity level Maven's own maven-metadata.xml merge
already ships with), and the documented but rarely-used single-version registry endpoint
(GET /<pkg>/<version>) is not specially handled, since real npm install never sends it either.

Update: fixed three issues Greptile's review caught, all specific to npm's own two-step
retention (a plain cache-miss asset fetch, as NuGet/Maven's retention already was, is not
enough here):
- retainAssetUnderVersionFence's own write was always the fixed RepositorySidecarManager#
  storePackageVersionAsset call, which builds a minimal version document with no dependencies/
  engines/scripts. Generalized it to take the actual write as a plain Runnable instead, so npm's
  own call can reuse the real registry's full-form version document verbatim (the same
  reuse-the-source-document treatment VerdaccioSidecarClient#copyPackageVersionAsset already
  gives a version copied from another repository), fetched once, only when a version is
  actually retained, via a new NpmExternalConnectionClient#fetchFullPackument. NuGet's own call
  site wraps the exact same plain storePackageVersionAsset call it always made.
- Verdaccio always points a fresh package's dist-tags.latest at whichever version was retained
  most recently (confirmed live, nothing a retention write sends can suppress it), so a plain
  retention could silently move what an unpinned npm install or ListPackageVersions'
  defaultDisplayVersion resolves to. Fixed on both sides of that same bug: the merge now only
  lets an external dist-tag replace a local one that itself points at an externally-retained
  version, and CodeArtifactService#listPackageVersions ignores preferredDisplayVersion the same
  way when it names one.
- A retained version's readme was never captured, so GetPackageVersionReadme 404ed on it even
  though the tarball existed; the full packument fetch above also captures the package's own
  readme (confirmed live: it only ever lives at the top of the full packument, never per
  version) the same way a native publish's own readme capture already works.

Verified two ways beyond the automated suite:
- A Docker-gated integration test retains a real package (is-even 1.0.0) from the real, live
  npmjs.com, through a real Verdaccio sidecar: a bare packument read merges the real version in
  without yet counting any bytes, a subsequent tarball fetch retains it and counts its bytes,
  a refetch does not double-count, mixed-case-irrelevant upstream-block enforcement blocks both
  the merge and the retention, a genuinely-missing package stays 404, the retained version's
  EXTERNAL origin reporting is confirmed against the real sidecar, and its real dependencies/
  engines and readme are confirmed readable back from the real sidecar afterward.
- Direct curl checks against the real registry.npmjs.org confirmed the exact packument/tarball
  URL shapes this client builds, including the %2F-escaped scope separator the packument
  endpoint specifically needs (unlike the tarball path, which uses a literal slash), and that
  the abbreviated packument form carries dependencies/engines but not scripts or any readme.

Update: fixed a fourth issue from the same re-review, found once the three fixes above landed:
mergedPackument always fetched the real registry's abbreviated form, even when the real npm
client's own Accept header asked for the full one (the shape npm view <pkg> readme-style
commands use), so a package the merge had not yet retained anything for showed no readme at
all. The merge now honors that header, fetching the real full packument only when the request
actually asked for it, and copies its package-level descriptive fields (readme among them) in
the same never-override-local way everything else here already merges, with no change to the
hot npm install path's own abbreviated fetch.

Update 3: fixed a fifth issue from the same re-review: mergedPackument's own real registry
fetch is a genuine network round trip, and nothing held any lock across it, so a
DeleteRepository finishing its own cleanup while that fetch was still in flight let the later
ensureReady call start a fresh container under an id the delete had already released, one
nothing would ever release again. Added a re-check that the repository still exists right
after that fetch, before this method ever touches the sidecar. This narrows the window back
down to an ordinary check-then-act gap rather than one stretched out by a real network round
trip, not a full fix: VerdaccioSidecarManager's own beginUse/endUse are no-ops today (unlike
PypiserverSidecarManager's), so nothing here can fully close this yet. Filed #7204 to track
giving it real in-flight-use tracking as its own, cross-cutting fix.

Update 4: fixed a sixth issue from the same re-review: DisposePackageVersions deletes a
version's real Verdaccio content outright, so versions.has(version) alone could not tell a
disposed version apart from one never retained at all, and the merge could add a disposed
version straight back in from the real registry's own still-unaware listing, even pointing
dist-tags.latest at it. An unpinned npm install could then select it, only to have the
download correctly, but confusingly, fail. The merge now excludes any externally-named version
this repository has marked Archived or Disposed, reusing the same
requireContainerBackedVersionDownloadable check the native download route itself already
enforces.
2026-11-01 17:17:12 -06:00
Ruslan Sovinskyy dfaab8ba4c feat(eventbridgev2): add EventBridge V2 service (#6962) 2026-11-01 18:44:29 -04:00
Ovidiu (Ovi)andOvidiu fd4abd365b feat(inspector2): support disabling scans (#7181)
* feat(inspector2): support disabling scans

* fix(inspector2): enforce disable permission

* fix(inspector2): accept optional resource types

---------

Co-authored-by: Ovidiu (Ovi) <462561+ovidiubute@users.noreply.github.com>
2026-11-01 12:22:49 -04:00
Priamo Germosen a74a9b0ffc feat(emr): run s3-dist-cp steps (#7192)
In the docker runner mode an s3-dist-cp step, the Release Guide's way of
moving data "from Amazon S3 into HDFS where it can be processed by
subsequent steps", between buckets or back to S3, was FAILED without
running, and on the default TERMINATE_CLUSTER it ended its cluster with
errors. The EMR Serverless image steps run in has neither s3-dist-cp nor
the MapReduce it runs on.

Now a command-runner.jar step whose first argument is s3-dist-cp runs
Floci's own S3DistCp: a Python program, emr/s3-dist-cp.py, which the step's
command writes into the container and runs through spark-submit, copying
through Hadoop's file systems in Spark's JVM. The command wrapper gives it
what a Spark step gets: S3 paths in Floci's S3 and hdfs:// paths, and
those without a scheme, in the cluster's HDFS. It takes the options of
the Release Guide's table, --name=value or --name value, and -D
property=value:

- --src and --dest, a source folder's files keeping their folders;
- --srcPattern and --groupBy matched against the whole path; --groupBy
  concatenates the files whose groups give the same name into one file
  named by them, and refuses an expression with no group, as the guide
  says S3DistCp does; --targetSize breaks a larger group into parts
  numbered before the extension ("myfile0.gz, myfile1.gz"); without
  --outputCodec a group keeps the compression its files share, named
  with that codec's extension, or has none when they differ, each file
  decompressed so the group is one stream;
- --outputCodec (gzip, gz, lzo, lzop, snappy, none) through Hadoop's
  codecs, each source decompressed by its own extension;
- --deleteOnSuccess, deleting the files but not their folders, as AWS's
  "Seven tips for using S3DistCp" says;
- --outputManifest, --previousManifest, --requirePreviousManifest and
  --copyFromManifest, the manifest gzipped JSON lines of path, baseName,
  srcDir and size, as that post shows them;
- --s3ServerSideEncryption, --storageClass, --disableMultipartUpload and
  --multipartUploadChunkSize as S3A's settings; --numberFiles,
  --startingIndex, --srcPrefixesFile and --appendToLastFile, the last
  through a copy renamed over the file, as neither S3 nor the cluster's
  HDFS appends in place. The copy has a name of its own and goes if the
  writing fails, and the file steps aside, under a name of its own too,
  until the copy has taken its place, coming back if it cannot, so a
  failed append leaves it as it was. --s3Endpoint is ignored, S3 being
  Floci's.

--requirePreviousManifest takes true or false, after = or as the next
argument, and alone is true, its default. A --srcPrefixesFile line ending
in / names that folder alone, its slash kept though Hadoop's Path drops
it; any other is a prefix as S3 lists one, logs/day taking in
logs/day-old/.

A bucket name with an underscore fails the step, as S3DistCp "does not
support" one, and so does a copy Hadoop fails, leaving what was copied.
A copy that would write two files to the same path, the manifest
included (a.log and a.log.gz with --outputCodec=gzip), a file over one
of its own sources, as with the same --src and --dest, or a file outside
--dest, through a .. in a manifest's baseName or in --outputManifest
(Hadoop's paths resolve it), or a file with no name, from a --groupBy
whose groups matched nothing say, fails before it writes anything. emr.md
says what is Floci's own reading: the grouped file's folder,
--numberFiles' naming, a group's compression without --outputCodec and
that refusal.
2026-11-01 10:10:13 -06:00
Priamo Germosen beef71e8eb fix(iam): check Application Auto Scaling requests on the scalable target they name (#7193)
Under IAM enforcement, Application Auto Scaling requests were checked on
`*`, so a grant scoped to a scalable target was refused and a deny
scoped to one never applied.

A scalable target's ARN ends in a unique id the service assigns,
`scalable-target/<id>` ("The unique ID ... is a value assigned by
Application Auto Scaling to the scalable target"), which the Service
Reference names ${ResourceId}, while requests name the target by
ServiceNamespace, ResourceId and ScalableDimension. Read as the table
reads other services, ResourceId (`service/<cluster>/<service>`) would
have filled that id, so the namespace was left out until the table could
look the ARN up.

The generator's new FOUND_BY gives a type whose ARN is all an id its
service mints, with the members a request names it by. An operation
whose request has them all names the type by them (`find`), generated
rather than corrected, and the reader asks the service for the ARN they
find through StoredResourceArns, the lookup EventBridge's connections
already use, or else checks the ARN with its id open, as for a create.
StoredResourceArns.find now takes the values a request names the
resource by, in the table's order: one name for EventBridge, the three
members for Application Auto Scaling, whose service now implements it
from the store its handlers read. A member left out or given a JSON
null names none, as the handler reads it.

Application Auto Scaling joins the table (14 operations, 1036 over 25
namespaces): RegisterScalableTarget, DeregisterScalableTarget,
PutScalingPolicy, DeleteScalingPolicy, PutScheduledAction and
DeleteScheduledAction are checked on the target's stored ARN, and a
RegisterScalableTarget registering a new one, its tags included, on
`scalable-target/*`; TagResource, UntagResource and
ListTagsForResource on the ARN their ResourceARN gives; the Describe
operations and GetPredictiveScalingForecast on `*`, as AWS checks them.
2026-11-01 10:10:02 -06:00
Priamo Germosen d39f06e733 fix(sts): read a model pattern's wide escape and mint the token size asked for (#7105)
`arnType`'s pattern ends in a five-digit escape, the U+10000 to U+10FFFF
range, where Java reads a backslash-u escape as exactly four digits and takes
the rest as literals. Compiled as the model writes it, that range became the
character U+1000, a literal zero, a hyphen, U+10FF and two literal Fs, so the
character class gained a range from `0` to U+10FF: it refused every
supplementary character the model admits and admitted the C1 controls it
excludes, U+0081 among them. Every member the shape resolves to was answered
the wrong way round: `RoleArn` on the three assume-role operations,
`PrincipalArn` on the SAML one, each entry of `PolicyArns` on those three and
on `GetFederationToken`, `TaskPolicyArn` on `AssumeRoot` and the
provided-context ARN on `AssumeRole`.

Each wide escape is read as the code point it spells now, which is what the
model means by it, written in Java's own form by one object that both
constraint checks compile their patterns through. `arnType` is the only shape
in any of the 28 vendored files carrying such an escape, so nothing else
moves, and a run of five or six digits naming no code point is left as the
model wrote it.

`MinimumSessionTokenSize` is published on six operations and was materialized
on one. `AssumeRoot` minted a token of the size asked for while the other five
minted 200 characters whatever the request sent, so the member was validated
and then ignored. All six mint their token through one writer now, which keeps
the floor at the 200 this emulator mints when a request asks for less, since
that is what a minimum asks for. `GetDelegatedAccessToken` models no such
member and keeps the 200 on its own.

`violation(String)` goes with them: wave 4 took out the three hand-written
checks that called it, and nothing has called it since.

`docs/services/sts.md` carries both readings.
2026-11-01 10:09:51 -06:00
TATSUNO “Taz” Yasuhiro d19ad3489e docs(lambda-web): list the missing platform pages and environment variable, and fix the origin port note (#7182)
* docs(lambda-web): list the 409 pages and the CannotAssumeRole page in the platform page table

* docs(lambda-web): list AWS_DEFAULT_REGION among the environment variables of the app

* docs(lambda-web): say a CloudFront origin may name the endpoint with or without its port

* docs(lambda-web): drop repeated words and move the weight split to the scaling paragraph
2026-11-01 11:32:56 -04:00
Vũ Thế Huy 24b152a274 feat(pipes): deliver to a Redshift cluster or Serverless workgroup through the Data API (#7165) 2026-11-01 11:27:14 -04:00
Felipe Melo 8499581af3 fix(elbv2): relay TCP listeners without HTTP parsing (#7044)
* fix(elbv2): relay TCP listeners without HTTP parsing

Forward raw TCP traffic and TLS passthrough to registered targets while preserving per-connection routing. Cover the data plane through AWS SDK integration tests and document dedicated-port limitations.

Refs #5870

* test(elbv2): make TCP data plane test cleanup resilient to partial failures

* refactor(elbv2): share target selection helpers between TCP and HTTP paths

Extract targetCandidates and pickRoundRobin to remove the duplicated
healthy-or-registered fallback and round-robin pick from the TCP relay
and HTTP forwarding paths, unifying both on the floorMod counter that
cannot go negative.

* fix(elbv2): honor listener tcp idle timeout and park colliding listeners

Use tcp.idle_timeout.seconds attribute dynamically in the TCP relay tunnel, and register colliding listeners on in-use ports as parked with a warning, promoting them once the active listener is removed.

* fix(elbv2): validate tcp idle timeout range and reuse timeout parser

* fix(elbv2): unify parse failure and range check in listener attribute validation
2026-11-01 09:27:31 -04:00
Vũ Thế Huy cedc1073ec feat(redshift): sign the Spectrum floci-duck transfer with the role session when S3 auth is enforced (#7162) 2026-11-01 09:26:32 -04:00
TATSUNO “Taz” Yasuhiro c8dec86997 fix(lambda-web): write the day with two digits in the date header of the platform pages (#7172)
* fix(lambda-web): write the day with two digits in the date header of the platform pages

The platform pages and the 414 write the day of their date header with
two digits on AWS, as in Sun, 01 Nov 2026. RFC_1123_DATE_TIME writes 1.

* refactor(lambda-web): write the Date header of the metadata server with platformDate
2026-11-01 09:16:47 -04:00
Jimmy Liu Jia a54ca5e0c9 fix(iam): match status validation errors for credential updates (#7174) 2026-11-01 09:12:08 -04:00
Andre KuraitandJackson Price 1ccd6d3855 fix(autoscaling): use the modeled XML namespace (#7180)
* fix(autoscaling): use the modeled XML namespace

Promote the complete retained fork #269 namespace correction and exact Query success/error/catalog assertions. Original feature by Jackson Price <jxnprice@amazon.com>, authored 2026-10-28; original source commit d094b6168031df46c708d4dce056580d7e631853 retained unchanged.

Co-authored-by: Jackson Price <jxnprice@amazon.com>

Signed-off-by: Andre Kurait <AndreKurait@gmail.com>

* test(autoscaling): share modeled namespace assertions

Share the package namespace assertion across the Query handler and integration tests. Preserve root and all-descendant checks, the returned Element, and all existing populated, empty and error response assertions.

Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
Signed-off-by: Andre Kurait <akurait@amazon.com>

---------

Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
Signed-off-by: Andre Kurait <akurait@amazon.com>
2026-11-01 09:06:38 -04:00
galsuchetzky-act b987e822be feat(bedrock): add PutResourcePolicy, GetResourcePolicy and DeleteResourcePolicy for guardrails (#7188) 2026-11-01 08:23:49 -04:00
Abhigya d2d9ed6ca2 fix(cloudfront): tunnel WebSocket upgrades to custom origins as AWS does (#7148)
* fix(cloudfront): tunnel WebSocket upgrades to custom origins as AWS does

CloudFront forwards WebSocket handshakes to the origin on every distribution, but
Floci's serving path is a JAX-RS resource that strips Upgrade and Connection and
fetches the origin with a blocking client, so a socket.io client behind a
distribution never left long-polling.

A Vert.x route ahead of JAX-RS now catches an HTTP/1.1 WebSocket handshake to a
distribution host, resolves the behavior and custom origin as the GET path does
(allowed methods, signed requests, origin request policy, origin custom headers,
private-address guard), sends the handshake with its upgrade fields and splices
the two connections once the origin answers 101. Any other answer is relayed as
an ordinary response, and handshakes the distribution would not tunnel fall
through to the existing GET handling. Handshake detection and the byte relay are
shared with the ALB data plane.

* fix(cloudfront): honor disabled service and origin timeouts on WebSocket refusals

The WebSocket route runs ahead of ServiceEnabledFilter, so it now checks that
CloudFront is enabled before taking a handshake and otherwise falls through to
the disabled-service answer.

An origin answer that refuses the upgrade is no longer piped without limits: its
body is streamed within the origin's response timeout between packets and its
response completion timeout in all, counting only the origin's time, and an
origin that stalls past them ends the viewer connection.

* test: share the ALB fixture between the WebSocket integration tests

CloudFrontWebSocketIntegrationTest repeated ElbV2WebSocketIntegrationTest's load
balancer, target group, listener and WebSocket exchange helpers. Both now use
AlbFixtures.

* refactor(cloudfront): have the WebSocket origin clock spend a shared CompletionBudget
2026-11-01 07:53:25 -04:00
Ovidiu (Ovi) f489a6f1f3 feat(ec2): support AMI block public access (#7134) 2026-11-01 07:51:55 -04:00
Andre Kurait 28bde18804 fix(appconfig): honor final bake time and restore reverted configurations (#7156) 2026-11-01 07:47:06 -04:00
Priamo Germosen e77823feed ci: push the published images with zstd -19 layers (#7159)
BuildKit compresses zstd at about level 11 at most, so the release and
nightly images now go through a composite action: the image is built
into an OCI layout, every layer is recompressed with the zstd CLI at
level 19, and a second build that only names the layout pushes it.
BuildKit keeps the recompressed layers and still attaches provenance
and the SBOM to the pushed digests.

On 2.4.0 this takes the native image from 94.6 to 70.1 MB on amd64 and
from 92.6 to 67.1 MB on arm64, and compat amd64 from 223.2 to 167.7 MB.
Pulling zstd layers needs Docker Engine 23.0 or later, so the
installation requirements move up from 20.10.

A new workflow tests the action on the pull requests that change it:
recompress.py against fixture layouts, then the whole action pushing a
two-platform image to a registry on the runner.
2026-10-31 21:38:13 -05:00
Priamo Germosen ebf91d1a8e feat(emr): keep a cluster's storage, HDFS included, across its steps (#7137)
In the docker runner mode each step of a cluster ran in a container of its
own, so nothing a step left in /home/hadoop, or in HDFS, was there for the
next, and the image has no HDFS at all: an hdfs:// path failed, and a path
without a scheme, which EMR reads as HDFS, went to the container's own
disk. The Management Guide calls HDFS "best used for caching the results produced by
intermediate job-flow steps", the prefix "hdfs:// (or no prefix)", and
"ephemeral storage that is reclaimed when you terminate a cluster"; the
Release Guide's S3DistCp page copies data "into HDFS where it can be
processed by subsequent steps".

Now a cluster's storage outlives its steps:

- each step's container mounts the cluster's two Docker volumes, one at
  /home/hadoop and one at /mnt, both of which the image gives its hadoop
  user, so Docker gives an empty volume that owner, and what the cluster's
  bootstrap left there in the image its steps run in;
- HDFS is /mnt/hdfs: Spark gets fs.defaultFS hdfs:/// and the hdfs scheme
  through Hadoop's ViewFileSystemOverloadScheme with a fallback link to
  that folder, so hdfs:// paths and those without a scheme lead there, a
  relative one under /user/hadoop, and a streaming query keeps its
  checkpoints through Spark's file system checkpoint manager, as
  FileContext refuses an hdfs:// path without a host. The cluster's
  spark-defaults can set any of these otherwise;
- a command step's hadoop fs gets the same, through a copy of the image's
  Hadoop configuration, or of the folder a spark-env export of
  HADOOP_CONF_DIR names, links followed, whose core-site.xml takes in
  the original's through Hadoop's XInclude and then those properties,
  with its HDFS, MapReduce and YARN homes set; hdfs dfs runs as hadoop
  fs, the image's hdfs command being unable to run;
- the volumes go once the cluster has ended and its last step is done,
  tried again while Docker refuses, as the bootstrap's image is; on a
  reset, a step's thread it overtook removing them again once its
  container is gone; and, for clusters that are gone or have ended, when
  the service starts, unless reconcile-containers-on-startup is off.

SparkJobRunner.Job carries the storage, which an EMR Serverless run leaves
null. ClusterStorage names, makes and removes the volumes;
EmrClusterStorage is its Docker side. A path without a scheme that a step
meant for its container's own disk now leads to HDFS, as on EMR. emr.md
says what HDFS lacks: no NameNode, no hdfs:// path with a host, no
hadoop fs -ls / and no S3 through hadoop fs.
2026-10-31 21:30:43 -05:00