'What's the difference between buildspec, appspec, and rolling my own AMI?

I'm fairly confused about how the buildspec.yml and the appspec.yml files differ from one another, aside from structure. It doesn't seem like the phase commands from my buildspec have much effect on the deployment environment, and there is similar ambiguity between which appspec hook to use when running a procedure, like an installation. So long as the procedure happens before the phase that needs it, I don't see the difference in the phases. (I have read the spec reference docs; they mostly confirm that the phases are titled for their purpose, but not really what the purpose is.)

As an example, why wouldn't I just bake my own AMIs with packer each time I had to do a deployment, and then standup a new host and attach the AMI?



Sources

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

Source: Stack Overflow

Solution Source