Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Architect Deploy changelog

## [5.0.8] 2024-06-06

### Fixed

- Handle CDN invalidations only if CDN explicitly enabled

---

## [5.0.8] 2025-01-23
Expand Down
4 changes: 2 additions & 2 deletions src/sam/02-after/00-get-app-apex/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ module.exports = function getAppApex (params, callback) {
else callback()
},
function invalidateS3 (callback) {
if (s3 && !creatingS3 && !enablingS3 && !destroyingS3) {
if (cdnEnabled && s3 && !creatingS3 && !enablingS3 && !destroyingS3) {
update.status('Invalidating static asset (S3) CDN distribution cache')
aws.cloudfront.CreateInvalidation({
Id: s3.id,
Expand Down Expand Up @@ -132,7 +132,7 @@ module.exports = function getAppApex (params, callback) {
else callback()
},
function invalidateApiGateway (callback) {
if (apigateway && !creatingApiGateway && !enablingApiGateway && !destroyingApiGateway) {
if (cdnEnabled && apigateway && !creatingApiGateway && !enablingApiGateway && !destroyingApiGateway) {
update.status('Invalidating API Gateway CDN distribution cache')
aws.cloudfront.CreateInvalidation({
Id: apigateway.id,
Expand Down