I'm using SAM Template to create my serverless application.
Using the tag Policies
under the properties of the resource I can add standard policies like this:
Resources:
QueryFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: query/
Handler: app.lambda_handler
Policies:
- AmazonDynamoDBFullAccess
- AWSLambdaVPCAccessExecutionRole
Runtime: python3.7
The problem is that I need to attach an inline policy to access only a specific DynamoDB table.
How can i put this inline policy in the template?
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "dynamodb:*",
"Resource": "dynamo_db_table_endpoint"
}
]
}
Thanks