I'm trying insert a record into my aws timestream table. And its getting resulted in a access denied error.
Here is the permission on serverless.yml
- Effect: Allow
Action:
- timestream:*
Resource:
- arn:aws:timestream:${self:provider.region}:*:database/*
- arn:aws:timestream:${self:provider.region}:*:database/*/*/*
Iam role detail for the lambda.
{
"Action": [
"timestream:*"
],
"Resource": [
"arn:aws:timestream:us-east-1:*:database/*",
"arn:aws:timestream:us-east-1:*:database/*/*/*"
],
"Effect": "Allow"
},
Record Sample
{
"DatabaseName": "developmentreportsdb",
"TableName": "developmenteventstable",
"Records": [
{
"Dimensions": [
{
"Name": "accountId",
"Value": "6921e43e-266c-4adf-8a69-d90bd8743d1b"
},
{
"Name": "userId",
"Value": "6921e43e-266c-4adf-8a69-d90bd8743d1b"
}
],
"MeasureName": "ACCOUNT.NEW",
"MeasureValue": "6921e43e-266c-4adf-8a69-d90bd8743d1b",
"MeasureValueType": "VARCHAR",
"Time": "1644234263813",
"TimeUnit": "MILLISECONDS",
"Version": 1
}
]
}
Error Details:
Error writing records: AccessDeniedException: User: arn:aws:sts::344128203239:assumed-role/development-us-east-1-lambdaRole/development-worker is not authorized to perform: timestream:DescribeEndpoints because no identity-based policy allows the timestream:DescribeEndpoints action
TIA. What is missing here?