In my situation I need to create few rules with different policies to access appsync API.
something like this
Policies:
- PolicyName: superAdminActions
PolicyDocument:
Statement:
- Effect: Allow
Action: "appsync:GraphQL"
Resource: [
"arn:aws:appsync:${self:provider.region}:${self:custom.accountId}:apis/${self:provider.environment.appSyncAPIId}/types/Query/fields/propertyList",
"arn:aws:appsync:${self:provider.region}:${self:custom.accountId}:apis/${self:provider.environment.appSyncAPIId}/types/Query/fields/propertyGet"]
the problem here is that I set appSyncAPIId
from environment which is incorrect because I should somehow point to appsyncAPI in this serverless file. How can I do this?
Currently I need to deploy so that appsync API would be created, copypaste apiID to my env config and then redeploy so that link to appsync endpoint would be updated.