Skip to main content

layer_version_permissions

Creates, updates, deletes or gets a layer_version_permission resource or lists layer_version_permissions in a region

Overview

Namelayer_version_permissions
TypeResource
DescriptionSchema for Lambda LayerVersionPermission
Idaws.lambda.layer_version_permissions

Fields

NameDatatypeDescription
idstringID generated by service
actionstringThe API action that grants access to the layer.
layer_version_arnstringThe name or Amazon Resource Name (ARN) of the layer.
organization_idstringWith the principal set to *, grant permission to all accounts in the specified organization.
principalstringAn account ID, or * to grant layer usage permission to all accounts in an organization, or all AWS accounts (if organizationId is not specified).
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTLayerVersionArn, Action, Principal, region
delete_resourceDELETEdata__Identifier, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all layer_version_permissions in a region.

SELECT
region,
id,
action,
layer_version_arn,
organization_id,
principal
FROM aws.lambda.layer_version_permissions
WHERE region = 'us-east-1';

Gets all properties from an individual layer_version_permission.

SELECT
region,
id,
action,
layer_version_arn,
organization_id,
principal
FROM aws.lambda.layer_version_permissions
WHERE region = 'us-east-1' AND data__Identifier = '<Id>';

INSERT example

Use the following StackQL query and manifest file to create a new layer_version_permission resource, using stack-deploy.

/*+ create */
INSERT INTO aws.lambda.layer_version_permissions (
Action,
LayerVersionArn,
Principal,
region
)
SELECT
'{{ Action }}',
'{{ LayerVersionArn }}',
'{{ Principal }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.lambda.layer_version_permissions
WHERE data__Identifier = '<Id>'
AND region = 'us-east-1';

Permissions

To operate on the layer_version_permissions resource, the following permissions are required:

Create

lambda:AddLayerVersionPermission

Read

lambda:GetLayerVersionPolicy

Delete

lambda:GetLayerVersionPolicy,
lambda:RemoveLayerVersionPermission

List

lambda:GetLayerVersionPolicy