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
asked 2 years ago277 views
2 Answers
2
Accepted Answer

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
EXPERT
Matt-B
answered 2 years ago
profile pictureAWS
EXPERT
Chris_G
reviewed 2 years ago
  • 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
answered 2 years ago

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