Commit 5effc9f
authored
fix: CloudFormation timeout if $AWS_ENDPOINT_URL_S3 is set during
The CLI asks the SDK for the URL to an S3 bucket, in order to pass it to
CloudFormation. CloudFormation will then attempt to contact S3 on that
URL in order to download the template.
A feature of the the SDK is to respect the `$AWS_ENDPOINT_URL_S3`
environment variable, which can be used to override the S3 endpoint that
the SDK will hit; you might use this if you have private VPC endpoints
for a number of AWS services.
The problem arises that `$AWS_ENDPOINT_URL_S3` also affects the URL that
the CDK CLI passes to CloudFormation. This will most likely be an
endpoint that is not routable for CloudFormation like
`https://vpce-xxx.s3.us-east-1.vpce.amazonaws.com`, and CloudFormation
will time out waiting for the template download.
To get around this, we will temporarily unset `$AWS_ENDPOINT_URL_S3` for
the duration of calling the SDK to provide us with a URL.
---
By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache-2.0 licensecdk deploy (#933)1 parent 96fda68 commit 5effc9f
File tree
2 files changed
+62
-10
lines changed- packages/@aws-cdk/toolkit-lib
- lib/api/cloudformation
- test/api/cloudformation
2 files changed
+62
-10
lines changedLines changed: 35 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
103 | 115 | | |
104 | | - | |
| 116 | + | |
105 | 117 | | |
106 | 118 | | |
107 | 119 | | |
| |||
127 | 139 | | |
128 | 140 | | |
129 | 141 | | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
137 | 157 | | |
138 | | - | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
139 | 164 | | |
Lines changed: 27 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
0 commit comments