File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ type awsIamJSONPolicyStatement
3232 action : [String ] @search (by : [hash ])
3333 condition : [awsIamJSONPolicyCondition ]
3434 effect : String @search (by : [hash , regexp ])
35+ sid : String @search (by : [hash , regexp ])
3536 principal : [awsIamJSONPolicyPrincipal ]
3637 resource : [String ] @search (by : [hash ])
3738 notAction : [String ] @search (by : [hash ])
Original file line number Diff line number Diff line change @@ -154,10 +154,15 @@ export default ({
154154 )
155155 }
156156
157+ const functionName = arn . split ( ':' ) . pop ( )
158+ const functionPolicy = formatIamJsonPolicy ( policy )
159+ const policyStatementIds = functionPolicy ?. statement ?. map ( s => s . sid ) ?? [ ]
160+
157161 return {
158162 accountId : account ,
159163 arn,
160164 region,
165+ name : functionName ,
161166 description,
162167 handler,
163168 id : arn ,
@@ -174,7 +179,8 @@ export default ({
174179 vpcConfig : formattedVpcConfig ,
175180 policyRevisionId,
176181 rawPolicy : policy ,
177- policy : formatIamJsonPolicy ( policy ) ,
182+ policy : functionPolicy ,
183+ policyStatementIds,
178184 tags : formatTagsFromMap ( Tags ) ,
179185 eventSourceMappings : formatEventSourceMappings ( eventSourceMappings ) ,
180186 eventInvokeConfigs : formatEventInvokeConfigs ( eventInvokeConfigs )
Original file line number Diff line number Diff line change @@ -78,6 +78,7 @@ type awsLambdaEventSourceMappings
7878
7979type awsLambda implements awsBaseService @key (fields : " arn" ) {
8080 description : String @search (by : [hash , regexp , fulltext ])
81+ name : String @search (by : [hash , regexp ])
8182 handler : String @search (by : [hash , regexp ])
8283 kmsKeyArn : String @search (by : [hash , regexp ])
8384 lastModified : String @search (by : [hash , regexp ])
@@ -93,6 +94,7 @@ type awsLambda implements awsBaseService @key(fields: "arn") {
9394 policyRevisionId : String @search (by : [hash , regexp ])
9495 rawPolicy : String @search (by : [hash , regexp ])
9596 policy : awsIamJSONPolicy
97+ policyStatementIds : [String ] @search (by : [hash , regexp ])
9698 eventSourceMappings : [awsLambdaEventSourceMappings ]
9799 eventInvokeConfigs : [awsLambdaEventInvokeConfig ]
98100 tags : [awsRawTag ]
Original file line number Diff line number Diff line change @@ -3159,6 +3159,7 @@ export type AwsIamJsonPolicyStatement = {
31593159 notResource ?: Maybe < Array < Maybe < Scalars [ 'String' ] > > > ;
31603160 principal ?: Maybe < Array < Maybe < AwsIamJsonPolicyPrincipal > > > ;
31613161 resource ?: Maybe < Array < Maybe < Scalars [ 'String' ] > > > ;
3162+ sid ?: Maybe < Scalars [ 'String' ] > ;
31623163} ;
31633164
31643165export type AwsIamMfaDevice = {
@@ -3418,8 +3419,10 @@ export type AwsLambda = AwsBaseService & {
34183419 kmsKeyArn ?: Maybe < Scalars [ 'String' ] > ;
34193420 lastModified ?: Maybe < Scalars [ 'String' ] > ;
34203421 memorySize ?: Maybe < Scalars [ 'Int' ] > ;
3422+ name ?: Maybe < Scalars [ 'String' ] > ;
34213423 policy ?: Maybe < AwsIamJsonPolicy > ;
34223424 policyRevisionId ?: Maybe < Scalars [ 'String' ] > ;
3425+ policyStatementIds ?: Maybe < Array < Maybe < Scalars [ 'String' ] > > > ;
34233426 rawPolicy ?: Maybe < Scalars [ 'String' ] > ;
34243427 reservedConcurrentExecutions ?: Maybe < Scalars [ 'Int' ] > ;
34253428 runtime ?: Maybe < Scalars [ 'String' ] > ;
Original file line number Diff line number Diff line change @@ -124,6 +124,7 @@ export const formatIamJsonPolicy = (json: string): AwsIamJsonPolicy => {
124124 notAction : isArray ( el . NotAction )
125125 ? el . NotAction
126126 : [ toString ( el . NotAction ) ] ,
127+ sid : el . Sid ,
127128 condition : formatCondition ( el . Condition ) ,
128129 effect : el . Effect ,
129130 principal : formatPrincipal ( el . Principal ) ,
You can’t perform that action at this time.
0 commit comments