sid88in / sid88in/serverless-appsync-plugin
serverless-plugin-split-stacks: AppSync Api not found in stack. Did you forget to deploy?
@AlexHladin is already working on this.
Since May 31, 2026.
- Dominant language
- TypeScript
- Stars
- 955
- Forks
- 187
- PR merge metrics
- No merged PRs in 30d
Description
I am getting the error AppSync Api not found in stack. Did you forget to deploy?.
Here is the environment and output.
✖ Stack tech-xxxxxx-dev failed to deploy (1353s)
Environment: darwin, node 18.13.0, framework 3.27.0 (local), plugin 6.2.3, SDK 4.3.2
Credentials: Local, "wgv-app-dev" profile
Docs: docs.serverless.com
Support: forum.serverless.com
Bugs: github.com/serverless/serverless/issuesError:
AppSync Api not found in stack. Did you forget to deploy?
I am trying to migrate from V1 of the plugin using the migration guide.
All the resources appear to deploy for a short period of time before a ROLLBACK is issued. And then they disappear. I suspect that the Rollback is initiated by the serverless framework itself since the appsync plugin throws this error.
async getApiId() {
this.loadConfig();
if (!this.naming) {
throw new this.serverless.classes.Error(
'Could not find the naming service. This should not happen.',
);
}
const logicalIdGraphQLApi = this.naming.getApiLogicalId();
const { StackResources } = await this.provider.request<
DescribeStackResourcesInput,
DescribeStackResourcesOutput
>('CloudFormation', 'describeStackResources', {
StackName: this.provider.naming.getStackName(),
LogicalResourceId: logicalIdGraphQLApi,
});
const apiId = last(StackResources?.[0]?.PhysicalResourceId?.split('/'));
if (!apiId) {
throw new this.serverless.classes.Error(
'AppSync Api not found in stack. Did you forget to deploy?',
);
}
return apiId;
}
So apiId is not found for some reason which throws an exception.
I am probably missing something in my serverless.yml or do I need to explicitly Output some CloudFormation values to fix this.
Here is the header of my serverless yml file.
appSync:
name: "${self:service}-${self:provider.stage}"
authentication:
type: AMAZON_COGNITO_USER_POOLS
config:
awsRegion: ${self:provider.region}
defaultAction: ALLOW
userPoolId:
Fn::ImportValue: ${self:custom.resources.PROJECT_PREFIX}-UserPoolId
additionalAuthentications:
- type: API_KEY
apiKeys:
- name: Default-${self:provider.stage}
description: Default-${self:provider.stage} generated by Serverless deployment
expiresAfter: 1y
apiKeyId: ${self:custom.resources.APPSYNC_API_KEY}
....
It would be very helpful if there is a working example available to compare with.
Thanks in advance.
O.,
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.