Pourquoi est-il impossible de supprimer SNS sur AmazonIpSpaceChanged? S'il vous plaît vérifier, j'ai besoin de vos conseils.Erreur d'abonnement SNS pour AmazonIpSpaceChanged sur une autre région
Le guide que j'ai essentiellement suivi est le How to Automatically Update Your Security Groups for Amazon CloudFront and AWS WAF by Using AWS Lambda du blog AWS Security.
est ici une sortie du terminal:
➜ terminal $ cat ~/.aws/config [default] region = ap-southeast-1 ➜ terminal $ aws sns subscribe --topic-arn arn:aws:sns:us-east-1:806199016981:AmazonIpSpaceChanged --protocol lambda --notification-endpoint arn:aws:lambda:ap-southeast-1:accountid_removed:function:cloudfront-securitygroup-controller An error occurred (InvalidParameter) when calling the Subscribe operation: Invalid parameter: TopicArn ➜ terminal $ AWS_REGION=ap-southeast-1 aws sns subscribe --topic-arn arn:aws:sns:ap-southeast-1:806199016981:AmazonIpSpaceChanged --protocol lambda --notification-endpoint arn:aws:lambda:ap-southeast-1:accountid_removed:function:cloudfront-securitygroup-controller An error occurred (AuthorizationError) when calling the Subscribe operation: User: arn:aws:iam::accountid_removed:user/[email protected] is not authorized to perform: SNS:Subscribe on resource: arn:aws:sns:ap-southeast-1:806199016981:AmazonIpSpaceChanged
Ceci est également la sortie lorsque vous avez terminé via la console Web AWS:
User: arn:aws:iam::accountid_removed:user/[email protected] is not authorized to perform: SNS:Subscribe on resource: arn:aws:sns:ap-southeast-1:806199016981:AmazonIpSpaceChanged (Service: AmazonSNS; Status Code: 403; Error Code: AuthorizationError; Request ID: 0e87384a-e298-569e-bf2d-6a5718eedc40)
La dernière fois que je l'ai testé avec 'AWS_REGION = us -east-1' et il a échoué. C'est une bonne chose que vous ayez fait remarquer que je devais utiliser le paramètre '--region', et cela fonctionne. Merci beaucoup! –