@friggframework/devtools 2.0.0--canary.398.ad248a6.1 → 2.0.0--canary.397.5f65dbd.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/frigg-cli/build-command/index.js +2 -4
  2. package/frigg-cli/deploy-command/index.js +2 -5
  3. package/frigg-cli/index.js +1 -11
  4. package/infrastructure/create-frigg-infrastructure.js +2 -10
  5. package/infrastructure/serverless-template.js +27 -606
  6. package/package.json +5 -9
  7. package/test/index.js +2 -4
  8. package/test/mock-integration.js +4 -14
  9. package/frigg-cli/generate-iam-command.js +0 -115
  10. package/infrastructure/AWS-DISCOVERY-TROUBLESHOOTING.md +0 -245
  11. package/infrastructure/AWS-IAM-CREDENTIAL-NEEDS.md +0 -594
  12. package/infrastructure/DEPLOYMENT-INSTRUCTIONS.md +0 -268
  13. package/infrastructure/GENERATE-IAM-DOCS.md +0 -253
  14. package/infrastructure/IAM-POLICY-TEMPLATES.md +0 -175
  15. package/infrastructure/README-TESTING.md +0 -332
  16. package/infrastructure/WEBSOCKET-CONFIGURATION.md +0 -105
  17. package/infrastructure/__tests__/fixtures/mock-aws-resources.js +0 -391
  18. package/infrastructure/__tests__/helpers/test-utils.js +0 -277
  19. package/infrastructure/aws-discovery.js +0 -568
  20. package/infrastructure/aws-discovery.test.js +0 -373
  21. package/infrastructure/build-time-discovery.js +0 -206
  22. package/infrastructure/build-time-discovery.test.js +0 -375
  23. package/infrastructure/frigg-deployment-iam-stack.yaml +0 -377
  24. package/infrastructure/iam-generator.js +0 -696
  25. package/infrastructure/iam-generator.test.js +0 -169
  26. package/infrastructure/iam-policy-basic.json +0 -210
  27. package/infrastructure/iam-policy-full.json +0 -280
  28. package/infrastructure/integration.test.js +0 -383
  29. package/infrastructure/run-discovery.js +0 -110
  30. package/infrastructure/serverless-template.test.js +0 -498
  31. package/test/auther-definition-tester.js +0 -125
