For support requests please search or create posts on Serverless Forum: https://forum.serverless.com
carlosandrebp on master
upload email icon (compare)
carlosandrebp on master
Icons update (compare)
carlosandrebp on master
updates animations (compare)
andrepiresbp on master
Updates (compare)
andrepiresbp on master
Update (compare)
gsb19
Anyone here with https://fnproject.io/ experience? I would like to know if it's worth my time and effort. Thanks
hi~ I got this error on any sls command, like sls config
"Your AWS credential for deployment profile default is configured to use the IAM role arn:aws:iam::1234567:role/amplify-asd-dev-130043-authRole, but access to that role was denied by IAM. - Please contact support and provide this identifier to reference this issue"
but this role is used by aws-cognito, does someone has any idea??
Configuration warning at 'functions.seo.events[0]': unsupported function event
functions:
seo:
handler: handler.main
events:
- preExistingCloudFront:
distributionId: [scrubbed]
eventType: origin-response
pathPattern: "*"
includeBody: false
plugins:
- serverless-lambda-edge-pre-existing-cloudfront
Hi,
I have a graphql API with authorizer configured. This works fine offline but when deployed to AWS, Authorizer is getting triggered but not getting redirected back to Service. I am getting the below response. (In AWS, i have given Admin access too). Please let me know if i am missed anything.
Response - 500
{
"message": null
}
Serverless.yml
functions:
authorize:
handler: handlers/authHandler.authenticate
graphql:
handler: handlers/graphqlHandler.handler
events:
- http:
path: graphql
method: post
cors: true
authorizer: authorize
Auth Handler
module.exports.authenticate = (event, context, callback) => {
context.callbackWaitsForEmptyEventLoop = false;
const token = event.authorizationToken;
try {
// Verify JWT
const decoded = jwt.verify(token, process.env.JWT_SECRET);
const user = decoded.user;
const effect = "Allow";
const userId = user.username || user.email;
const authorizerContext = { user: JSON.stringify(user) };
// Return an IAM policy document for the current endpoint
const policyDocument = utils.buildIAMPolicy(
userId,
effect,
event.methodArn,
authorizerContext
);
callback(null, policyDocument);
} catch (e) {
callback("Unauthorized"); // Return a 401 Unauthorized response
}
};