policies
Creates, updates, deletes, gets or lists a policies resource.
Overview
| Name | policies |
| Type | Resource |
| Id | aws.lambda.policies |
Fields
The following fields are returned by SELECT queries:
- get_policy
| Name | Datatype | Description |
|---|---|---|
policy | string | The resource-based policy. |
revision_id | string | A unique identifier for the current revision of the policy. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_policy | select | function_name, region | Qualifier | Returns 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.
| Name | Datatype | Description |
|---|---|---|
function_name | string | The 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. |
region | string | AWS region (default: us-east-1) |
Qualifier | string | Specify a version or alias to get the policy for that resource. |
SELECT examples
- get_policy
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 }}'
;