I want to store the Cfnoutputs in AWS-CDK to a file(Python).
Below is the code to show Public IP on console.
my_ip = core.CfnOutput(
scope=self,
id="PublicIp",
value=my_ec2.instance_public_ip,
description="public ip of my instance",
export_name="my-ec2-public-ip")
I have tried using redirecting the output in Python by using command:
cdk deploy * > file.txt
But no success.
Please help