Adds permissions to the resource-based policy of a version of an AWS Lambda layer. Use this action to grant layer usage permission to other accounts. You can grant permission to a single account, all AWS accounts, or all accounts in an organization.
lambda_add_layer_version_permission(LayerName, VersionNumber,
StatementId, Action, Principal, OrganizationId, RevisionId)
[required] The name or Amazon Resource Name (ARN) of the layer.
[required] The version number.
[required] An identifier that distinguishes the policy from others on the same layer version.
[required] The API action that grants access to the layer. For example,
lambda:GetLayerVersion
.
[required] An account ID, or *
to grant permission to all AWS accounts.
With the principal set to *
, grant permission to all accounts in the
specified organization.
Only update the policy if the revision ID matches the ID specified. Use this option to avoid modifying a policy that has changed since you last read it.
svc$add_layer_version_permission( LayerName = "string", VersionNumber = 123, StatementId = "string", Action = "string", Principal = "string", OrganizationId = "string", RevisionId = "string" )
To revoke permission, call RemoveLayerVersionPermission with the statement ID that you specified when you added it.