Relative Content

Tag Archive for amazon-web-servicesaws-cloudformationlocal-files

Cloudformation refer resources on local files

I’ve just started with CloudFormation. My goal is to keep the template files shorter and cleaner. Is there a way in CloudFormation for the main template to refer to resources from locally stored files? For example, let’s say I have a template for creating an EC2 resource and its corresponding IAM role. If I want to separate the IAM role from the main template and keep it in a different file, such as “iam-role.yml,” can the main template retrieve the values from “iam-role.yml”? The closest option I could find in the documentation was “Transform: AWS::Include,” but it doesn’t seem to support local files but files kept in s3.