{"record":{"id":"ba908e00c7ddb74c","repo":"dagger/dagger","slug":"parameter-not-found-q","errorCode":null,"errorMessage":"parameter not found: %q","messagePattern":"parameter not found: %q","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"engine/client/secretprovider/aws.go","lineNumber":246,"sourceCode":"\t\treturn []byte{}, nil\n\tdefault:\n\t\t// For numbers, booleans, and nested objects, return JSON representation\n\t\tjsonValue, err := json.Marshal(v)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to marshal field value: %w\", err)\n\t\t}\n\t\treturn jsonValue, nil\n\t}\n}\n\nfunc mapAWSError(err error, name, resourceType string) error {\n\tvar apiErr smithy.APIError\n\tif errors.As(err, &apiErr) {\n\t\tswitch apiErr.ErrorCode() {\n\t\tcase \"ResourceNotFoundException\":\n\t\t\treturn fmt.Errorf(\"secret not found: %q\", name)\n\t\tcase \"ParameterNotFound\":\n\t\t\treturn fmt.Errorf(\"parameter not found: %q\", name)\n\t\tcase \"AccessDeniedException\":\n\t\t\treturn fmt.Errorf(\"access denied to %s %q: check IAM permissions\", resourceType, name)\n\t\tcase \"DecryptionFailure\":\n\t\t\treturn fmt.Errorf(\"failed to decrypt %s %q: check KMS permissions\", resourceType, name)\n\t\tcase \"InvalidRequestException\":\n\t\t\treturn fmt.Errorf(\"invalid request for %s %q: %s\", resourceType, name, apiErr.ErrorMessage())\n\t\t}\n\t}\n\treturn fmt.Errorf(\"failed to retrieve %s %q: %w\", resourceType, name, err)\n}\n","sourceCodeStart":228,"sourceCodeEnd":257,"githubUrl":"https://github.com/dagger/dagger/blob/82ba2681dbe30d3547a1dc50ea495900ab5b6047/engine/client/secretprovider/aws.go#L228-L257","documentation":"AWS SSM returned ParameterNotFound for GetParameter, remapped by mapAWSError into a clear message. Unlike secrets manager, this code is unambiguous: no parameter with that exact name (including the leading slash) exists for this identity/region.","triggerScenarios":"GetParameter called with a name that does not exist in the current region/account, missing the leading '/', wrong case, or a hierarchical path referenced as if it were a leaf parameter.","commonSituations":"Parameter exists in another region or account; forgot the /app/env/ prefix convention; parameter created only in other environments (dev vs prod); deleted by IaC drift; typo in name.","solutions":["List actual names: `aws ssm describe-parameters --filters Key=Name,Option=BeginsWith,Values=/app`","Fix the name — it must match exactly including the leading slash and case","Verify region/account configuration matches where the parameter was created","Check IaC (Terraform/CDK) actually created the parameter in this environment","Confirm the path is a parameter, not just a hierarchy prefix (GetParameter does not resolve paths; use GetParametersByPath semantics instead)"],"exampleFix":"// before\nsecret://aws-ssm/app/db-password\n// after\nsecret://aws-ssm/prod/app/db-password","handlingStrategy":"retry","validationCode":"func parameterExists(ctx context.Context, c *ssm.Client, name string) error {\n  _, err := c.GetParameter(ctx, &ssm.GetParameterInput{Name: aws.String(name), WithDecryption: aws.Bool(false)})\n  return err\n}\n// call at startup; ParameterNotFound here means fix config before proceeding","typeGuard":null,"tryCatchPattern":"val, err := client.Secret(ctx, \"aws-ssm\", paramName, \"\")\nif err != nil {\n  if strings.Contains(err.Error(), \"parameter not found\") {\n    if av, e2 := client.Secret(ctx, \"aws-ssm\", \"/defaults\"+paramName, \"\"); e2 == nil {\n      return av, nil\n    }\n    return nil, fmt.Errorf(\"missing required parameter %s (checked region %s)\", paramName, region)\n  }\n  return nil, err\n}","preventionTips":["Include the leading '/' and exact case in parameter names","Adopt a naming convention (/env/app/key) and validate references against it","Deploy parameters to every environment your app runs in via IaC","Log the region and account ID alongside not-found errors to spot env mismatches fast","Remember GetParameter needs exact names — path prefixes are not resolved"],"tags":["aws","ssm","parameter-store","not-found","config"],"backgroundTag":"parameter-not-found","analyzedSha":"82ba2681dbe30d3547a1dc50ea495900ab5b6047","analyzedAt":"2026-09-05T07:21:37.930Z","contentChangedAt":"2026-09-05T07:21:37.930Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}