AWS Lambda Lambda Resource Policy API
The Lambda Resource Policy API from AWS Lambda — 1 operation(s) for lambda resource policy.
The Lambda Resource Policy API from AWS Lambda — 1 operation(s) for lambda resource policy.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/aws-lambda:aws-lambda-resource-policy-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: AWS Lambda Resource Policy API
version: '2015-03-31'
description: Generated from AWS's published Smithy model for AWS Lambda. 3 operation(s).
contact:
name: Amazon Web Services
url: https://aws.amazon.com/contact-us/
license:
name: Apache 2.0
identifier: Apache-2.0
url: https://github.com/aws/api-models-aws/blob/main/LICENSE
servers:
- url: https://lambda.{region}.amazonaws.com
variables:
region:
default: us-east-1
security:
- sigv4: []
tags:
- name: Resource Policy
paths:
/2026-07-09/resource-policy/{ResourceArn}:
delete:
operationId: DeleteResourcePolicy
summary: Delete Resource Policy
description: Deletes a resource-based policy from a Lambda resource.
responses:
'200':
description: Success
content:
application/json:
schema:
type: string
'400':
description: InvalidParameterValueException
content:
application/json:
schema:
$ref: '#/components/schemas/InvalidParameterValueException'
'412':
description: PreconditionFailedException
content:
application/json:
schema:
$ref: '#/components/schemas/PreconditionFailedException'
'409':
description: ResourceConflictException
content:
application/json:
schema:
$ref: '#/components/schemas/ResourceConflictException'
'404':
description: ResourceNotFoundException
content:
application/json:
schema:
$ref: '#/components/schemas/ResourceNotFoundException'
'500':
description: ServiceException
content:
application/json:
schema:
$ref: '#/components/schemas/ServiceException'
'429':
description: TooManyRequestsException
content:
application/json:
schema:
$ref: '#/components/schemas/TooManyRequestsException'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteResourcePolicyRequest'
tags:
- Resource Policy
get:
operationId: GetResourcePolicy
summary: Get Resource Policy
description: Retrieves the resource-based policy attached to a Lambda resource.
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/GetResourcePolicyResponse'
'400':
description: InvalidParameterValueException
content:
application/json:
schema:
$ref: '#/components/schemas/InvalidParameterValueException'
'404':
description: ResourceNotFoundException
content:
application/json:
schema:
$ref: '#/components/schemas/ResourceNotFoundException'
'500':
description: ServiceException
content:
application/json:
schema:
$ref: '#/components/schemas/ServiceException'
'429':
description: TooManyRequestsException
content:
application/json:
schema:
$ref: '#/components/schemas/TooManyRequestsException'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/GetResourcePolicyRequest'
tags:
- Resource Policy
put:
operationId: PutResourcePolicy
summary: Put Resource Policy
description: Adds a resource-based policy to a Lambda resource. Resource-based policies grant access to other Amazon Web Services accounts, organizations, or services. Resource-based policies apply to a single Lambda resource (for example, a function, function version, or function alias). This operation replaces any existing policy on the Lambda resource. If you previously added permissions using the AddPermission operation, the new policy overwrites those permissions.
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/PutResourcePolicyResponse'
'400':
description: InvalidParameterValueException; PolicyLengthExceededException; PublicPolicyException
content:
application/json:
schema:
$ref: '#/components/schemas/InvalidParameterValueException'
'412':
description: PreconditionFailedException
content:
application/json:
schema:
$ref: '#/components/schemas/PreconditionFailedException'
'409':
description: ResourceConflictException
content:
application/json:
schema:
$ref: '#/components/schemas/ResourceConflictException'
'404':
description: ResourceNotFoundException
content:
application/json:
schema:
$ref: '#/components/schemas/ResourceNotFoundException'
'500':
description: ServiceException
content:
application/json:
schema:
$ref: '#/components/schemas/ServiceException'
'429':
description: TooManyRequestsException
content:
application/json:
schema:
$ref: '#/components/schemas/TooManyRequestsException'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PutResourcePolicyRequest'
tags:
- Resource Policy
components:
schemas:
GetResourcePolicyResponse:
type: object
properties:
Policy:
type: string
description: The resource-based policy attached to the Lambda resource you specified.
RevisionId:
type: string
description: The revision ID of the policy. Pass this value as the RevisionId in a PutResourcePolicy or DeleteResourcePolicy request. Doing so ensures the operation acts on the expected version of the policy.
ResourceConflictException:
type: object
properties:
Type:
type: string
description: The exception type.
message:
type: string
description: The exception message.
TooManyRequestsException:
type: object
properties:
retryAfterSeconds:
type: string
description: The number of seconds the caller should wait before retrying.
Type:
type: string
message:
type: string
Reason:
type: string
enum:
- ConcurrentInvocationLimitExceeded
- FunctionInvocationRateLimitExceeded
- ReservedFunctionConcurrentInvocationLimitExceeded
- ReservedFunctionInvocationRateLimitExceeded
- CallerRateLimitExceeded
- ConcurrentSnapshotCreateLimitExceeded
GetResourcePolicyRequest:
type: object
properties:
ResourceArn:
type: string
description: The Amazon Resource Name (ARN) of the Lambda resource you want to retrieve the policy for. You can use a qualified or an unqualified ARN. The value must be a complete ARN, and the operation does not accept wildcard characters.
required:
- ResourceArn
DeleteResourcePolicyRequest:
type: object
properties:
ResourceArn:
type: string
description: The Amazon Resource Name (ARN) of the Lambda resource you want to delete the policy from. You can use a qualified or an unqualified ARN. The value must be a complete ARN, and the operation does not accept wildcard characters.
RevisionId:
type: string
description: The revision ID that the existing policy must match for the deletion to proceed. If the revision ID doesn't match, the operation fails with a PreconditionFailedException error. To retrieve the current revision ID, use the GetResourcePolicy operation.
required:
- ResourceArn
InvalidParameterValueException:
type: object
properties:
Type:
type: string
description: The exception type.
message:
type: string
description: The exception message.
PreconditionFailedException:
type: object
properties:
Type:
type: string
description: The exception type.
message:
type: string
description: The exception message.
PutResourcePolicyRequest:
type: object
properties:
ResourceArn:
type: string
description: The Amazon Resource Name (ARN) of the Lambda resource you want to add the policy to. You can use a qualified or an unqualified ARN. The value must be a complete ARN, and the operation does not accept wildcard characters.
Policy:
type: string
description: The policy document you want to add to your Lambda resource. This is formatted as a JSON string. For more information, see Working with resource-based policies in Lambda in the Lambda Developer Guide.
RevisionId:
type: string
description: The revision ID that the existing policy must match for the replacement to proceed. If the revision ID doesn't match, the operation fails with a PreconditionFailedException error. To retrieve the current revision ID, use the GetResourcePolicy operation.
required:
- ResourceArn
- Policy
PutResourcePolicyResponse:
type: object
properties:
Policy:
type: string
description: The resource-based policy that Lambda adds to the resource.
RevisionId:
type: string
description: The revision ID of the policy that Lambda adds to your Lambda resource.
ResourceNotFoundException:
type: object
properties:
Type:
type: string
Message:
type: string
ServiceException:
type: object
properties:
Type:
type: string
Message:
type: string
securitySchemes:
sigv4:
type: apiKey
in: header
name: Authorization
description: AWS Signature Version 4. The Authorization header carries an AWS4-HMAC-SHA256 signature over the canonical request, with X-Amz-Date (and X-Amz-Security-Token for temporary credentials). Not a bearer token.
x-aws-sigv4:
signingName: lambda
x-provenance:
method: harvested
publisher: Amazon Web Services
source: https://raw.githubusercontent.com/aws/api-models-aws/582e55931c45b944739742a2c1620b6026dd2d13/models/lambda/service/2015-03-31/lambda-2015-03-31.json
note: converted by smithy-to-openapi.py from AWS's Smithy model (roadmap#1001)