AWS code-library documentation change
Summary
Added PowerShell V5 example for retrieving Lambda function policies
Security assessment
Shows how to view existing resource policies but doesn't address security vulnerabilities or recommend security best practices
Diff
diff --git a/code-library/latest/ug/lambda_example_lambda_GetPolicy_section.md b/code-library/latest/ug/lambda_example_lambda_GetPolicy_section.md index c249a73d9..f2daf34f0 100644 --- a//code-library/latest/ug/lambda_example_lambda_GetPolicy_section.md +++ b//code-library/latest/ug/lambda_example_lambda_GetPolicy_section.md @@ -75,0 +76,19 @@ PowerShell +**Tools for PowerShell V5** + + +**Example 1: This sample displays the Function policy of the Lambda function** + + + Get-LMPolicy -FunctionName test -Select Policy + + +**Output:** + + + {"Version":"2012-10-17","Id":"default","Statement":[{"Sid":"xxxx","Effect":"Allow","Principal":{"Service":"sns.amazonaws.com"},"Action":"lambda:InvokeFunction","Resource":"arn:aws:lambda:us-east-1:123456789102:function:test"}]} + + * For API details, see [GetPolicy](https://docs.aws.amazon.com/powershell/v5/reference) in _AWS Tools for PowerShell Cmdlet Reference (V5)_. + + + +