helpful-account-44059
07/14/2022, 10:32 AMCheck 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: "<http://aps.amazonaws.com|aps.amazonaws.com>",
},
Action: ["sns:Publish", "sns:GetTopicAttributes"],
Resource: "arn:aws:sns:ap-southeast-1:482414749843:amp-sns-topic",
Condition: {
StringEquals: {
"AWS:SourceAccount": "482414749843",
},
ArnEquals: {
"aws:SourceArn":
"arn:aws:aps:ap-southeast-1:482414749843:workspace/ws-be6e741f-d8ac-4330-b0fb-6a0c0aa92d6f",
},
},
},
],
},
});
No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by