You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If applicable, what version of Node.js are you using?
16.16.0
Amplify CLI Version
12.10.1
What operating system are you using?
Windows
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
Not relevant changes for this issue
Describe the bug
After following this AWS guide on how to connect graphql through AWS Appsync with AWS DynamoDB, I ran into an issue with deploying the custom resource to AWS Amplify.
The goal is to create a new query in the schema.grapqhl file of the amplify backend/api folder, then to add a JS resolver that will fetch some data from DDB. While the general workflow did work, loading the JS resolver from a file does not.
Creating the custom resource worked fine, however, when I tried to add a JS resolver to my custom query the build errored on finding a file during the deployment:
🛑 The following resources failed to deploy:
Resource Name: APIJsResolver13C5C4E9 (AWS::AppSync::Resolver)
Event Type: create
Reason: Resource handler returned message: "Error occurr
ed during operation 'Error reading CodeS3Location from S
3. Error message: The specified bucket does not exist (S
ervice: S3, Status Code: 404, Request ID: 772EK6TY7DN4VG
DH, Extended Request ID: QRGdqUIXJfkx/vjbPcOwsx01gaCmeLj
K5caYgQ4ErOlfTus/nKTnOx0bTr8gL2iusFBCvZzvkXY=)'." (Reque
stToken: 1cef193e-2404-4ad2-0f55-4eb6d33dd796, HandlerErrorCode: GeneralServiceException)
The js file is located in the custom resource folder, and I have verified that it was added to the build folder created during the deployment (in the local build folder). Folder structure:
Hey @Dennis-Dekker, thank you for reaching out. Assets are currently not supported in Amplify custom category, please refer to a similar issue #9055 where the behavior is currently being tracked.
As a workaround the code will need to be added as inline.
Closing the issue as duplicate.
Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
16.16.0
Amplify CLI Version
12.10.1
What operating system are you using?
Windows
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
Not relevant changes for this issue
Describe the bug
After following this AWS guide on how to connect graphql through AWS Appsync with AWS DynamoDB, I ran into an issue with deploying the custom resource to AWS Amplify.
The goal is to create a new query in the schema.grapqhl file of the amplify backend/api folder, then to add a JS resolver that will fetch some data from DDB. While the general workflow did work, loading the JS resolver from a file does not.
Creating the custom resource worked fine, however, when I tried to add a JS resolver to my custom query the build errored on finding a file during the deployment:
The js file is located in the custom resource folder, and I have verified that it was added to the build folder created during the deployment (in the local build folder). Folder structure:
amplify:
backend:
custom:
jsResolvers:
build
resolvers:
testJsResolver.js:
cdk-stack.js
jsResolvers-cloudformation-template.json
resolvers:
testJsResolver.js:
.npmrc (not changed)
cdk-stack.ts (see code below under "Additional information")
package.json (not changed)
tsconfig.json (only added
"allowJs": true
)The build only fails if I add the code with the Code.fromAsset function rom aws-cdk-lib/aws-appsync, it works if I use the Code.fromInLine function.
Expected behavior
CDK should resolve the file reference.
Reproduction steps
amplify add custom
to create cdk resourceProject Identifier
e146314c59d34bb77745c891be2e93d1
Log output
Additional information
Before submitting, please confirm:
The text was updated successfully, but these errors were encountered: