Using base64 encoded shell script as part of config impact the confidentiality of data provided resource is exploited.
For more information on how to setup launch configurations, see the AWS documentation.
In Terraform -
References:
https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-asg-launch-configuration.html
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration