Skip to content
This repository has been archived by the owner on Jul 11, 2020. It is now read-only.

Latest commit

 

History

History
19 lines (13 loc) · 883 Bytes

23-add-a-custom-cloud-formation-stack-output-with-cdk.md

File metadata and controls

19 lines (13 loc) · 883 Bytes

Add a custom CloudFormation stack output with CDK

📹 Video

Let's fix the missing logo at the bottom of our todo application. We need to tell our frontend application to source it from our s3 logoBucket.

Instead of manually searching for the logo url in our aws console (not a true hacker move!), we can output the url in our terminal with each deployment.

To do that, let's modify the output in our stack file by adding this:

new cdk.CfnOutput(this, "LogoPath", {
    // add the name of your bucket and your file (in the assets folder)
    value: `https://${logoBucket.bucketDomainName}/testFile.png`
});

👍 Once you deploy, you should see the logo path in the output section.

Now go to the frontend application and add this url as the logo src (in app.tsx).