Commit Graph
21 Commits
Author SHA1 Message Date
Aniket Shukla f24cab1622 fix(ssm): resolve parameter ARNs in public reads (#6713) 2026-10-27 00:00:36 -04:00
Jimmy Liu Jia 51ce672218 feat(ssm): expose ECS optimized AL2023 AMI parameters (#6583) 2026-10-25 23:31:48 -04:00
Jimmy Liu Jia bcae24f5fc feat(ssm): match parameter path label filters (#6560)
* feat(ssm): match parameter path label filters

* fix(ssm): match labeled version metadata in path filters
2026-10-25 17:29:17 -04:00
Aniket Shukla efc693ad17 fix(ssm): include parameter ARNs in describe metadata (#6289) 2026-10-22 19:39:16 -04:00
Aniket Shukla a9ceee1de6 fix(ssm): honor path parameter type filters (#6183)
* fix(ssm): honor path parameter type filters

Forward GetParametersByPath Type filters through the existing parameter-filter validation and matching rules. Retain path, recursion, region and public AMI selection, and document the remaining filter and pagination limitations.

* fix(ssm): validate path filter keys and apply key ids

Reject missing and action-invalid filter keys before selecting path results. Reuse the existing Type and KeyId matcher, and validate Label options while keeping label matching a documented gap.

Verify 264 focused SSM tests, Checkstyle, 95 docs tests, docs checks, and the partition gate. Regression tests fail before the fix and detect an inverted key allowlist.

* fix(ssm): reuse canonical invalid filter option errors

Share the existing AWS InvalidFilterOption message between DescribeParameters and Label path filters. Assert the complete HTTP message for invalid KeyId and Label options.

Verify 264 focused SSM tests, three CI-failing Lambda/SQS tests, Checkstyle, docs checks, 95 docs tests, and the partition gate. The two Label message assertions fail before the fix.
2026-10-22 17:06:23 -04:00
Mario Toffia 89317831bb feat(ssm): publish parameter change events (#5262)
* feat(ssm): publish parameter change events

After a successful PutParameter, DeleteParameter, DeleteParameters,
LabelParameterVersion or UnlabelParameterVersion, SsmService publishes the
AWS-shaped aws.ssm "Parameter Store Change" event to the default EventBridge
bus, with the parameter ARN in resources. A label event carries the type and
description of the labelled version; an unlabel event lists the labels it
removed. Every event is published after the service lock is released. Failed
calls publish nothing, and a delivery failure is logged without failing or
undoing the write. CloudFormation managed parameters go through SsmService and
publish the same events.

* test(cloudformation): move CfnStackWaits into testing

CfnStackWaits was package-private in the CloudFormation tests, so the SSM
event integration test polled DescribeStacks for CREATE_COMPLETE itself.
It now lives in testing with a public API, and that test waits through
CfnStackWaits.awaitStatus and builds its CloudFormation requests with
CfnRequests.cfn instead of a private copy.

* refactor(eventbridge): build service event entries in one place

The ECS, Step Functions, Redshift Data, CodePipeline, SES and SSM publishers
each built the same Source, DetailType, Detail and Resources entry.
EventBridgeService.serviceEventEntry builds it, with Resources always
present and empty for a null or blank resource ARN. Each publisher still
calls putEvents with its own region and account. The explicit default
EventBusName and the Region that repeated putEvents' region argument are
gone; putEvents fills both the same way.
2026-10-21 07:07:39 -04:00
Mario Toffia c145fa104c fix(ssm): normalize parameter resource ARNs (#5261)
* fix(ssm): normalize parameter resource ARNs

A parameter's ARN is now arn:<partition>:ssm:<region>:<account>:parameter/<name
without leading slash> for both top-level names and paths, matching AWS. Before,
a top-level name such as foo got parameterfoo.

SsmService.parameterResource(name) is the single formula, used by PutParameter
and by the AWS::SSM::Parameter provisioner, so the CloudFormation Arn attribute
equals the GetParameter ARN.

Tag operations and the internal getParameter(nameOrArn, region) read resolve an
ARN to the stored name and, for parameter/x when only x is stored, fall back to x,
so a top-level parameter is found by its ARN, also with a :version or :label
selector. ECS task secrets pass valueFrom to
that read whole instead of stripping only ":parameter". Legacy parameterfoo ARNs
still resolve.

* test(cloudformation): share the CloudFormation Query request builder

Six CloudFormation integration tests each carried a private copy of the
same Query request builder, as cfn or request. CfnRequests.cfn in testing
replaces them, as RdsRequests.rds does for RDS. A null stack name leaves
StackName out, which the ContinueUpdateRollback validation test needs.
2026-10-19 09:46:50 -04:00
David Phillips 356c79e78e fix(ssm): parse and bound command delivery timeouts (#5908)
* fix(ssm): limit public command delivery time

* docs(ssm): describe command delivery timeouts

* fix(ssm): deserialize delivery timeouts before checking bounds

Handle numeric delivery timeouts consistently without bypassing limits.

* fix(ssm): report member-specific deserialization errors

Name the expected scalar type and explain malformed structures.

* refactor(ssm): keep delivery timeout errors consistent
2026-10-18 11:03:48 -04:00
David Phillips 23edd58992 fix(ssm): separate shell execution and delivery timeouts (#5865)
* fix(ssm): separate shell execution and delivery timeouts

* fix(ssm): require a command list for public shell requests

* test(ssm): share command request and cleanup fixtures
2026-10-17 13:43:37 -04:00
David Phillips d4158b954b fix(ssm): retain command ownership during background execution (#5841)
* fix(ssm): retain command ownership during background execution

* fix(ssm): keep agent fallback messages within their owner

* test(ssm): share region-scoped authorization fixtures
2026-10-16 22:34:08 -04:00
Ovidiu (Ovi) 4f34a903fc feat(ssm): support UnlabelParameterVersion (#5339)
* feat(ssm): support UnlabelParameterVersion

Remove one or more labels from a parameter version. Labels attached to
the version are returned in RemovedLabels; labels that are not on that
version, including ones attached to a different version, are returned in
InvalidLabels and left in place. A missing parameter is ParameterNotFound,
a missing version ParameterVersionNotFound, and an omitted ParameterVersion
or an empty or oversized label list a ValidationException.

* fix(ssm): match AWS errors and ordering in UnlabelParameterVersion

Verified against real AWS (us-east-1):

- Report every missing or invalid member in one ValidationException, in
  the order name, parameterVersion, labels, and render the label list
  the way AWS does ('[prod, ]').
- Reject a string or boolean ParameterVersion and a non-string Name or
  label with SerializationException; truncate a fractional version and
  clamp one outside the range of a long, as AWS does.
- Reject an ARN, a malformed or ssm-prefixed name, and deny an
  aws-prefixed one before the lookup; ignore surrounding whitespace in
  the lookup but echo the name as sent in error messages.
- Word ParameterVersionNotFound as AWS does.
- Return RemovedLabels in the order the labels are stored on the
  version, and InvalidLabels in request order.

LabelParameterVersion shares the label-list parsing, so its label
validation messages and non-string labels now match AWS too.

* fix(ssm): take the service monitor when deleting parameters

PutParameter, LabelParameterVersion and UnlabelParameterVersion already
run under the SsmService monitor, but DeleteParameter and
DeleteParameters did not. A delete landing between a label or unlabel
call's lookup and its history write left orphaned history that a later
PutParameter of the same name appended to.

Also pin LabelParameterVersion's AWS-verified label validation messages
and its SerializationException for a non-string label in its own
integration test, and share the parameter-name format rule between the
two reserved-name messages.
2026-10-09 13:11:29 -04:00
Mario Toffia 86c4904bcc fix(ssm): resolve Secrets Manager references in GetParameter (#4581)
* fix(ssm): resolve Secrets Manager references in GetParameter

GetParameter and GetParameters now answer
/aws/reference/secretsmanager/<secret-id>[:<version-id-or-label>] from
Secrets Manager, with the checks, error texts and response fields
measured against AWS: WithDecryption must be true, a missing secret is
ParameterNotFound, and GetParameters lists a reference it cannot answer
in InvalidParameters. ECS task secrets and CodeBuild parameter-store
variables read through the same path; a CloudFormation
AWS::SSM::Parameter::Value<String> parameter still refuses one, as on AWS.

* fix(ssm): check secretsmanager:GetSecretValue on a Secrets Manager reference

AWS reads /aws/reference/secretsmanager/ with the caller's own
secretsmanager:GetSecretValue, checked before the secret is looked up.
With IAM enforcement on, a caller allowed only ssm:GetParameter now gets
the ValidationException AWS sends, and GetParameters fails as a whole.

* fix(ssm): authorize a Secrets Manager reference on the secret's ARN

A grant on a secret's exact ARN, which CDK grantRead and a CloudFormation
Ref produce, did not match the suffix-less name ARN, so an allowed caller
was refused. The check now uses the secret's ARN and falls back to the
name only when the secret does not exist.

* fix(ssm): check a Secrets Manager reference's value on the secret it came from

The value is read by name after the check, so a secret force-deleted and
recreated in between was returned on the old secret's grant. The ARN of
the secret actually read is now checked too.

* fix(ssm): read a Secrets Manager reference's value from the secret it described

* docs(ssm): note the partial-ARN fallback a Secrets Manager reference read leaves

* fix(ssm): return SourceResult on a Secrets Manager reference

* fix(ssm): reject a malformed Secrets Manager reference before checking IAM

* chore(ssm): sort SsmService imports
2026-09-29 14:57:11 -04:00
Vũ Thế Huy 5ae46c2bd3 fix(ssm): support parameter selectors in GetParameter and align LabelParameterVersion with AWS (#4461)
* fix(ssm): support name:version and name:label selectors in GetParameter

- Support name:version and name:label selectors in GetParameter and GetParameters
- Resolve selector against parameter history copies without mutating stored parameters
- Validate labels in LabelParameterVersion per AWS spec (reject numeric and reserved labels)
- Return invalid labels in InvalidLabels response
- Synchronize labelParameterVersion and clone history entries to handle concurrent updates without in-place mutation
- Enforce 10-label maximum limit per parameter version
- Default to latest version only when ParameterVersion is omitted
- Guard against NPE and trailing colons in getParameter selector lookup

Closes #4396

* fix(ssm): enforce label validation constraints in LabelParameterVersion

- Reject empty labels and labels exceeding 100 characters with ValidationException
- Reject empty label lists and lists with more than 10 labels with ValidationException
- Update findSelectedVersion comment to reflect that labels are unique across versions
2026-09-28 21:07:46 -04:00
Simone Primarosa 188542e67f feat(ssm): seed the EKS optimized AMI parameter paths (#4191) 2026-09-23 12:00:12 -04:00
Matheus André f77cf4da77 fix(ec2,ssm): explain missing IMDS registration for SSM-only managed instances (#3283) 2026-09-09 00:26:30 -05:00
lex00 8142457f9b feat(ssm): answer the public Amazon Linux AMI parameters (#3173)
* feat(ssm): answer AWS's public Amazon Linux AMI parameters

GetParameter, GetParameters and GetParametersByPath resolve the
documented /aws/service/ami-amazon-linux-latest/ names from the EC2
image catalog, the way AWS seeds them in every account. They are
read-only and belong to no account, so DescribeParameters and the
parameter history leave them out.

Ported from the SSM half of lex00/floci#116.

* fix(ssm): reject reserved parameter names and list public ones under ancestors

PutParameter refuses names prefixed with aws or ssm, with or without a
leading slash and in any case, with the ValidationException AWS
returns. That closes the gap where a stored value could shadow a
public AMI parameter. GetParametersByPath applies the same path and
Recursive rules to public names as to stored ones, so a recursive
query on /aws or /aws/service lists them.

* fix(ssm): reserve only the aws and ssm path segments

The reserved-name check keyed on a bare prefix, which also refused the
names CloudFormation generates for an AWS::SSM::Parameter in a stack
whose name starts with aws or ssm. It now rejects a name whose first
path segment is aws or ssm, with or without a leading slash and in any
case, and accepts names such as ssm-auto-stack-Param-ABC.
2026-09-07 17:05:19 -04:00
Hector Ventura be9e61d788 feat(ssm): add DescribePatchBaselines and GetDefaultPatchBaseline (#1404)
Return AWS-owned predefined patch baselines (one default per operating system) so Terraform's aws_ssm_patch_baseline data source resolves. Supports DescribePatchBaselines filters OWNER/OPERATING_SYSTEM/NAME_PREFIX and GetDefaultPatchBaseline. Read-only reference data; no customer-owned baselines.

Refs #956
2026-06-17 00:41:24 -05:00
Jason van Zyl 660a8bceb3 feat(ssm): execute run commands in EC2 containers (#1387) 2026-06-16 22:51:21 -05:00
Hector Ventura 9e35046647 Docs/enviroment instead yml (#764)
* docs: moving all config to env instead of yml
* docs: sync with main and new features
* docs: reverting docker-compose.yml
2026-05-10 11:53:31 -05:00
TiM a32b7f1f3b docs: comprehensive audit sweep + CHANGELOG backfill (1.1.0-1.5.2) (#326)
CHANGELOG.md was empty for the 1.1.0-1.5.2 release cycle and service docs
had drifted from code behaviour. This sweep reconciles docs against the
current codebase on upstream/main.

- Backfill CHANGELOG.md for 1.1.0 through 1.5.2 from git history
- Correct exact operation counts in docs/services/index.md: S3 (~30 -> 58),
  Lambda (~25 -> 30), API Gateway v1 (~24 -> 62). Counts now come from the
  actual dispatch handlers rather than @Path annotation counts.
- Rewrite README "Supported Services" table to drop per-service op counts
  (they drift too fast); point readers at docs/services/index.md
- Update 24 service docs for accuracy, add "Not Implemented" sections
  where relevant (s3.md, lambda.md, api-gateway.md)
- Refresh configuration and getting-started docs
- Add EventBridge Scheduler and AppConfig to mkdocs nav
- Add AppConfig / AppConfigData rows to README and services index
  following the 1.5.2 upstream release
2026-04-10 10:52:34 -05:00
Hector Ventura 61433f59ab firt commit 2026-03-15 17:43:56 -05:00