Skip to content

Commit c20ab55

Browse files
Add InvokedViaFunctionUrl context key to limit invocations to only FURL invokes.
1 parent 23b7398 commit c20ab55

File tree

8 files changed

+176
-70
lines changed

8 files changed

+176
-70
lines changed

docgenerator/AWSSDKDocSamples/Lambda.GeneratedSamples.extra.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -447,10 +447,10 @@
447447
<value>
448448
<example>
449449
<para>
450-
The following example returns details for the provisioned concurrency configuration for the BLUE alias of the specified function.
450+
The following example displays details for the provisioned concurrency configuration for the BLUE alias of the specified function.
451451
</para>
452452
<code
453-
title="To get a provisioned concurrency configuration"
453+
title="To view a provisioned concurrency configuration"
454454
source=".\AWSSDKDocSamples\Lambda\Lambda.GeneratedSamples.cs"
455455
region="example-1" />
456456
</example>
@@ -466,10 +466,10 @@
466466
<value>
467467
<example>
468468
<para>
469-
The following example displays details for the provisioned concurrency configuration for the BLUE alias of the specified function.
469+
The following example returns details for the provisioned concurrency configuration for the BLUE alias of the specified function.
470470
</para>
471471
<code
472-
title="To view a provisioned concurrency configuration"
472+
title="To get a provisioned concurrency configuration"
473473
source=".\AWSSDKDocSamples\Lambda\Lambda.GeneratedSamples.cs"
474474
region="example-2" />
475475
</example>

generator/ServiceModels/lambda/lambda-2015-03-31.api.json

