- Newest
- Most votes
- Most comments
It appears that you're encountering an issue with creating an OAM (Observability Access Manager) link for cross-account monitoring in CloudWatch. The error message suggests that there's an explicit deny preventing the creation of the link. Here are a few things to check and consider:
-
Sink Policy: Ensure that the sink policy in your monitoring account allows the creation of links. The sink policy should explicitly allow the "oam:CreateLink" action for the source accounts or the organization.
-
IAM Permissions: Verify that the IAM role or user you're using has the necessary permissions to create OAM links. You might need the OAMFullAccess policy or a custom policy that includes the "oam:CreateLink" permission.
-
Organization ID: If you're using organization-based access, make sure the organization ID in the sink policy matches your actual AWS Organizations ID.
-
Resource Types: Check that the resource types you're trying to share (like CloudWatch metrics) are correctly specified in the sink policy.
-
Account Numbers: Confirm that the account numbers for both the source and monitoring accounts are correct in your configuration.
-
Region: Ensure you're operating in the correct AWS region where you've set up the sink.
To troubleshoot further:
-
In the monitoring account, use the AWS CLI to list the sinks: aws oam list-sinks
-
Then, list the attached links for the specific sink: aws oam list-attached-links --sink-identifier <your-sink-identifier>
These commands will help you verify the current setup and potentially identify any misconfigurations.
If the issue persists after checking these points, you may need to review the sink policy in detail to ensure it's correctly set up to allow link creation from your source accounts.
Sources
Identity and access management for Amazon CloudWatch - Amazon CloudWatch
CloudWatch Observability Access Monitor examples using AWS CLI - AWS SDK Code Examples
AWS::Oam::Sink - AWS CloudFormation
Troubleshoot cross account observability in CloudWatch | AWS re:Post
Hello.
Judging from the error message, it appears that the IAM policy set for the IAM role created in the target account is set to explicitly deny the operation.
Check the configured IAM policy and make sure that the "Deny" action is not set.
Also, please make sure that not only the IAM policy but also "Permissions boundaries" are not set.
If any "Permissions boundaries" are set, please delete them once.
Relevant content
- AWS OFFICIALUpdated 3 years ago
