AWS CloudFormation now supports a new intrinsic function, Fn::GetStackOutput, that enables you to reference stack outputs across AWS accounts and Regions directly within your CloudFormation templates and CDK applications. This new capability simplifies the provisioning and management of multi-account and multi-Region workloads in CloudFormation and CDK, and eliminates deployment deadlocks when restructuring cross-stack dependencies in CDK apps.
When managing multi-account AWS environments, teams often need to share infrastructure values, such as VPC IDs or database endpoints, across account boundaries. Previously, achieving this required multiple steps, including copying values between templates or coordinating parameter updates across teams. Now, with Fn::GetStackOutput, you simply specify the target stack name, output key, an IAM role ARN for cross-account access, and optionally a Region. CloudFormation assumes the specified role, retrieves the output value, and resolves it during template processing, reducing manual coordination and the risk of configuration drift. In CDK applications, cross-account and cross-Region references now use this function automatically, eliminating the need for custom resources and SSM parameters that the previous approach required. Customers can also call Fn.getStackOutput directly to create weak references between stacks, simplifying stack refactoring.
To get started, add the Fn::GetStackOutput function to your CloudFormation template and configure the appropriate IAM permissions for cross-account access. In CDK, cross-account and cross-Region references use this function automatically. Visit the AWS CloudFormation User Guide or the CDK developer guide to learn more.
This feature is available in all AWS Regions where CloudFormation is supported. Refer to the AWS Region table for service availability details.
Categories:
Source: Amazon Web Services
Latest Posts
- AWS RTB Fabric supports custom domains for real-time bidding workloads
- Reference stack outputs across accounts and Regions with AWS CloudFormation and CDK

- ARC Region switch adds Lambda event source mapping execution block for event handling during failover

- (Updated) Microsoft Loop – User Accessible Recycle Bin for Loop workspaces [MC929021]
![(Updated) Microsoft Loop – User Accessible Recycle Bin for Loop workspaces [MC929021] 4 pexels nickcollins 1293006](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==)



![(Updated) Microsoft Loop – User Accessible Recycle Bin for Loop workspaces [MC929021] 4 pexels nickcollins 1293006](https://mwpro.co.uk/wp-content/uploads/2024/08/pexels-nickcollins-1293006-150x150.webp)