CloudFormation RDS Script

0

I wrote a YML script for cloudformation configuring alert script is very simple and according to our need except i am facing an issue i want a dropdown RDS instance list in this script I tyred to read Aws documentation and other forms if any when have any idea please share .Note i created same script for ec2 instance in which a dropdown menu is visible and show all available ec2 instances mention below is the RDS script

Parameters: sns: Type: String Default: Enter snstopic Name Description: Enter Your Sns Topic Name. EmailAdrs: Type: String Default: Enter Your Email Address Description: Enter Your Email Address. DBinstance: Type: 'AWS::RDS::DBInstanceIdentifier' Default: Select Your Instance Description: Select Your Instance from Dorpdown list. Resources: snstopic: Type: 'AWS::SNS::Topic' Properties: TopicName: SampleTopic Subscription: - Endpoint: !Ref EmailAdrs Protocol: email RdsEventSubscription: Type: 'AWS::RDS::EventSubscription' Properties: SubscriptionName: Rdsfailure Enabled: true SnsTopicArn: Ref: snstopic SourceType: db-instance EventCategories: - failure SourceIds: - !Ref DBinstance

profile picture
已提问 2 年前286 查看次数
2 回答
2
已接受的回答

Hi There

There are only certain AWS-Specific parameters that are supported in a drop-down list. AWS::RDS::DBInstanceIdentifier is not supported. You are correct though that ec2 instance is one of the supported parameters which explains why it worked for you in that case. You can use a custom list of AllowedVaulues for your RDS instances but you would need to keep it updated.

See this URL for the full list of supported AWS-Specific Parameter types

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html#aws-specific-parameter-types

profile pictureAWS
专家
Matt-B
已回答 2 年前
profile pictureAWS
专家
Chris_G
已审核 2 年前
  • thanks Maat-b for the help and guide about CSV method.. is it possible for you to please share any link or yml code how to import a list using CSV

  • You can do something like this in your template

    DBinstance: 
        AllowedValues:
            - Instance1
            - Instance2
            - Instance3
        Type: String 
        Default: Instance1
        Description: Select Your Instance from Dropdown list.
    
0

great I checked and test the code it is working perfectly thanks for help

profile picture
已回答 2 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则