Skip to main content

policies

Creates, updates, deletes, gets or lists a policies resource.

Overview

Namepolicies
TypeResource
Idaws.lambda.policies

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
policystringThe resource-based policy.
revision_idstringA unique identifier for the current revision of the policy.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_policyselectfunction_name, regionQualifierReturns the resource-based IAM policy for a function, version, or alias.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
function_namestringThe name or ARN of the Lambda function, version, or alias. Name formats Function name – my-function (name-only), my-function:v1 (with alias). Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function. Partial ARN – 123456789012:function:my-function. You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
regionstringAWS region (default: us-east-1)
QualifierstringSpecify a version or alias to get the policy for that resource.

SELECT examples

Returns the resource-based IAM policy for a function, version, or alias.

SELECT
policy,
revision_id
FROM aws.lambda.policies
WHERE function_name = '{{ function_name }}' -- required
AND region = '{{ region }}' -- required
AND Qualifier = '{{ Qualifier }}'
;