/
policy-quickstart-mongodb-atlas-user.yaml
39 lines (39 loc) · 1.4 KB
/
policy-quickstart-mongodb-atlas-user.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
AWSTemplateFormatVersion: "2010-09-09"
Description: Sample role minimal IAM needed for MongoDB Atlas CFN
Resources:
RegisterTypeRole:
Type: AWS::IAM::Role
Properties:
RoleName: "MongoDB-Atlas-CloudFormation-User"
AssumeRolePolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Principal:
Service: lambda.amazonaws.com
Action: sts:AssumeRole
- Effect: Allow
Principal:
AWS: !Sub 'arn:aws:iam::${AWS::AccountId}:root'
Action: sts:AssumeRole
Path: "/"
ManagedPolicyArns:
- !Sub 'arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole'
Policies:
- PolicyName: ResourceTypePolicy
PolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Action:
# below here are added to run get-started.sh
- "cloudformation:CreateStack"
- "cloudformation:DeleteStack"
- "cloudformation:DescribeStackEvents"
- "cloudformation:DescribeStacks"
- "iam:CreateRole"
- "iam:GetRole"
- "secretsmanager:CreateSecret"
- "secretsmanager:DeleteSecret"
- "secretsmanager:TagResource"
Resource: "*"