-
Hi I have a single SNS client created in one region with the defaults mode set as cfg, _ := config.LoadDefaultConfig(context.Background(),
config.WithRegion("us-east-1"))
cfg.DefaultsMode = aws.DefaultsModeCrossRegion
snsClient := sns.NewFromConfig(cfg)
snsClient.Publish(context.Background(), &sns.PublishInput{
Message: aws.String("test"),
TopicArn: aws.String("arn:aws:sns:us-west-2:xxxxx:test"),
}) Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Thanks for reaching out @opiuman the |
Beta Was this translation helpful? Give feedback.
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
Thanks for reaching out @opiuman the
cross-region
mode configures the SDK's defaults with regard to timeouts and similar options. From your example it looks like you're trying to send to a queue in theus-west-2
region, with the client configured for theus-east-1
region. The best way to do this is to configure the client for the region the resources is in.us-west-2
in this case.