sst: MalformedPolicyDocument: Resource must be in ARN format or "".
Getting this error non-deterministically when creating a next.js site in a VPC linked to a postgres database.
It appears to have to do with the AppDefaultRole and the next.js function.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 2
- Comments: 19 (5 by maintainers)
Fixed in v3.6.6
This bug happens in
sst dev. When linking anAuroracluster to a function/service, theresourcesfield in the IAM policy contains the cluster ARN. Indevmode, the Aurora cluster is not deployed, causing the policy containsplaceholdervalue.It’s an oversight on my part 🙏
Here’s the commit - https://github.com/sst/sst/commit/af2f402626e0863bf56cb3ed26376cf112a41501
I am also seeing this issue when trying to
linkan Aurora Serverless V2 database. It may have also broken mysst devserver as the bridge could no longer connect over web sockets, maybe an IAM policy problem (but not sure)I am now getting this error on every deploy. It is becoming a major blocker. Totally breaks the ability to make progress and no way to debug or work around. Worse, it is inconsistent and seems to just pop up randomly.
I have a similar error:
MalformedPolicyDocument: Resource placeholder must be in ARN format or "*".. It happens every time, not every other time as mentioned in the original issue.Here is the full error:
Here is the CloudTrail log. As you can see there is a dangling “placeholder” value that was not replaced with the actual value.
here is an MRE:
I get this error even after removing the stage and the .sst folder so it should be reproducable.
Looks like the following permissions are dropped as soon as I link:
Allow: appsync:*. Seems related to the PutResoure Policy error.Flow goes like this:
link: [rds]andvpcto my Functionsst devwill fail withoperation error IAM: PutRolePolicysst devand restart