Principal. For Amazon Web Services services, the principal is a domain-style identifier defined by the service, like s3.amazonaws.com or sns.amazonaws.com. For Amazon Web Services services, you can also specify the ARN of the associated resource as the SourceArn. If you grant permission to a service principal without specifying the source, other accounts could potentially configure resources in their account to invoke your Lambda function.curl --location -g --request POST 'http://lambda.{region}.amazonaws.com/2015-03-31/functions//policy' \
--header 'Content-Type: application/json' \
--data-raw '{
"StatementId": "string",
"Action": "string",
"Principal": "string",
"SourceArn": "string",
"SourceAccount": "string",
"EventSourceToken": "string",
"RevisionId": "string"
}'{
"Statement": "string"
}