Running bash script in Member accounts

0

How to run bashscript in all the member accounts and whenever they join using stacksets

Keerthi
asked a month ago132 views
1 Answer
1

Hello.

Do you want to run your Bash script inside an EC2 instance?
If you want to run it within EC2, I think you can use something like Systems Manager's RunCommand.
I think it is possible if you configure EventBridge and Lambda to execute RunCommand when "CreateStack" is executed within a member account.
Alternatively, I think it is possible to create a custom CloudFormation resource and execute RunCommand when the stack is created.
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-custom-resources-lambda.html

profile picture
EXPERT
answered a month ago
profile picture
EXPERT
reviewed a month ago
profile picture
EXPERT
reviewed a month ago