Skip to content

Commit 788bad4

Browse files
committed
Document budget shutdown SNS permissions
1 parent 502f192 commit 788bad4

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

deploy/terraform-lambda/README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,48 @@ Ensure Docker is installed and running: https://docs.docker.com/engine/install/
5656
9. Select **Command Line Interface (CLI)** → acknowledge → **Create**
5757
10. **Copy both the Access Key ID and Secret Access Key** (secret is shown only once!)
5858

59+
#### Add SNS permissions for the budget shutdown guardrail
60+
61+
The `$50` budget shutdown path uses AWS Budgets → SNS → Lambda. The deploy user therefore needs permission to create and manage the SNS topic named `aavaaz-lambda-budget-shutdown`.
62+
63+
In the AWS Console:
64+
65+
1. Go to **IAM****Users****aavaaz-deploy**.
66+
2. Open the **Permissions** tab.
67+
3. Click **Add permissions****Create inline policy**.
68+
4. Open the **JSON** tab and paste:
69+
70+
```json
71+
{
72+
"Version": "2012-10-17",
73+
"Statement": [
74+
{
75+
"Sid": "AllowAavaazBudgetShutdownSns",
76+
"Effect": "Allow",
77+
"Action": [
78+
"sns:CreateTopic",
79+
"sns:DeleteTopic",
80+
"sns:GetTopicAttributes",
81+
"sns:SetTopicAttributes",
82+
"sns:ListTagsForResource",
83+
"sns:TagResource",
84+
"sns:UntagResource",
85+
"sns:Subscribe",
86+
"sns:Unsubscribe",
87+
"sns:Publish"
88+
],
89+
"Resource": "arn:aws:sns:us-east-1:000152811496:aavaaz-lambda-budget-shutdown"
90+
}
91+
]
92+
}
93+
```
94+
95+
5. Click **Next**.
96+
6. Name the policy `AavaazBudgetShutdownSNS`.
97+
7. Click **Create policy**.
98+
99+
If the IAM console refuses the resource-scoped policy before the SNS topic exists, temporarily set `"Resource": "*"`, deploy once, and then narrow it back to the topic ARN above.
100+
59101
#### Configure the CLI
60102

61103
```bash

0 commit comments

Comments
 (0)