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 年前檢視次數 285 次
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 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南