DevOps Guru CloudFormation with Tags

0

Hi,

As a developer, I am trying to deploy DevOps Guru using CloudFormation to target specific resources with tag.

I use the following code based on the documentation https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-devopsguru-resourcecollection-tagcollection.html

Resources:
  DevOpsGuruMonitoring:
    Type: AWS::DevOpsGuru::ResourceCollection
    Description: AWS operations service to improve the performance and availability of their applications
    Properties:
      ResourceCollectionFilter:
        Tags:
          - AppBoundaryKey: !Ref AppBoundaryKey

However, CloudFormation failed to update DevOps Guru with the following

Resource handler returned message: "null" (RequestToken: 68fa3896-44bf-eab6-2b63-e3bf13390fe0, HandlerErrorCode: InternalFailure)

The error is unclear and it looks like CloudFormation internal error to work with Tags value.

Any thoughts?

James

  • For more detail, I want to use CloudFormation to gather performance insight from RDS instead of doing it in the UI.

2 Answers
1
Accepted Answer

Following template worked for me, for all resources have you tried with "*" as a value for TagValues?

DevOpsGuruResourceCollection:
    Type: AWS::DevOpsGuru::ResourceCollection
    Properties:
      ResourceCollectionFilter:
        Tags:
        - AppBoundaryKey: "Devops-guru-cfn-default"
          TagValues:
          - "devopsgurudemo-cluster-aws-test-1"

Update: tested with "*" and it works as well.

  DevOpsGuruResourceCollection:
    Type: AWS::DevOpsGuru::ResourceCollection
    Properties:
      ResourceCollectionFilter:
        Tags:
        - AppBoundaryKey: "Devops-guru-cfn-default"
          TagValues:
          - "*"
AWS
MODERATOR
Vijay
answered 2 years ago
  • Thank you Vijay, your suggestion works. Also may I suggest to update the documentation with the example you provided? That would be really helpful.

  • Thank you for the feedback and your patience. Yes, we will update the documentation.

0

Hello, looks like TagValues is a required property when AppBoundaryKey is specified and omitting it is returning the error "InternalFailure". The same is seen in AWS console as well, where, the operation fails to proceed with error "Please select at least one resource to analyze" if no option is selected under Select tag values. I was able to reproduce the issue and fixed it by adding the TagValues property. Please consider adding the property and retry.

Template snippet for your reference:

...
        Tags:
          - AppBoundaryKey: !Ref AppBoundaryKey
            TagValues: 
                - XXX
...

I have submitted a feedback for the team in the AWS CloudFormation document here TagValues to update it as a required property, that is, Required: Yes.

AWS
SUPPORT ENGINEER
answered 2 years ago
  • What if I want to all resources with the same tag key? Do I have to list out all the TagValues? I thought we only need to specify TagValues when we want to further filter the resources within the tag key?

  • The solution you provided does not work. I am still getting the same error. Resource handler returned message: "null" (RequestToken: <>, HandlerErrorCode: InternalFailure)

  • What if I want to all resources with the same tag key? Do I have to list out all the TagValues? I thought we only need to specify TagValues when we want to further filter the resources within the tag key?

    you can specify "*" for the tag values, but this setting picks up ALL resources in the account and tags are used just for application boundary. Sharing this text in case your expectation is only resources with specific tags will be picked up.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions