I saw this answer but it does not work for me. AWS SAM Multiple Functions with same Inline Policy
when I run sam local start-api
it show 'Globals', "'Policies' is not a supported property of 'Function'
this is my sample code
Globals:
Function:
Runtime: nodejs14.x
MemorySize: 128
Timeout: 100
Policies:
- Version: '2012-10-17'
Statement:
- Effect: Allow
Action:
- 'dynamodb:GetItem'
- 'dynamodb:PutItem'
- 'dynamodb:Scan'
- 'dynamodb:Query'
- 'dynamodb:DeleteItem'
- 'dynamodb:Update*'
Resource: 'arn:aws:dynamodb:us-xxxx-1:xxxxxxx:table/xxxxxxxx'
is there any way to declare global policy