Skip to content

Commit

Permalink
grant permissions to trigger lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
aerlaut committed Jul 12, 2022
1 parent 0d37a34 commit 66f5ae9
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ exports.up = async (knex) => {
throw new Error('Environment variables AWS_REGION and AWS_ACCOUNT_ID are required');
}

await knex.raw(`
GRANT USAGE ON SCHEMA aws_lambda TO api_role;
GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA aws_lambda TO api_role;
`);

await knex.raw(createDeleteSampleFileTriggerFunc(process.env.NODE_ENV));
};

Expand Down

0 comments on commit 66f5ae9

Please sign in to comment.