Skip to content

Commit d3116f4

Browse files
committed
Handle CDN invalidations only if CDN explicitly enabled
1 parent 202f840 commit d3116f4

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

changelog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Architect Deploy changelog
22

3+
## [5.0.8] 2024-06-06
4+
5+
### Fixed
6+
7+
- Handle CDN invalidations only if CDN explicitly enabled
8+
39
---
410

511
## [5.0.7] 2024-04-30

src/sam/02-after/00-get-app-apex/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ module.exports = function getAppApex (params, callback) {
8888
else callback()
8989
},
9090
function invalidateS3 (callback) {
91-
if (s3 && !creatingS3 && !enablingS3 && !destroyingS3) {
91+
if (cdnEnabled && s3 && !creatingS3 && !enablingS3 && !destroyingS3) {
9292
update.status('Invalidating static asset (S3) CDN distribution cache')
9393
aws.cloudfront.CreateInvalidation({
9494
Id: s3.id,
@@ -132,7 +132,7 @@ module.exports = function getAppApex (params, callback) {
132132
else callback()
133133
},
134134
function invalidateApiGateway (callback) {
135-
if (apigateway && !creatingApiGateway && !enablingApiGateway && !destroyingApiGateway) {
135+
if (cdnEnabled && apigateway && !creatingApiGateway && !enablingApiGateway && !destroyingApiGateway) {
136136
update.status('Invalidating API Gateway CDN distribution cache')
137137
aws.cloudfront.CreateInvalidation({
138138
Id: apigateway.id,

0 commit comments

Comments
 (0)