From 71221ae12b2a049955ab38b837f0453162fdefa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Gessler?= <36667834+gessfred@users.noreply.github.com> Date: Sat, 13 Jan 2024 23:09:38 +0000 Subject: [PATCH] grant SES to lambda role --- aws/reporting.tf | 10 ++++++++++ reports/requirements.txt | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/aws/reporting.tf b/aws/reporting.tf index 9e6ce88..d1d1b54 100644 --- a/aws/reporting.tf +++ b/aws/reporting.tf @@ -17,6 +17,16 @@ data "aws_iam_policy_document" "reporting_lambda_policy" { actions = ["sts:AssumeRole"] } + + statement { + effect = "Allow" + + actions = [ + "ses:*" + ] + + resources = ["*"] + } } resource "aws_iam_role" "reporting_role" { diff --git a/reports/requirements.txt b/reports/requirements.txt index 168f2ae..a4f3ae8 100644 --- a/reports/requirements.txt +++ b/reports/requirements.txt @@ -3,4 +3,5 @@ kaleido pandas==2.0.3 sqlalchemy boto3==1.34.18 -requests==2.31.0 \ No newline at end of file +requests==2.31.0 +psycopg2-binary \ No newline at end of file