View a markdown version of this page

Troubleshooting the Parameter Store extension in AWS Systems Manager Cloud Extensions - AWS Systems Manager

Troubleshooting the Parameter Store extension in AWS Systems Manager Cloud Extensions

Find solutions to common problems with the Parameter Store extension, such as stale values, throttling, access errors, and rejected requests.

Your application reads an old value

Symptom: A parameter changed in Parameter Store, but your application still reads the old value.

The extension serves a cached value until the cache time to live (TTL) expires. Check the Cache TTL setting, and lower the value if your application needs newer values sooner:

aws cloudextensions get-profile-entry \ --profile-identifier my-application \ --identifier profile-entry-id \ --query 'effectiveSettings'

A value of 0 makes the extension check Parameter Store on every read.

The extension returns ThrottlingException errors

Symptom: Requests to the extension fail with 400 ThrottlingException.

If Parameter Store throttles the calls of the extension, raise the Cache TTL setting or use GetParameters to read several parameters in one call. If the runtime throttles the requests, the extension might be near its memory limit. Lower the Cache size setting. If your parameters are large or have long names, set the size to 3,000 or less. For Secrets Manager references of up to 64 KB, set the size to 600 or less.

A parameter that you created isn't found

Symptom: The extension reports that a parameter doesn't exist, although you created the parameter.

The extension caches a not-found result for one TTL. Wait for the TTL to expire, or lower the Cache TTL setting.

Access denied or decryption failures

Symptom: Errors when the extension retrieves a parameter, or when it retrieves a SecureString parameter.

Check that the IAM execution role allows ssm:GetParameter and ssm:GetParameters on the parameter in the Region of the runtime. For SecureString parameters, check that the role allows kms:Decrypt on the AWS Key Management Service (AWS KMS) key:

{ "Effect": "Allow", "Action": "kms:Decrypt", "Resource": "arn:aws:kms:region:account-id:key/key-id" }

For GetParameter, the extension caches access denied and unusable KMS key results for one TTL. After you fix the permissions, wait for the TTL to expire. GetParameters doesn't cache these results. It lists a SecureString whose KMS key is unusable in InvalidParameters, and it calls Parameter Store again on the next request.

You get the encrypted value of a SecureString

Symptom: The value that the extension returns for a SecureString is encrypted.

Set WithDecryption to true in the request, for example with --with-decryption in the AWS CLI.

GetParameters lists a parameter in InvalidParameters

Symptom: GetParameters returns 200 OK, but a name is in InvalidParameters instead of Parameters.

The parameter, or the version or label that you asked for, doesn't exist in the Region of the runtime or in that account. Or the KMS key of the SecureString is disabled. Check the name in the request.

The extension returns InternalFailure or a credentials error

Symptom: The extension returns 500 InternalFailure with the message Error connecting to the service, or an error such as ExpiredTokenException or UnrecognizedClientException.

The extension can't get or use its credentials. Check the IAM execution role and its trust policy. The log of the extension has the cause.

The runtime returns AccessDeniedException

Symptom: Every request fails with 400 AccessDeniedException, and the cloudextensions-error-reason header is MISSING_AUTHENTICATION or SIGNATURE_MISMATCH.

The runtime didn't accept the signature of the request. Sign the request for the service ssm with the extension key of the profile as the credentials. Check the access key ID and the secret key. If the header is missing, Parameter Store refused the role of the extension. For more information, see Access denied or decryption failures.

The runtime returns UNKNOWN_OPERATION

Symptom: The runtime returns 400 ValidationException with the reason UNKNOWN_OPERATION and the message No operation matches the request.

The request isn't a POST of GetParameter or GetParameters to the endpoint of the extension. Check the following:

  • The request names a served operation in X-Amz-Target: AmazonSSM.GetParameter or AmazonSSM.GetParameters. The extension doesn't serve other operations, such as GetParametersByPath.

  • The request is a POST to http://localhost:5333/parameterstore. The extension no longer serves the GET routes /parameterstore/parameter/value, /parameterstore/parameter, and /parameterstore/parameters.

  • The profile includes the extension.

The runtime returns BadGatewayException

Symptom: The runtime returns 502 BadGatewayException.

The extension timed out or couldn't connect to Parameter Store, and it had no cached value for the parameter. Retry the request. If the error persists, check the network path from the runtime to the Parameter Store endpoint of the Region. Also check the log of the extension for the cause.

The runtime returns ServiceUnavailable

Symptom: The runtime returns 503 ServiceUnavailable.

The extension is still loading, or it failed to load. Retry after the time in the Retry-After header, and check the log of the runtime.