Troubleshooting Cloud Extensions
This page lists the errors a service with cloudExtensions can meet, with their causes and fixes. For how the feature works, see Cloud Extensions.
A deploy error from AWS appears as a CloudFormation failure, followed by a hint from the Framework. Errors the Framework finds itself stop the deploy before CloudFormation. Errors in reads appear in the function, from the AWS SDK, after the function starts.
REQUIRED_CAPABILITY_REQUIRES_APPROVAL or UNKNOWN_CAPABILITY
Resource handler returned message: "Invalid request Response body: {"errors":[{"semanticError":{"item":"approve","problem":"REQUIRED_CAPABILITY_REQUIRES_APPROVAL","value":"parameterStoreRead"}}],"reason":"FIELD_VALIDATION_FAILED"} ...
Add parameterStoreRead to provider.cloudExtensions['aws:parameterstore'].approve, or remove approve to have the Framework approve required capabilities.
An approve list misses a capability the extension requires, or names one it doesn't have (UNKNOWN_CAPABILITY). Add or remove the named capability, or remove approve. The hint names the key that sets approve: provider.cloudExtensions['…'] or functions.<name>.cloudExtensions['…']. When a function's list replaces one that provider also sets for the extension, removing the function's list brings back the provider's, so the hint only asks to correct the function's list.
Without approve, the Framework approved the capabilities it read for the entry's version at package time, and the hint asks for a list of your own instead:
Set provider.cloudExtensions['aws:parameterstore'].approve to the capabilities aws:parameterstore requires, including parameterStoreRead.
For UNKNOWN_CAPABILITY without approve, the hint reads <capability> is not a capability of <extension>. Set <path>.approve to the capabilities <extension> requires.
Cloud Extensions lists no release of ... that matches version ...
Cloud Extensions lists no release of aws:parameterstore that matches version 1.2. Set provider.cloudExtensions['aws:parameterstore'].version to a released version or a range that includes one.
At package time, the Framework lists the releases of the extension that match version, and none matches. AWS refuses a range that matches no released version, such as 1.2 or 1.2.x while only 1.0.0 is released, even though later releases could match it. Set version to a released version, or to a range that includes one, such as 1.x.x. To list the released versions, run aws cloudextensions list-extension-versions --identifier aws:parameterstore. When no version is set and the extension has no release at all, the message reads Cloud Extensions lists no release of <extension>. List the capabilities in <path>.approve. See Choose the extension version.
Cloud Extensions lists no extension ... in ...
Cloud Extensions lists no extension aws:parameterstor in us-east-1. Check the extension ID in provider.cloudExtensions['aws:parameterstor']: "aws cloudextensions list-extensions" lists the available ones.
The extension ID under cloudExtensions names no extension in the deployment Region, often because of a typo. Correct the ID; aws cloudextensions list-extensions --region us-east-1 lists the extensions of a Region.
Resource cannot be found with "resourceType":"ExtensionVersion"
Resource handler returned message: "Resource cannot be found Response body: {"identifier":"1.2","resourceType":"ExtensionVersion"} (Service: CloudExtensions; Operation: UpdateProfileEntry; Status Code: 404; Error Code: ResourceNotFoundException; ...)" ...
No release of aws:parameterstore matches version 1.2. Set provider.cloudExtensions['aws:parameterstore'].version to a released version or a range that includes one.
CloudFormation sent a version that matches no released version of the extension. The Framework checks a string version at package time, so this error comes from a version it didn't check, such as one set with a CloudFormation intrinsic, one in an artifact packaged earlier and deployed with serverless deploy --package, or one whose package-time check was skipped because the deploying identity can't list the extension's releases. Set version to a released version, or to a range that includes one. The Framework adds the hint only for a version written as a string; for one set with an intrinsic, AWS's message shows the version it received.
... .version must be a string
provider.cloudExtensions['aws:parameterstore'].version must be a string. Quote the version as you wrote it, such as version: '1.10'.
An unquoted version that looks like a number is a number to YAML, which drops trailing zeros: version: 1.10 arrives as 1.1, and version: 1.0 as 1, both different selectors. Put quotes around the version exactly as written in serverless.yml, such as version: '1.10' or version: '1.0'. For a version that is neither a string nor a number, the message reads ... .version must be a string, such as '1.x.x' or '1.2.3'.
... .version is set with a CloudFormation intrinsic
provider.cloudExtensions['aws:parameterstore'].version is set with a CloudFormation intrinsic, so the Framework can't read at package time which capabilities that version requires. List them in provider.cloudExtensions['aws:parameterstore'].approve, or set the version as a string.
An entry without approve gets the capabilities its version requires, which the Framework reads at package time. A version set with Ref, Fn::ImportValue or another intrinsic is only known at deploy. List the capabilities in approve, or write the version as a string such as '1.x.x'. See Approve capabilities.
"constraint":"type(integer)" on a setting
Resource handler returned message: "Invalid request Response body: {"errors":[{"fieldConstraint":{"constraint":"type(integer)","field":"settings.ttlSeconds","value":"30"}}],"reason":"FIELD_VALIDATION_FAILED"} ...
CloudFormation sent settings.ttlSeconds to Cloud Extensions as a string. Remove the setting to use the extension's default, or set it with the AWS CLI until AWS accepts it through CloudFormation.
A number or boolean setting can't be set through CloudFormation. See Setting types through CloudFormation.
"constraint":"required" on settings.security or settings.security.ssrfToken
An entry of the Secrets Manager extension without settings stops with AWS's error for the whole settings.security group:
Resource handler returned message: "Invalid request Response body: {"errors":[{"fieldConstraint":{"constraint":"required","field":"settings.security"}}],"reason":"FIELD_VALIDATION_FAILED"} (Service: CloudExtensions; Operation: UpdateProfileEntry; Status Code: 400; Error Code: ValidationException; ...)" ...
Set provider.cloudExtensions['aws:secretsmanager'].settings.security.ssrfToken. The SDK path doesn't use it; it guards Secrets Manager's raw HTTP routes.
An entry with settings.security but no token names the token. This entry also set ssrfHeadersEnabled: false, so the CLI prints one hint line per error:
Resource handler returned message: "Invalid request Response body: {"errors":[{"fieldConstraint":{"constraint":"type(boolean)","field":"settings.security.ssrfHeadersEnabled","value":"false"}},{"fieldConstraint":{"constraint":"required","field":"settings.security.ssrfToken"}}],"reason":"FIELD_VALIDATION_FAILED"} (Service: CloudExtensions; Operation: CreateProfileEntry; Status Code: 400; Error Code: ValidationException; ...)"
CloudFormation sent settings.security.ssrfHeadersEnabled to Cloud Extensions as a string. Remove the setting to use the extension's default, or set it with the AWS CLI until AWS accepts it through CloudFormation.
Set provider.cloudExtensions['aws:secretsmanager'].settings.security.ssrfToken. The SDK path doesn't use it; it guards Secrets Manager's raw HTTP routes.
The Secrets Manager extension requires settings.security.ssrfToken. Set the token, and remove ssrfHeadersEnabled, which CloudFormation can't send as a boolean. See The Secrets Manager SSRF token.
ConflictException for a profile name
Resource handler returned message: "Conflicting request Response body: {"conflict":{"duplicateValue":{"conflictsWith":"...","field":"name","value":"myapp-dev"}}} ...
A Cloud Extensions profile named myapp-dev already exists in this account and Region, made by hand or by another service. Deploy under another service or stage name, attach it with cloudExtensions.profile: myapp-dev if it is meant to be shared, or delete it once nothing uses it.
Profile names are unique per account and Region, and another service whose name and stage normalize alike gets the same profile name. Functions can be using the other profile, so deploy under another service or stage name, attach it with profile when it is meant to be shared, or delete it only once no function uses it.
ServiceQuotaExceededException: Service limit reached
Resource handler returned message: "Service limit reached Response body: {"resourceId":"...","resourceType":"Account"} (Service: CloudExtensions; Operation: CreateProfile; Status Code: 402; Error Code: ServiceQuotaExceededException; ...)
AWS allows 25 Cloud Extensions profiles per account and Region, and this service adds 3. Functions with the same cloudExtensions share a profile: give more functions the same set, attach an existing profile with cloudExtensions.profile, or deploy to another account or Region.
The account and Region hold AWS's maximum of profiles. See Profiles and the 25-profile limit.
FunctionError.ExtensionInitError on a function with a capacity provider
... failed to stabilize since it is in Failed state due to FunctionError.ExtensionInitError(The function failed to initialize due to an extension error. Check the function logs for detailed error information.) ...
The Cloud Extensions runtime doesn't start on Lambda Managed Instances yet. Set functions.api.cloudExtensions: false, or run the function without a capacity provider.
As of December 2026, Lambda Managed Instances don't accept the event registration the Cloud Extensions runtime makes, so a function with a capacityProvider doesn't initialize. Set cloudExtensions: false on the function. See Managed Instances.
...environment.AWS_CLOUDEXTENSIONS_PROFILE names ..., but cloudExtensions attaches ...
functions.api.environment.AWS_CLOUDEXTENSIONS_PROFILE names platform-shared, but cloudExtensions attaches myapp-dev. Remove the variable, or attach platform-shared with cloudExtensions.profile: platform-shared.
Remove the variable: the Framework sets it (The AWS_CLOUDEXTENSIONS_PROFILE variable).
... now uses profile ..., which isn't deployed yet
functions.recommendations.cloudExtensions now uses profile myapp-dev-recommendations, which isn't deployed yet. Run "serverless deploy": "deploy function" doesn't create profiles.
serverless deploy function found that the function's extensions now make a set with a profile the stack doesn't hold yet, for example after an extension was added to or dropped from the function. deploy function changes only the function, so it stops before the function points at that profile. Run serverless deploy. See Deploy a single function.
To tell a profile not deployed yet from one deleted outside the stack, deploy function reads the stack's resources, which takes cloudformation:ListStackResources. Without that permission, a deleted profile also gets this message. If serverless deploy doesn't make the message go away, the profile was likely deleted outside the stack: follow ... uses profile ..., which the stack created but which no longer exists.
... uses profile ..., which the stack created but which no longer exists
functions.api.cloudExtensions uses profile myapp-dev, which the stack created but which no longer exists, perhaps deleted outside the stack. "serverless deploy" alone doesn't recreate it: remove the extensions that use it and run "serverless deploy", then restore them and run "serverless deploy" again.
serverless deploy function found that the stack lists the function's profile, but the profile is gone, as after aws cloudextensions delete-profile. CloudFormation keeps its record of the deleted profile, so serverless deploy, with or without --force, doesn't create it again. To recreate the profile:
- Remove the extensions that use the profile from
serverless.yml:provider.cloudExtensionsfor the profile<service>-<stage>, or the function's owncloudExtensionsfor a profile named after a function. Runserverless deploy. The stack drops its record of the profile; until the next step, the functions on it run without those extensions. - Restore the extensions and run
serverless deployagain. The stack creates the profile and its entries again, under the same name.
... names ..., which doesn't exist in ... for an attached profile
For a profile attached with profile, serverless deploy function names that key:
functions.report.cloudExtensions.profile names platform-shared, which doesn't exist in us-east-1. Create the profile first, or attach one that exists.
The profile named in profile doesn't exist in the deployment account and Region. The Framework doesn't create a profile it attaches: create the profile, or attach one that exists. See Attach an existing profile.
... attaches the function to ... for the first time. Run "serverless deploy" ...
functions.api.cloudExtensions attaches the function to profile myapp-dev for the first time. Run "serverless deploy", with which the function's role gets cloudextensions:SyncState.
serverless deploy function changes only the function's code and configuration. For a function that doesn't use Cloud Extensions yet, it stops before the update when the attachment needs more than that: a role the Framework manages, which needs cloudextensions:SyncState added, or an environment that holds a CloudFormation intrinsic, which deploy function doesn't apply, so the function wouldn't get AWS_CLOUDEXTENSIONS_PROFILE. Run serverless deploy once; afterwards deploy function updates the function as usual. See Deploy a single function.
functions.<name> has 5 layers, the Lambda limit, ...
functions.api has 5 layers, the Lambda limit, and Cloud Extensions adds its runtime as a layer. Remove a layer or set functions.api.cloudExtensions: false.
Lambda allows five layers per function, and the runtime takes one.
Cloud Extensions has no runtime layer for ... in ...
Cloud Extensions has no runtime layer for arm64 in eu-south-2: the public parameter /aws/service/aws-cloudextensions/lambda-layer-arm64 doesn't exist there.
Deploy to a Region where Cloud Extensions is available.
... runs on ..., but ... lists the Cloud Extensions runtime layer for ...
functions.api runs on arm64, but functions.api.layers lists the Cloud Extensions runtime layer for x86_64. List the arm64 runtime layer in functions.api.layers, or remove the x86_64 one to have the Framework add the layer for arm64.
A function's layers, its own or provider.layers, list the runtime layer only for the other architecture. Runtime layer versions are numbered separately per architecture, so the Framework doesn't replace a listed version. List the runtime layer for the function's architecture, or remove the listed one and let the Framework add the current layer.
... sets profile and extensions together or ... lists extensions, but provider.cloudExtensions attaches the existing profile ...
provider.cloudExtensions sets profile and extensions together. Use profile to attach a profile that already exists, or list extensions to have the Framework create one.
profile excludes extension IDs at the same level and, on provider, in every function. See Attach an existing profile.
... is not an extension ID
provider.cloudExtensions.iam is not an extension ID. Extension IDs contain a colon, such as aws:parameterstore, and profile is the only other key. Check the indentation of provider.cloudExtensions.
A key under cloudExtensions is neither profile nor an extension ID, often a block such as iam: or settings: indented one level too far, so it sits beside the extension IDs instead of inside one. Indent it under its extension ID, or remove it. See provider.cloudExtensions.
Extensions ... and ... of profile ... both get the CloudFormation logical ID ...
Extensions acme:my-ext and acme:my_ext of profile myapp-dev both get the CloudFormation logical ID CloudExtensionsAcmeMyExtEntry, so one would replace the other. Use only one of them in the same profile.
The Framework names each entry's CloudFormation resource after its extension ID without punctuation, so two IDs that differ only in -, _ or : get the same name. Keep one of the two extensions in the set, or move one to a function with its own cloudExtensions, which makes another profile.
Across profiles, the name also starts with the function that owns the profile, so an extension of one profile and an extension of a function's profile can get the same name:
Extension team:acme-reader of profile myapp-dev and extension acme:reader of profile myapp-dev-team both get the CloudFormation logical ID CloudExtensionsTeamAcmeReaderEntry, so one would replace the other. Rename function team, or use only one of the two extensions.
Rename the function, or keep only one of the two extensions.
functions.<name> runs on Lambda@Edge, which takes no layers or environment variables
functions.edge runs on Lambda@Edge, which takes no layers or environment variables. Remove functions.edge.cloudExtensions, or move the code to a function without a cloudFront event.
A function with a cloudFront event sets cloudExtensions to a value other than false. Lambda@Edge functions never get extensions; the provider's extensions skip them. Remove the function's cloudExtensions, or set it to false, or move the reads to a function without a cloudFront event. See Turn extensions off for a function.
The role for cloudExtensions['...'] on profile ... must trust ... different custom roles, ...
The role for cloudExtensions['aws:parameterstore'] on profile myapp-dev must trust 40 different custom roles, more than an IAM trust policy holds. For functions ...: remove role to use the Framework's role, let them share one role, or move some to another profile.
See Who can assume an extension role.
The CloudFormation template is invalid: Circular dependency between resources: [...]
The CloudFormation template is invalid: Circular dependency between resources: [CloudExtensionsAwsParameterstoreRole, ReaderRole, ...]
When the list names an extension role, that role trusts the functions' roles (form 2 or 3), and one of them is a role in resources without RoleName, so the trust policy names it through Fn::GetAtt. That role depends on the profile, usually through a policy that names one of the profile's functions, and each of those functions waits for the profile. CloudFormation reports the cycle before it changes the stack. Set RoleName on the custom role in the list. See Who can assume an extension role.
The runtime's credentials aren't allowed to retrieve its profile
BadGatewayException: The runtime's credentials aren't allowed to retrieve its profile. Check the role the runtime runs as.
The function's role lacks cloudextensions:SyncState. The runtime also logs initial profile retrieval failed with not authorized to perform: cloudextensions:SyncState. See The SyncState permission on function roles.
The runtime's profile doesn't exist
BadGatewayException: The runtime's profile doesn't exist. Check the profile the runtime is configured with.
AWS_CLOUDEXTENSIONS_PROFILE names a profile that doesn't exist in the function's account and Region. The runtime logs initial profile retrieval failed with ResourceNotFoundException and the profile name. Causes:
serverless deploy functiondeployed the function after a change to its extensions without checking its profile, as Framework versions without that check do. Runserverless deploy, which creates the profile. With the check,deploy functionstops instead with... now uses profile ..., which isn't deployed yet.- The profile was deleted outside the stack, for example with the AWS CLI.
serverless deployalone doesn't recreate it; follow the two deploys in... uses profile ..., which the stack created but which no longer exists.
serverless info shows such a profile as not readable (ResourceNotFoundException).
The runtime couldn't retrieve its profile
BadGatewayException: The runtime couldn't retrieve its profile. The runtime will retry.
The runtime can't reach cloudextensions.<region>.api.aws. The runtime logs initial profile retrieval failed with the cause:
cannot connect to cloudextensions.<region>.api.aws: the function has no network route to the endpoint, as in a VPC without a NAT gateway or VPC endpoint. See Functions in a VPC.TLS failed: certificate signed by unknown authority, inserverless invoke local --docker: a proxy on your machine or network inspects TLS traffic, and the container doesn't trust the proxy's certificate authority. Mount the authority's certificate file into the container and point the runtime at it:serverless invoke local --docker --function api --docker-arg="-v /path/to/proxy-ca.crt:/tmp/proxy-ca.crt:ro" --env SSL_CERT_FILE=/tmp/proxy-ca.crt.
Error connecting to the service
InternalFailure: Error connecting to the service
The extension couldn't call AWS for the read. The runtime's log line for the read names the cause, often that the extension role can't be assumed: is not authorized to perform: sts:AssumeRole on resource: .... Two common cases:
- In
serverless invoke local --docker, reads run with your local credentials, and an extension role the Framework creates trusts only the service's Lambda functions. See Run functions locally. - The function attaches a profile another service owns, whose extension roles don't trust this function. See Attach an existing profile.
Reads end in Status: timeout
REPORT RequestId: ... Duration: 6000.00 ms ... Status: timeout
When the runtime answers a read with an error such as BadGatewayException, the AWS SDK retries the read, and the retries can take 5 to 8 seconds, longer than the Framework's default function timeout of 6 seconds. The first symptom is then a timeout without an error message. Look in the function's log for the runtime's initial profile retrieval failed line, written when the execution environment starts, which names the cause, and find the matching entry on this page.
Reads can't connect to localhost:5333
The runtime isn't in the execution environment: a container image without the runtime (Container image functions), or a local run (Run functions locally).