@@ -1,169 +0,0 @@
1
- const { generateIAMCloudFormation, getFeatureSummary } = require('./iam-generator');
2
-
3
- describe('IAM Generator', () => {
4
- describe('getFeatureSummary', () => {
5
- it('should detect all features when enabled', () => {
6
- const appDefinition = {
7
- name: 'test-app',
8
- integrations: ['Integration1', 'Integration2'],
9
- vpc: { enable: true },
10
- encryption: { useDefaultKMSForFieldLevelEncryption: true },
11
- ssm: { enable: true },
12
- websockets: { enable: true }
13
- };
14
-
15
- const summary = getFeatureSummary(appDefinition);
16
-
17
- expect(summary.appName).toBe('test-app');
18
- expect(summary.integrationCount).toBe(2);
19
- expect(summary.features.core).toBe(true);
20
- expect(summary.features.vpc).toBe(true);
21
- expect(summary.features.kms).toBe(true);
22
- expect(summary.features.ssm).toBe(true);
23
- expect(summary.features.websockets).toBe(true);
24
- });
25
-
26
- it('should detect minimal features when disabled', () => {
27
- const appDefinition = {
28
- integrations: []
29
- };
30
-
31
- const summary = getFeatureSummary(appDefinition);
32
-
33
- expect(summary.appName).toBe('Unnamed Frigg App');
34
- expect(summary.integrationCount).toBe(0);
35
- expect(summary.features.core).toBe(true);
36
- expect(summary.features.vpc).toBe(false);
37
- expect(summary.features.kms).toBe(false);
38
- expect(summary.features.ssm).toBe(false);
39
- expect(summary.features.websockets).toBe(false);
40
- });
41
- });
42
-
43
- describe('generateIAMCloudFormation', () => {
44
- it('should generate valid CloudFormation YAML', () => {
45
- const appDefinition = {
46
- name: 'test-app',
47
- integrations: [],
48
- vpc: { enable: false },
49
- encryption: { useDefaultKMSForFieldLevelEncryption: false },
50
- ssm: { enable: false },
51
- websockets: { enable: false }
52
- };
53
-
54
- const yaml = generateIAMCloudFormation(appDefinition);
55
-
56
- expect(yaml).toContain('AWSTemplateFormatVersion');
57
- expect(yaml).toContain('FriggDeploymentUser');
58
- expect(yaml).toContain('FriggCoreDeploymentPolicy');
59
- expect(yaml).toContain('FriggDiscoveryPolicy');
60
- });
61
-
62
- it('should include VPC policy when VPC is enabled', () => {
63
- const appDefinition = {
64
- name: 'test-app',
65
- integrations: [],
66
- vpc: { enable: true }
67
- };
68
-
69
- const yaml = generateIAMCloudFormation(appDefinition);
70
-
71
- expect(yaml).toContain('FriggVPCPolicy');
72
- expect(yaml).toContain('CreateVPCPermissions');
73
- expect(yaml).toContain('EnableVPCSupport');
74
- });
75
-
76
- it('should include KMS policy when encryption is enabled', () => {
77
- const appDefinition = {
78
- name: 'test-app',
79
- integrations: [],
80
- encryption: { useDefaultKMSForFieldLevelEncryption: true }
81
- };
82
-
83
- const yaml = generateIAMCloudFormation(appDefinition);
84
-
85
- expect(yaml).toContain('FriggKMSPolicy');
86
- expect(yaml).toContain('CreateKMSPermissions');
87
- expect(yaml).toContain('EnableKMSSupport');
88
- });
89
-
90
- it('should include SSM policy when SSM is enabled', () => {
91
- const appDefinition = {
92
- name: 'test-app',
93
- integrations: [],
94
- ssm: { enable: true }
95
- };
96
-
97
- const yaml = generateIAMCloudFormation(appDefinition);
98
-
99
- expect(yaml).toContain('FriggSSMPolicy');
100
- expect(yaml).toContain('CreateSSMPermissions');
101
- expect(yaml).toContain('EnableSSMSupport');
102
- });
103
-
104
- it('should set correct default parameter values based on features', () => {
105
- const appDefinition = {
106
- name: 'test-app',
107
- integrations: [],
108
- vpc: { enable: true },
109
- encryption: { useDefaultKMSForFieldLevelEncryption: false },
110
- ssm: { enable: true }
111
- };
112
-
113
- const yaml = generateIAMCloudFormation(appDefinition);
114
-
115
- // Check parameter defaults match the enabled features
116
- expect(yaml).toContain('Default: true'); // VPC enabled
117
- expect(yaml).toContain('Default: false'); // KMS disabled
118
- // SSM should be true
119
- });
120
-
121
- it('should include all core permissions', () => {
122
- const appDefinition = {
123
- name: 'test-app',
124
- integrations: []
125
- };
126
-
127
- const yaml = generateIAMCloudFormation(appDefinition);
128
-
129
- // Check for core permissions
130
- expect(yaml).toContain('cloudformation:CreateStack');
131
- expect(yaml).toContain('cloudformation:ListStackResources');
132
- expect(yaml).toContain('lambda:CreateFunction');
133
- expect(yaml).toContain('iam:CreateRole');
134
- expect(yaml).toContain('s3:CreateBucket');
135
- expect(yaml).toContain('sqs:CreateQueue');
136
- expect(yaml).toContain('sns:CreateTopic');
137
- expect(yaml).toContain('logs:CreateLogGroup');
138
- expect(yaml).toContain('apigateway:POST');
139
- expect(yaml).toContain('lambda:ListVersionsByFunction');
140
- expect(yaml).toContain('iam:ListPolicyVersions');
141
- });
142
-
143
- it('should include internal-error-queue pattern in SQS resources', () => {
144
- const appDefinition = {
145
- name: 'test-app',
146
- integrations: []
147
- };
148
-
149
- const yaml = generateIAMCloudFormation(appDefinition);
150
-
151
- expect(yaml).toContain('internal-error-queue-*');
152
- });
153
-
154
- it('should generate outputs section', () => {
155
- const appDefinition = {
156
- name: 'test-app',
157
- integrations: []
158
- };
159
-
160
- const yaml = generateIAMCloudFormation(appDefinition);
161
-
162
- expect(yaml).toContain('Outputs:');
163
- expect(yaml).toContain('DeploymentUserArn:');
164
- expect(yaml).toContain('AccessKeyId:');
165
- expect(yaml).toContain('SecretAccessKeyCommand:');
166
- expect(yaml).toContain('CredentialsSecretArn:');
167
- });
168
- });
169
- });
@@ -1,210 +0,0 @@
1
- {
2
- "Version": "2012-10-17",
3
- "Statement": [
4
- {
5
- "Sid": "AWSDiscoveryPermissions",
6
- "Effect": "Allow",
7
- "Action": [
8
- "sts:GetCallerIdentity",
9
- "ec2:DescribeVpcs",
10
- "ec2:DescribeSubnets",
11
- "ec2:DescribeSecurityGroups",
12
- "ec2:DescribeRouteTables",
13
- "kms:ListKeys",
14
- "kms:DescribeKey"
15
- ],
16
- "Resource": "*"
17
- },
18
- {
19
- "Sid": "CloudFormationFriggStacks",
20
- "Effect": "Allow",
21
- "Action": [
22
- "cloudformation:CreateStack",
23
- "cloudformation:UpdateStack",
24
- "cloudformation:DeleteStack",
25
- "cloudformation:DescribeStacks",
26
- "cloudformation:DescribeStackEvents",
27
- "cloudformation:DescribeStackResources",
28
- "cloudformation:DescribeStackResource",
29
- "cloudformation:ListStackResources",
30
- "cloudformation:GetTemplate",
31
- "cloudformation:ValidateTemplate",
32
- "cloudformation:DescribeChangeSet",
33
- "cloudformation:CreateChangeSet",
34
- "cloudformation:DeleteChangeSet",
35
- "cloudformation:ExecuteChangeSet"
36
- ],
37
- "Resource": [
38
- "arn:aws:cloudformation:*:*:stack/*frigg*/*"
39
- ]
40
- },
41
- {
42
- "Sid": "S3DeploymentBucket",
43
- "Effect": "Allow",
44
- "Action": [
45
- "s3:CreateBucket",
46
- "s3:PutObject",
47
- "s3:GetObject",
48
- "s3:DeleteObject",
49
- "s3:PutBucketPolicy",
50
- "s3:PutBucketVersioning",
51
- "s3:PutBucketPublicAccessBlock",
52
- "s3:GetBucketLocation",
53
- "s3:ListBucket"
54
- ],
55
- "Resource": [
56
- "arn:aws:s3:::*serverless*",
57
- "arn:aws:s3:::*serverless*/*"
58
- ]
59
- },
60
- {
61
- "Sid": "LambdaFriggFunctions",
62
- "Effect": "Allow",
63
- "Action": [
64
- "lambda:CreateFunction",
65
- "lambda:UpdateFunctionCode",
66
- "lambda:UpdateFunctionConfiguration",
67
- "lambda:DeleteFunction",
68
- "lambda:GetFunction",
69
- "lambda:ListFunctions",
70
- "lambda:PublishVersion",
71
- "lambda:CreateAlias",
72
- "lambda:UpdateAlias",
73
- "lambda:DeleteAlias",
74
- "lambda:GetAlias",
75
- "lambda:AddPermission",
76
- "lambda:RemovePermission",
77
- "lambda:GetPolicy",
78
- "lambda:PutProvisionedConcurrencyConfig",
79
- "lambda:DeleteProvisionedConcurrencyConfig",
80
- "lambda:PutConcurrency",
81
- "lambda:DeleteConcurrency",
82
- "lambda:TagResource",
83
- "lambda:UntagResource",
84
- "lambda:ListVersionsByFunction"
85
- ],
86
- "Resource": [
87
- "arn:aws:lambda:*:*:function:*frigg*"
88
- ]
89
- },
90
- {
91
- "Sid": "FriggLambdaEventSourceMapping",
92
- "Effect": "Allow",
93
- "Action": [
94
- "lambda:CreateEventSourceMapping",
95
- "lambda:DeleteEventSourceMapping",
96
- "lambda:GetEventSourceMapping",
97
- "lambda:UpdateEventSourceMapping",
98
- "lambda:ListEventSourceMappings"
99
- ],
100
- "Resource": [
101
- "arn:aws:lambda:*:*:event-source-mapping:*"
102
- ]
103
- },
104
- {
105
- "Sid": "IAMRolesForFriggLambda",
106
- "Effect": "Allow",
107
- "Action": [
108
- "iam:CreateRole",
109
- "iam:DeleteRole",
110
- "iam:GetRole",
111
- "iam:PassRole",
112
- "iam:PutRolePolicy",
113
- "iam:DeleteRolePolicy",
114
- "iam:GetRolePolicy",
115
- "iam:AttachRolePolicy",
116
- "iam:DetachRolePolicy",
117
- "iam:TagRole",
118
- "iam:UntagRole"
119
- ],
120
- "Resource": [
121
- "arn:aws:iam::*:role/*frigg*",
122
- "arn:aws:iam::*:role/*frigg*LambdaRole*"
123
- ]
124
- },
125
- {
126
- "Sid": "IAMPolicyVersionPermissions",
127
- "Effect": "Allow",
128
- "Action": [
129
- "iam:ListPolicyVersions"
130
- ],
131
- "Resource": [
132
- "arn:aws:iam::*:policy/*"
133
- ]
134
- },
135
- {
136
- "Sid": "FriggMessagingServices",
137
- "Effect": "Allow",
138
- "Action": [
139
- "sqs:CreateQueue",
140
- "sqs:DeleteQueue",
141
- "sqs:GetQueueAttributes",
142
- "sqs:SetQueueAttributes",
143
- "sqs:GetQueueUrl",
144
- "sqs:TagQueue",
145
- "sqs:UntagQueue"
146
- ],
147
- "Resource": [
148
- "arn:aws:sqs:*:*:*frigg*",
149
- "arn:aws:sqs:*:*:internal-error-queue-*"
150
- ]
151
- },
152
- {
153
- "Sid": "FriggSNSTopics",
154
- "Effect": "Allow",
155
- "Action": [
156
- "sns:CreateTopic",
157
- "sns:DeleteTopic",
158
- "sns:GetTopicAttributes",
159
- "sns:SetTopicAttributes",
160
- "sns:Subscribe",
161
- "sns:Unsubscribe",
162
- "sns:ListSubscriptionsByTopic",
163
- "sns:TagResource",
164
- "sns:UntagResource"
165
- ],
166
- "Resource": [
167
- "arn:aws:sns:*:*:*frigg*"
168
- ]
169
- },
170
- {
171
- "Sid": "FriggMonitoringAndLogs",
172
- "Effect": "Allow",
173
- "Action": [
174
- "cloudwatch:PutMetricAlarm",
175
- "cloudwatch:DeleteAlarms",
176
- "cloudwatch:DescribeAlarms",
177
- "logs:CreateLogGroup",
178
- "logs:CreateLogStream",
179
- "logs:DeleteLogGroup",
180
- "logs:DescribeLogGroups",
181
- "logs:DescribeLogStreams",
182
- "logs:FilterLogEvents",
183
- "logs:PutLogEvents",
184
- "logs:PutRetentionPolicy"
185
- ],
186
- "Resource": [
187
- "arn:aws:logs:*:*:log-group:/aws/lambda/*frigg*",
188
- "arn:aws:logs:*:*:log-group:/aws/lambda/*frigg*:*",
189
- "arn:aws:cloudwatch:*:*:alarm:*frigg*"
190
- ]
191
- },
192
- {
193
- "Sid": "FriggAPIGateway",
194
- "Effect": "Allow",
195
- "Action": [
196
- "apigateway:POST",
197
- "apigateway:PUT",
198
- "apigateway:DELETE",
199
- "apigateway:GET",
200
- "apigateway:PATCH"
201
- ],
202
- "Resource": [
203
- "arn:aws:apigateway:*::/restapis",
204
- "arn:aws:apigateway:*::/restapis/*",
205
- "arn:aws:apigateway:*::/domainnames",
206
- "arn:aws:apigateway:*::/domainnames/*"
207
- ]
208
- }
209
- ]
210
- }
@@ -1,280 +0,0 @@
1
- {
2
- "Version": "2012-10-17",
3
- "Statement": [
4
- {
5
- "Sid": "AWSDiscoveryPermissions",
6
- "Effect": "Allow",
7
- "Action": [
8
- "sts:GetCallerIdentity",
9
- "ec2:DescribeVpcs",
10
- "ec2:DescribeSubnets",
11
- "ec2:DescribeSecurityGroups",
12
- "ec2:DescribeRouteTables",
13
- "kms:ListKeys",
14
- "kms:DescribeKey"
15
- ],
16
- "Resource": "*"
17
- },
18
- {
19
- "Sid": "CloudFormationFriggStacks",
20
- "Effect": "Allow",
21
- "Action": [
22
- "cloudformation:CreateStack",
23
- "cloudformation:UpdateStack",
24
- "cloudformation:DeleteStack",
25
- "cloudformation:DescribeStacks",
26
- "cloudformation:DescribeStackEvents",
27
- "cloudformation:DescribeStackResources",
28
- "cloudformation:DescribeStackResource",
29
- "cloudformation:ListStackResources",
30
- "cloudformation:GetTemplate",
31
- "cloudformation:ValidateTemplate",
32
- "cloudformation:DescribeChangeSet",
33
- "cloudformation:CreateChangeSet",
34
- "cloudformation:DeleteChangeSet",
35
- "cloudformation:ExecuteChangeSet"
36
- ],
37
- "Resource": [
38
- "arn:aws:cloudformation:*:*:stack/*frigg*/*"
39
- ]
40
- },
41
- {
42
- "Sid": "S3DeploymentBucket",
43
- "Effect": "Allow",
44
- "Action": [
45
- "s3:CreateBucket",
46
- "s3:PutObject",
47
- "s3:GetObject",
48
- "s3:DeleteObject",
49
- "s3:PutBucketPolicy",
50
- "s3:PutBucketVersioning",
51
- "s3:PutBucketPublicAccessBlock",
52
- "s3:GetBucketLocation",
53
- "s3:ListBucket"
54
- ],
55
- "Resource": [
56
- "arn:aws:s3:::*serverless*",
57
- "arn:aws:s3:::*serverless*/*"
58
- ]
59
- },
60
- {
61
- "Sid": "LambdaFriggFunctions",
62
- "Effect": "Allow",
63
- "Action": [
64
- "lambda:CreateFunction",
65
- "lambda:UpdateFunctionCode",
66
- "lambda:UpdateFunctionConfiguration",
67
- "lambda:DeleteFunction",
68
- "lambda:GetFunction",
69
- "lambda:ListFunctions",
70
- "lambda:PublishVersion",
71
- "lambda:CreateAlias",
72
- "lambda:UpdateAlias",
73
- "lambda:DeleteAlias",
74
- "lambda:GetAlias",
75
- "lambda:AddPermission",
76
- "lambda:RemovePermission",
77
- "lambda:GetPolicy",
78
- "lambda:PutProvisionedConcurrencyConfig",
79
- "lambda:DeleteProvisionedConcurrencyConfig",
80
- "lambda:PutConcurrency",
81
- "lambda:DeleteConcurrency",
82
- "lambda:TagResource",
83
- "lambda:UntagResource",
84
- "lambda:ListVersionsByFunction"
85
- ],
86
- "Resource": [
87
- "arn:aws:lambda:*:*:function:*frigg*"
88
- ]
89
- },
90
- {
91
- "Sid": "FriggLambdaEventSourceMapping",
92
- "Effect": "Allow",
93
- "Action": [
94
- "lambda:CreateEventSourceMapping",
95
- "lambda:DeleteEventSourceMapping",
96
- "lambda:GetEventSourceMapping",
97
- "lambda:UpdateEventSourceMapping",
98
- "lambda:ListEventSourceMappings"
99
- ],
100
- "Resource": [
101
- "arn:aws:lambda:*:*:event-source-mapping:*"
102
- ]
103
- },
104
- {
105
- "Sid": "IAMRolesForFriggLambda",
106
- "Effect": "Allow",
107
- "Action": [
108
- "iam:CreateRole",
109
- "iam:DeleteRole",
110
- "iam:GetRole",
111
- "iam:PassRole",
112
- "iam:PutRolePolicy",
113
- "iam:DeleteRolePolicy",
114
- "iam:GetRolePolicy",
115
- "iam:AttachRolePolicy",
116
- "iam:DetachRolePolicy",
117
- "iam:TagRole",
118
- "iam:UntagRole"
119
- ],
120
- "Resource": [
121
- "arn:aws:iam::*:role/*frigg*",
122
- "arn:aws:iam::*:role/*frigg*LambdaRole*"
123
- ]
124
- },
125
- {
126
- "Sid": "IAMPolicyVersionPermissions",
127
- "Effect": "Allow",
128
- "Action": [
129
- "iam:ListPolicyVersions"
130
- ],
131
- "Resource": [
132
- "arn:aws:iam::*:policy/*"
133
- ]
134
- },
135
- {
136
- "Sid": "FriggMessagingServices",
137
- "Effect": "Allow",
138
- "Action": [
139
- "sqs:CreateQueue",
140
- "sqs:DeleteQueue",
141
- "sqs:GetQueueAttributes",
142
- "sqs:SetQueueAttributes",
143
- "sqs:GetQueueUrl",
144
- "sqs:TagQueue",
145
- "sqs:UntagQueue"
146
- ],
147
- "Resource": [
148
- "arn:aws:sqs:*:*:*frigg*",
149
- "arn:aws:sqs:*:*:internal-error-queue-*"
150
- ]
151
- },
152
- {
153
- "Sid": "FriggSNSTopics",
154
- "Effect": "Allow",
155
- "Action": [
156
- "sns:CreateTopic",
157
- "sns:DeleteTopic",
158
- "sns:GetTopicAttributes",
159
- "sns:SetTopicAttributes",
160
- "sns:Subscribe",
161
- "sns:Unsubscribe",
162
- "sns:ListSubscriptionsByTopic",
163
- "sns:TagResource",
164
- "sns:UntagResource"
165
- ],
166
- "Resource": [
167
- "arn:aws:sns:*:*:*frigg*"
168
- ]
169
- },
170
- {
171
- "Sid": "FriggMonitoringAndLogs",
172
- "Effect": "Allow",
173
- "Action": [
174
- "cloudwatch:PutMetricAlarm",
175
- "cloudwatch:DeleteAlarms",
176
- "cloudwatch:DescribeAlarms",
177
- "logs:CreateLogGroup",
178
- "logs:CreateLogStream",
179
- "logs:DeleteLogGroup",
180
- "logs:DescribeLogGroups",
181
- "logs:DescribeLogStreams",
182
- "logs:FilterLogEvents",
183
- "logs:PutLogEvents",
184
- "logs:PutRetentionPolicy"
185
- ],
186
- "Resource": [
187
- "arn:aws:logs:*:*:log-group:/aws/lambda/*frigg*",
188
- "arn:aws:logs:*:*:log-group:/aws/lambda/*frigg*:*",
189
- "arn:aws:cloudwatch:*:*:alarm:*frigg*"
190
- ]
191
- },
192
- {
193
- "Sid": "FriggAPIGateway",
194
- "Effect": "Allow",
195
- "Action": [
196
- "apigateway:POST",
197
- "apigateway:PUT",
198
- "apigateway:DELETE",
199
- "apigateway:GET",
200
- "apigateway:PATCH"
201
- ],
202
- "Resource": [
203
- "arn:aws:apigateway:*::/restapis",
204
- "arn:aws:apigateway:*::/restapis/*",
205
- "arn:aws:apigateway:*::/domainnames",
206
- "arn:aws:apigateway:*::/domainnames/*"
207
- ]
208
- },
209
- {
210
- "Sid": "FriggVPCDeploymentPermissions",
211
- "Effect": "Allow",
212
- "Action": [
213
- "ec2:CreateVpcEndpoint",
214
- "ec2:DeleteVpcEndpoint",
215
- "ec2:DescribeVpcEndpoints",
216
- "ec2:ModifyVpcEndpoint",
217
- "ec2:CreateNatGateway",
218
- "ec2:DeleteNatGateway",
219
- "ec2:DescribeNatGateways",
220
- "ec2:AllocateAddress",
221
- "ec2:ReleaseAddress",
222
- "ec2:DescribeAddresses",
223
- "ec2:CreateRouteTable",
224
- "ec2:DeleteRouteTable",
225
- "ec2:DescribeRouteTables",
226
- "ec2:CreateRoute",
227
- "ec2:DeleteRoute",
228
- "ec2:AssociateRouteTable",
229
- "ec2:DisassociateRouteTable",
230
- "ec2:CreateSecurityGroup",
231
- "ec2:DeleteSecurityGroup",
232
- "ec2:AuthorizeSecurityGroupEgress",
233
- "ec2:AuthorizeSecurityGroupIngress",
234
- "ec2:RevokeSecurityGroupEgress",
235
- "ec2:RevokeSecurityGroupIngress",
236
- "ec2:CreateTags",
237
- "ec2:DeleteTags",
238
- "ec2:DescribeTags"
239
- ],
240
- "Resource": "*",
241
- "Condition": {
242
- "StringLike": {
243
- "aws:RequestTag/Name": "*frigg*"
244
- }
245
- }
246
- },
247
- {
248
- "Sid": "FriggKMSEncryptionPermissions",
249
- "Effect": "Allow",
250
- "Action": [
251
- "kms:GenerateDataKey",
252
- "kms:Decrypt"
253
- ],
254
- "Resource": [
255
- "arn:aws:kms:*:*:key/*"
256
- ],
257
- "Condition": {
258
- "StringEquals": {
259
- "kms:ViaService": [
260
- "lambda.*.amazonaws.com",
261
- "s3.*.amazonaws.com"
262
- ]
263
- }
264
- }
265
- },
266
- {
267
- "Sid": "FriggSSMParameterAccess",
268
- "Effect": "Allow",
269
- "Action": [
270
- "ssm:GetParameter",
271
- "ssm:GetParameters",
272
- "ssm:GetParametersByPath"
273
- ],
274
- "Resource": [
275
- "arn:aws:ssm:*:*:parameter/*frigg*",
276
- "arn:aws:ssm:*:*:parameter/*frigg*/*"
277
- ]
278
- }
279
- ]
280
- }