I have a function that is added to amplify data like this:
export const data = defineData({
schema,
functions: {
"function-send-sms": sendSMSFunction,
},
authorizationModes: {
defaultAuthorizationMode: "apiKey",
apiKeyAuthorizationMode: {
expiresInDays: 30,
},
},
});
I want to trigger this function in my custom pipeline resolver like this:
.handler([
a.handler.custom({
dataSource: "function-send-sms",
entry: "./resolver/send-sms.js",
}),
a.handler.custom({
dataSource: a.ref("DoSomeOtherThings"),
entry: "./resolver/do-some-other-things.js",
}),
])
It says that data source "function-send-sms" is not found. Do you know how to fix this? Thank you very much.
This is the error log message:
Resource handler returned message: "No data source found named function-send-sms (Service: AppSync, Status Code: 404,