diff template.yaml @ 4:cfd876570008

attach inline policy to function to access screts
author Dennis Concepcion Martin <dennisconcepcionmartin@gmail.com>
date Thu, 16 Sep 2021 18:03:26 +0200
parents 5c36f51105c2
children 54e71cf6e324
line wrap: on
line diff
--- a/template.yaml	Thu Sep 16 16:51:59 2021 +0200
+++ b/template.yaml	Thu Sep 16 18:03:26 2021 +0200
@@ -157,6 +157,10 @@
       CodeUri: src/
       Handler: handlers/sentiment.get_tweet_sentiment
       Runtime: python3.9
+      Policies:
+        - AWSSecretsManagerGetSecretValuePolicy:
+            SecretArn:
+              arn:aws:secretsmanager:eu-west-2:339008578167:secret:tweet-analysis-keys-gKo6DQ
       Events:
         CallGetTweetSentiment:
           Type: Api