Lines changed: 64 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,8 @@
315315
"errors":[
316316
{"shape":"ServiceException"},
317317
{"shape":"TooManyRequestsException"}
318-
]
318+
],
319+
"readonly":true
319320
},
320321
"GetAlias":{
321322
"name":"GetAlias",
@@ -331,7 +332,8 @@
331332
{"shape":"ServiceException"},
332333
{"shape":"TooManyRequestsException"},
333334
{"shape":"ResourceNotFoundException"}
334-
]
335+
],
336+
"readonly":true
335337
},
336338
"GetCodeSigningConfig":{
337339
"name":"GetCodeSigningConfig",
@@ -346,7 +348,8 @@
346348
{"shape":"InvalidParameterValueException"},
347349
{"shape":"ServiceException"},
348350
{"shape":"ResourceNotFoundException"}
349-
]
351+
],
352+
"readonly":true
350353
},
351354
"GetEventSourceMapping":{
352355
"name":"GetEventSourceMapping",
@@ -362,7 +365,8 @@
362365
{"shape":"ServiceException"},
363366
{"shape":"TooManyRequestsException"},
364367
{"shape":"ResourceNotFoundException"}
365-
]
368+
],
369+
"readonly":true
366370
},
367371
"GetFunction":{
368372
"name":"GetFunction",
@@ -378,7 +382,8 @@
378382
{"shape":"ServiceException"},
379383
{"shape":"TooManyRequestsException"},
380384
{"shape":"ResourceNotFoundException"}
381-
]
385+
],
386+
"readonly":true
382387
},
383388
"GetFunctionCodeSigningConfig":{
384389
"name":"GetFunctionCodeSigningConfig",
@@ -394,7 +399,8 @@
394399
{"shape":"ServiceException"},
395400
{"shape":"TooManyRequestsException"},
396401
{"shape":"ResourceNotFoundException"}
397-
]
402+
],
403+
"readonly":true
398404
},
399405
"GetFunctionConcurrency":{
400406
"name":"GetFunctionConcurrency",
@@ -410,7 +416,8 @@
410416
{"shape":"ServiceException"},
411417
{"shape":"TooManyRequestsException"},
412418
{"shape":"ResourceNotFoundException"}
413-
]
419+
],
420+
"readonly":true
414421
},
415422
"GetFunctionConfiguration":{
416423
"name":"GetFunctionConfiguration",
@@ -426,7 +433,8 @@
426433
{"shape":"ServiceException"},
427434
{"shape":"TooManyRequestsException"},
428435
{"shape":"ResourceNotFoundException"}
429-
]
436+
],
437+
"readonly":true
430438
},
431439
"GetFunctionEventInvokeConfig":{
432440
"name":"GetFunctionEventInvokeConfig",
@@ -442,7 +450,8 @@
442450
{"shape":"ServiceException"},
443451
{"shape":"TooManyRequestsException"},
444452
{"shape":"ResourceNotFoundException"}
445-
]
453+
],
454+
"readonly":true
446455
},
447456
"GetFunctionRecursionConfig":{
448457
"name":"GetFunctionRecursionConfig",
@@ -458,7 +467,8 @@
458467
{"shape":"ServiceException"},
459468
{"shape":"TooManyRequestsException"},
460469
{"shape":"ResourceNotFoundException"}
461-
]
470+
],
471+
"readonly":true
462472
},
463473
"GetFunctionUrlConfig":{
464474
"name":"GetFunctionUrlConfig",
@@ -474,7 +484,8 @@
474484
{"shape":"ServiceException"},
475485
{"shape":"TooManyRequestsException"},
476486
{"shape":"ResourceNotFoundException"}
477-
]
487+
],
488+
"readonly":true
478489
},
479490
"GetLayerVersion":{
480491
"name":"GetLayerVersion",
@@ -490,7 +501,8 @@
490501
{"shape":"ServiceException"},
491502
{"shape":"TooManyRequestsException"},
492503
{"shape":"ResourceNotFoundException"}
493-
]
504+
],
505+
"readonly":true
494506
},
495507
"GetLayerVersionByArn":{
496508
"name":"GetLayerVersionByArn",
@@ -506,7 +518,8 @@
506518
{"shape":"ServiceException"},
507519
{"shape":"TooManyRequestsException"},
508520
{"shape":"ResourceNotFoundException"}
509-
]
521+
],
522+
"readonly":true
510523
},
511524
"GetLayerVersionPolicy":{
512525
"name":"GetLayerVersionPolicy",
@@ -522,7 +535,8 @@
522535
{"shape":"ServiceException"},
523536
{"shape":"TooManyRequestsException"},
524537
{"shape":"ResourceNotFoundException"}
525-
]
538+
],
539+
"readonly":true
526540
},
527541
"GetPolicy":{
528542
"name":"GetPolicy",
@@ -538,7 +552,8 @@
538552
{"shape":"ServiceException"},
539553
{"shape":"TooManyRequestsException"},
540554
{"shape":"ResourceNotFoundException"}
541-
]
555+
],
556+
"readonly":true
542557
},
543558
"GetProvisionedConcurrencyConfig":{
544559
"name":"GetProvisionedConcurrencyConfig",
@@ -555,7 +570,8 @@
555570
{"shape":"ServiceException"},
556571
{"shape":"TooManyRequestsException"},
557572
{"shape":"ResourceNotFoundException"}
558-
]
573+
],
574+
"readonly":true
559575
},
560576
"GetRuntimeManagementConfig":{
561577
"name":"GetRuntimeManagementConfig",
@@ -571,7 +587,8 @@
571587
{"shape":"ServiceException"},
572588
{"shape":"TooManyRequestsException"},
573589
{"shape":"ResourceNotFoundException"}
574-
]
590+
],
591+
"readonly":true
575592
},
576593
"Invoke":{
577594
"name":"Invoke",
@@ -689,7 +706,8 @@
689706
{"shape":"ServiceException"},
690707
{"shape":"TooManyRequestsException"},
691708
{"shape":"ResourceNotFoundException"}
692-
]
709+
],
710+
"readonly":true
693711
},
694712
"ListCodeSigningConfigs":{
695713
"name":"ListCodeSigningConfigs",
@@ -703,7 +721,8 @@
703721
"errors":[
704722
{"shape":"InvalidParameterValueException"},
705723
{"shape":"ServiceException"}
706-
]
724+
],
725+
"readonly":true
707726
},
708727
"ListEventSourceMappings":{
709728
"name":"ListEventSourceMappings",
@@ -719,7 +738,8 @@
719738
{"shape":"ServiceException"},
720739
{"shape":"TooManyRequestsException"},
721740
{"shape":"ResourceNotFoundException"}
722-
]
741+
],
742+
"readonly":true
723743
},
724744
"ListFunctionEventInvokeConfigs":{
725745
"name":"ListFunctionEventInvokeConfigs",
@@ -735,7 +755,8 @@
735755
{"shape":"ServiceException"},
736756
{"shape":"TooManyRequestsException"},
737757
{"shape":"ResourceNotFoundException"}
738-
]
758+
],
759+
"readonly":true
739760
},
740761
"ListFunctionUrlConfigs":{
741762
"name":"ListFunctionUrlConfigs",
@@ -751,7 +772,8 @@
751772
{"shape":"ServiceException"},
752773
{"shape":"TooManyRequestsException"},
753774
{"shape":"ResourceNotFoundException"}
754-
]
775+
],
776+
"readonly":true
755777
},
756778
"ListFunctions":{
757779
"name":"ListFunctions",
@@ -766,7 +788,8 @@
766788
{"shape":"InvalidParameterValueException"},
767789
{"shape":"ServiceException"},
768790
{"shape":"TooManyRequestsException"}
769-
]
791+
],
792+
"readonly":true
770793
},
771794
"ListFunctionsByCodeSigningConfig":{
772795
"name":"ListFunctionsByCodeSigningConfig",
@@ -781,7 +804,8 @@
781804
{"shape":"InvalidParameterValueException"},
782805
{"shape":"ServiceException"},
783806
{"shape":"ResourceNotFoundException"}
784-
]
807+
],
808+
"readonly":true
785809
},
786810
"ListLayerVersions":{
787811
"name":"ListLayerVersions",
@@ -797,7 +821,8 @@
797821
{"shape":"ServiceException"},
798822
{"shape":"TooManyRequestsException"},
799823
{"shape":"ResourceNotFoundException"}
800-
]
824+
],
825+
"readonly":true
801826
},
802827
"ListLayers":{
803828
"name":"ListLayers",
@@ -812,7 +837,8 @@
812837
{"shape":"InvalidParameterValueException"},
813838
{"shape":"ServiceException"},
814839
{"shape":"TooManyRequestsException"}
815-
]
840+
],
841+
"readonly":true
816842
},
817843
"ListProvisionedConcurrencyConfigs":{
818844
"name":"ListProvisionedConcurrencyConfigs",
@@ -828,7 +854,8 @@
828854
{"shape":"ServiceException"},
829855
{"shape":"TooManyRequestsException"},
830856
{"shape":"ResourceNotFoundException"}
831-
]
857+
],
858+
"readonly":true
832859
},
833860
"ListTags":{
834861
"name":"ListTags",
@@ -844,7 +871,8 @@
844871
{"shape":"ServiceException"},
845872
{"shape":"TooManyRequestsException"},
846873
{"shape":"ResourceNotFoundException"}
847-
]
874+
],
875+
"readonly":true
848876
},
849877
"ListVersionsByFunction":{
850878
"name":"ListVersionsByFunction",
@@ -860,7 +888,8 @@
860888
{"shape":"ServiceException"},
861889
{"shape":"TooManyRequestsException"},
862890
{"shape":"ResourceNotFoundException"}
863-
]
891+
],
892+
"readonly":true
864893
},
865894
"PublishLayerVersion":{
866895
"name":"PublishLayerVersion",
@@ -1282,7 +1311,8 @@
12821311
},
12831312
"RevisionId":{"shape":"String"},
12841313
"PrincipalOrgID":{"shape":"PrincipalOrgID"},
1285-
"FunctionUrlAuthType":{"shape":"FunctionUrlAuthType"}
1314+
"FunctionUrlAuthType":{"shape":"FunctionUrlAuthType"},
1315+
"InvokedViaFunctionUrl":{"shape":"InvokedViaFunctionUrl"}
12861316
}
12871317
},
12881318
"AddPermissionResponse":{
@@ -2966,6 +2996,10 @@
29662996
},
29672997
"eventstream":true
29682998
},
2999+
"InvokedViaFunctionUrl":{
3000+
"type":"boolean",
3001+
"box":true
3002+
},
29693003
"KMSAccessDeniedException":{
29703004
"type":"structure",
29713005
"members":{

generator/ServiceModels/lambda/lambda-2015-03-31.docs.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@
312312
"CodeSigningPolicy": {
313313
"base": null,
314314
"refs": {
315-
"CodeSigningPolicies$UntrustedArtifactOnDeployment": "<p>Code signing configuration policy for deployment validation failure. If you set the policy to <code>Enforce</code>, Lambda blocks the deployment request if signature validation checks fail. If you set the policy to <code>Warn</code>, Lambda allows the deployment and creates a CloudWatch log. </p> <p>Default value: <code>Warn</code> </p>"
315+
"CodeSigningPolicies$UntrustedArtifactOnDeployment": "<p>Code signing configuration policy for deployment validation failure. If you set the policy to <code>Enforce</code>, Lambda blocks the deployment request if signature validation checks fail. If you set the policy to <code>Warn</code>, Lambda allows the deployment and issues a new Amazon CloudWatch metric (<code>SignatureValidationErrors</code>) and also stores the warning in the CloudTrail log.</p> <p>Default value: <code>Warn</code> </p>"
316316
}
317317
},
318318
"CodeStorageExceededException": {
@@ -1157,6 +1157,12 @@
11571157
"InvokeWithResponseStreamResponse$EventStream": "<p>The stream of response payloads.</p>"
11581158
}
11591159
},
1160+
"InvokedViaFunctionUrl": {
1161+
"base": null,
1162+
"refs": {
1163+
"AddPermissionRequest$InvokedViaFunctionUrl": "<p>Restricts the <code>lambda:InvokeFunction</code> action to calls coming from a function URL. When set to <code>true</code>, this prevents the principal from invoking the function by any means other than the function URL. For more information, see <a href=\"https://docs.aws.amazon.com/lambda/latest/dg/urls-auth.html\">Security and auth model for Lambda function URLs</a>.</p>"
1164+
}
1165+
},
11601166
"KMSAccessDeniedException": {
11611167
"base": "<p>Lambda couldn't decrypt the environment variables because KMS access was denied. Check the Lambda function's KMS permissions.</p>",
11621168
"refs": {}

generator/ServiceModels/lambda/lambda-2015-03-31.examples.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -502,9 +502,9 @@
502502
"RequestedProvisionedConcurrentExecutions": 100,
503503
"Status": "READY"
504504
},
505-
"description": "The following example returns details for the provisioned concurrency configuration for the BLUE alias of the specified function.",
505+
"description": "The following example displays details for the provisioned concurrency configuration for the BLUE alias of the specified function.",
506506
"id": "example-1",
507-
"title": "To get a provisioned concurrency configuration"
507+
"title": "To view a provisioned concurrency configuration"
508508
},
509509
{
510510
"input": {
@@ -518,9 +518,9 @@
518518
"RequestedProvisionedConcurrentExecutions": 100,
519519
"Status": "READY"
520520
},
521-
"description": "The following example displays details for the provisioned concurrency configuration for the BLUE alias of the specified function.",
521+
"description": "The following example returns details for the provisioned concurrency configuration for the BLUE alias of the specified function.",
522522
"id": "example-2",
523-
"title": "To view a provisioned concurrency configuration"
523+
"title": "To get a provisioned concurrency configuration"
524524
}
525525
],
526526
"Invoke": [

0 commit comments

Comments
 (0)