07/27/2022, 6:31 AM
Hi, I have aws sns topic access policy as picture, it was edited by manual, when i try to translate to pulumi IaC code, it not accepted 1. Statement IDs (SID) must be alpha-numeric.
Check that your input satisfies the regular expression [0-9A-Za-z]*
2. I change the Sid to AllowPublishAlarms
error creating IAM Policy sns-access-policy: MalformedPolicyDocument: Policy document should not specify a principal
const snsAccessPolicy = new aws.iam.Policy("sns-access-policy", {
  name: "sns-access-policy",
  policy: {
    Version: "2012-10-17",
    Statement: [
        Sid: "Allow_Publish_Alarms",
        Effect: "Allow",
        Principal: {
          Service: "<|>",
        Action: ["sns:Publish", "sns:GetTopicAttributes"],
        Resource: "arn:aws:sns:ap-southeast-1:482414749843:amp-sns-topic",
        Condition: {
          StringEquals: {
            "AWS:SourceAccount": "482414749843",
          ArnEquals: {
Am I asking a stupid question?