'ci/cd using circleci with aws autoscaling group

I have web site project where i need to use ci/cd from circleci and host the website in AWS using auto scaling group .

In circleci jobs I need start job (for ex: deploy infrastructure) to start infrastructure for AWS EC2 with auto scaling group and need another job (for ex configure backend) in ci/cd to configure EC2 instances with my website requirements

The problem here while website working if having more traffic and need new EC2 instance to be launched , this new instance will be launched with only launch configuration set in job ( deploy infrastructure) and missing configurations added in job (configure backend) so I need all configurations required for my website in EC2 instances to be added in launch configuration for auto scaling group cloudformation in job of (deploy infrastructure) , or having any suggestions ???



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source