huao
huao

Reputation: 554

how do i access an existing ec2 instance through another instance in cloudformation template?

I have created 2 aws ec2 instances by using the aws- cloudformation template. Let's say i have the first instance to set up the oracle database, and the second instance to set up my server(there's one tool thats been included on the server side would set up the connection between database and server, and also create the database schema for the database). So my problem now is, is there a way I can update my database instance information(like, run some sql command) after the server got kicked up without writing any new java code? but update the info through the user data of the server instance? thanks in advanced.

Upvotes: 0

Views: 136

Answers (1)

bsvingen
bsvingen

Reputation: 2759

User data scripts are only applied when the instance is first launched (see user-data.html).

If you want to run SQL against your database, you can do that like you would with any other database server, using the client of your choice.

Upvotes: 1

Related Questions