AWS Tools for TYPO3 

Extension key

aws_tools

Version

12.0

Language

en

Copyright

2020

Authors

Marcus Balasch, Leuchtfeuer Digital Marketing

Email

dev@Leuchtfeuer.com

License

This extension documentation is published under the CC BY-NC-SA 4.0 (Creative Commons) license.

This extension connects your TYPO3 instance to Amazon CloudFront. It rewrites all file paths in the frontend to match your CDN domain. You also have the possibility (at several places) to invalidate Amazon CloudFront entries.

To figure out which extension version is supported by your TYPO3 instance, take a quick look at our version matrix.

TYPO3

The content of this document is related to TYPO3 CMS, a GNU/GPL CMS/Framework available from typo3.org.

Community Documentation

This documentation is community documentation for the TYPO3 extension AWS Tools.

It is maintained as part of this third party extension.

If you find an error or something is missing, please: Report a Problem

For Contributors

You are welcome to help improve this guide. Just click on "Edit on GitHub" on the top right to submit your change request.

Sitemap

For Administrators 

Installation 

There are several ways to require and install this extension. We recommend to get this extension via composer.

Via Composer 

If your TYPO3 instance is running in composer mode, you can simply require the extension by running:

composer req leuchtfeuer/aws-tools
Copied!

Via Extension Manager 

Open the extension manager module of your TYPO3 instance and select “Get Extensions” in the select menu above the upload button. There you can search for aws_tools and simply install the extension. Please make sure you are using the latest version of the extension by updating the extension list before installing the AWS Tools extension.

Via ZIP File 

You need to download the AWS Tools extension from the TYPO3 Extension Repository and upload the zip fileto the extension manager of your TYPO3 instance and activate the extension afterwards.

Configuration 

To activate the Content Delivery Network and to be able to invalidate Amazon CloudFront entries, several settings are necessary, which have to be carried out in different places (TypoScript, Site Configuration, Extension Configuration, ...).

Site Configuration 

The Content Delivery Network (CDN) can be enabled and configured (regardless if Amazon CloudFront is used) in the language configuration of the page configuration. The CDN can be enabled or disabled per domain and per language.

CDN Settings within the Site Configuration

CDN Settings within the Site Configuration

Rewrite File Paths 

All paths to assets located in resource stores (fileadmin, etc.) are automatically rewritten by a TYPO3 interface. Since not all files are "fetched" by this mechanism, file paths (e.g. paths to stylesheets or JavaScript and fonts located in a separate site extension) configured in the TypoScript setup are rewritten by a regular expression.

config.tx_awstools {
    enabled = 1

    patterns {
        10 {
            search = "/typo3temp/
            replace = "%s/typo3temp/
        }

        20 {
            search = "/typo3conf/
            replace = "%s/typo3conf/
        }
    }

    replacer {
        eventListener = 1
        middleware = 1
    }
}
Copied!

The "patterns" option can be extended by any number of additional entries. Each property must have the keys "search" and "replace". The %s in the replace property will be replaced by the previously configured CDN domain.

Additionally, the value config can be used to deactivate content replacement. This will disable path rewriting in frontend.

There are two replacer mechanisms which can be individually enabled/disabled with the replacer options. middleware takes care of rewriting URLs within the HTML body which is generated by TYPO3. It only rewrites domains in the HTML code. If CDN domains for resources are required before rendering the HTML the option eventListener can be used which hooks into the GeneratePublicUrlForResourceEvent and rewrites domains directly when public URLs of resources are generated.

Extension Configuration 

In the extension configuration you enter the access data for your AWS account (Access Key ID and Secret Access Key). In addition, you must select the region over which the requests to the AWS servers to invalidate entries should run. On the CloudFront tab, you can specify a comma-separated list of distributions where your assets are stored.

AWS Tools extension configuration

AWS Tools extension configuration

Access Protection 

Appropriate permissions are required so that users can invalidate the Amazon CloudFront entries. The permissions can be granted in the backend group or user data record (invalidateFile or invalidateFolder).

Configure permissions for users or groups

Configure permissions for users or groups

Invalidate Amazon CloudFront Entries 

Amazon CloudFront entries are partially invalidated automatically or can be manually declared invalid by the user or command line calls.

Symfony Command (CLI Only) 

Amazon CloudFront entries can be invalidated via a CLI call. The command expects one or more paths (to files or folders).

vendor/bin/typo3cms aws:cf:invalidate PATH_1 PATH_2 [...] PATH_X
Copied!

The command can be executed after a deployment, for example. This command is not available as scheduler task.

File List Module 

Amazon CloudFront entries can be invalidated using the File List module. Depending on user permissions (see: below) files or whole paths can be invalidated.

Invalidate entries in the File List module

Invalidate entries in the File List module

Automatic Invalidation on Overwriting 

Amazon CloudFront entries will be invalidated automatically after overwriting an existing file in the file list module - regardless of the authorizations of the user.

Backend Module 

A dedicated backend module (only accessible for administrators) offers another possibility to invalidate Amazon CloudFront entries. The module also lists the last ten requests (per distribution) to the AWS server.

Backend view of the AWS Tools module

Backend view of the AWS Tools module

Backend view of the AWS Tools module after invalidating entries

Backend view of the AWS Tools module after invalidating entries

About 

This extension connects your TYPO3 instance to Amazon CloudFront. It rewrites all file paths in the frontend to match your CDN domain. You also have the possibility (at several places) to invalidate Amazon CloudFront entries.

Compatibility 

We are currently supporting following TYPO3 versions:

Extension Version TYPO3 v12 Support TYPO3 v11 Support TYPO3 v10 Support
12.x yes no no
11.x no yes no
10.x no no yes

About Amazon CloudFront 

Amazon CloudFront is a fast content delivery network (CDN) service that securely delivers data, videos, applications, and APIs to customers globally with low latency, high transfer speeds, all within a developer-friendly environment. CloudFront is integrated with AWS – both physical locations that are directly connected to the AWS global infrastructure, as well as other AWS services. CloudFront works seamlessly with services including AWS Shield for DDoS mitigation, Amazon S3, Elastic Load Balancing or Amazon EC2 as origins for your applications, and Lambda@Edge to run custom code closer to customers’ users and to customize the user experience. Lastly, if you use AWS origins such as Amazon S3, Amazon EC2 or Elastic Load Balancing, you don’t pay for any data transferred between these services and CloudFront.

Contributing 

You can contribute by making a pull request to the master branch of the extension repository on GitHub. Or just send us some beers 🍻...

Documentation 

You are welcome to help improve this guide. Just click on "Edit on GitHub" on the top right to submit your change request.

Changelog 

This chapter provides an overview of changes. Take a deeper look on a version listed below, to see which bugs have been fixed, which new features have been introduced, and what you should not use anymore.

List of Versions 

Version 12.0.2 - 2026/01/13 

  • Update external libraries

Download 

Download this version from the TYPO3 extension repository or from GitHub.

All Changes 

This is a list of all changes in this release:

2026-01-13 [TASK] Update external library aws-sdk-php (Commit b9ee3bc by engel)
Copied!

Version 12.0.1 - 2024/09/18 

  • Some Bugfixes

Download 

Download this version from the TYPO3 extension repository or from GitHub.

All Changes 

This is a list of all changes in this release:

2024-09-18 [BUGFIX] Add missing event listener for file deletion [TER-239] [TER-238] (#22) (Commit dbf14f5 by Marcus Balasch)
2024-09-18 [BUGFIX] Fix wrong CDN url generation for files like .youtube or .vimeo (#11) (Commit 465c0e7 by David Kranz)
2024-04-24 Merge pull request #21 from Leuchtfeuer/bugfix/ensure_typoscript_is_loaded (Commit ef6905b by bmheins)
2024-04-17 Merge branch 'master' into bugfix/ensure_typoscript_is_loaded (Commit 90bf7fa by bmheins)
2024-04-17 [TASK] Ensure TypoScript is loaded in CdnEventListener class (Commit 2a990f6 by Oliver Heins)
2024-04-16 [TASK] Update documentation for release 11.0.2 (Commit ffcb15e by Niklas Grieger)
2024-04-16 Merge pull request #16 from Leuchtfeuer/bugfix/ensure_language_is_set_20240411233 (Commit 1767bde by Niklas Grieger)
2024-04-16 Merge pull request #19 from Leuchtfeuer/release/11.0.2 (Commit 8c3c5bc by Niklas Grieger)
2024-04-16 [TASK] Prepare release 11.0.2 (Commit 3995b50 by Niklas Grieger)
2024-04-15 Merge pull request #17 from Leuchtfeuer/master (Commit ad63055 by bitmotionAE)
Copied!

Version 12.0.0 - 2024/04/16 

  • Add support for TYPO3 12
  • Drop support for TYPO3 11

Download 

Download this version from the TYPO3 extension repository or from GitHub.

All Changes 

This is a list of all changes in this release:

2024-04-16 Merge branch 'bugfix/ensure_language_is_set_20240411233' into typo3v12 (Commit 466a77c by Oliver Heins)
2024-04-12 [TASK] Ensure language array is set (Commit a299c55 by Oliver Heins)
2024-01-16 [TASK] Reactivate option to enable/disable url replacement via typoscript (Commit 24e8e68 by Andreas Engel)
2024-01-16 [TASK] Update external libraries (Commit a14aafc by Andreas Engel)
2024-01-12 [TASK] Apply rector changes (Commit b9cf1c6 by Andreas Engel)
2024-01-12 [TASK] Multiple adjustments for TYPO3 12 compatibility (Commit 458a116 by Andreas Engel)
2024-01-10 [TASK] Fix TYPO3_MODE checks (Commit ff3ce6f by Andreas Engel)
2024-01-10 [TASK] Fix TYPO3_MODE check in ext_tables.php (Commit f6514bd by Andreas Engel)
2024-01-10 [TASK] Raise requirements to TYPO3 12 (Commit 297796a by Andreas Engel)
Copied!

Version 11.0.3 - 2024/09/18 

  • Some Bugfixes

Download 

Download this version from the TYPO3 extension repository or from GitHub.

All Changes 

This is a list of all changes in this release:

2024-09-18 [BUGFIX] Add missing event listener for file deletion [TER-239] [TER-238] (#22) (Commit 29ab061 by Marcus Balasch)
2024-09-18 [BUGFIX] Fix wrong CDN url generation for files like .youtube or .vimeo (#11) (Commit 7b5cbad by David Kranz)
Copied!

Version 11.0.2 - 2024/04/16 

  • Fix prefix of generatePublicUrlForResource event-listener
  • Ensure language array is set

Download 

Download this version from the TYPO3 extension repository or from GitHub.

All Changes 

This is a list of all changes in this release:

2024-04-16 Merge pull request #16 from Leuchtfeuer/bugfix/ensure_language_is_set_20240411233 (Commit 1767bde by Niklas Grieger)
2024-04-15 Merge pull request #17 from Leuchtfeuer/master (Commit ad63055 by bitmotionAE)
2024-04-12 [TASK] Ensure language array is set (Commit a299c55 by Oliver Heins)
2024-03-26 Merge pull request #15 from doppelD-LF/master (Commit f2e4f3a by Daniel Diele)
2024-03-26 [BUGFIX] Fix prefix of generatePublicUrlForResource event-listener (Commit aac1307 by Daniel Diele)
2023-11-21 Merge pull request #12 from Leuchtfeuer/typo3-11 (Commit 8d3995f by bitmotionAE)
2023-11-08 Merge pull request #10 from Leuchtfeuer/typo3-11 (Commit eee258a by bitmotionAE)
Copied!

Version 11.0.1 - 2023/11/16 

  • Update extension documentation

Download 

Download this version from the TYPO3 extension repository or from GitHub.

All Changes 

This is a list of all changes in this release:

2023-11-16 [TASK] Update documentation (Commit 74ca04f by Andreas Engel)
Copied!

Version 11.0.0 - 2023/11/02 

  • Add TYPO3 11 support

Download 

Download this version from the TYPO3 extension repository or from GitHub.

All Changes 

This is a list of all changes in this release:

2023-11-02 Merge remote-tracking branch 'origin/master' into typo3-11 (Commit e5737c6 by Andreas Engel)
2023-11-02 [TASK] Update external libraries (Commit 3d6aee6 by Andreas Engel)
2023-06-30 [BUGFIX] Fix path for invalidation via filelist module (#4) (Commit 0e7d068 by bitmotionAE)
2023-06-30 Fix undefined array key "awstools_cdn_enabled" warnings (#6) (Commit 3942b16 by André Buchmann)
2023-06-21 [TASK] Add possibility to deactivate url replacement through eventlistener or middleware (#8) (Commit f5be17c by Fabian Martin)
2022-04-14 [TASK] Migrate ext_tables.php (Commit 0c1800f by Andreas Engel)
2022-04-14 [TASK] Fix translation (Commit 13094e1 by Andreas Engel)
2022-04-13 [TASK] Add option to disable content replacement in frontend via TypoScript (Commit a3fca21 by Andreas Engel)
2022-04-12 [TASK] Fix base uri comparison (Commit 134add9 by Andreas Engel)
2022-04-11 [TASK] Fix type casting error (Commit 94497d1 by Andreas Engel)
2022-04-07 [TASK] Handle cases with non-available request object (Commit 2d7262e by Andreas Engel)
Copied!

Version 10.0.0 - 2023/06/30 

  • Add possibility to deactivate url replacement through eventlistener or middleware
  • Changes the major version number of the extension equivalent to the supported TYPO3 version.

Download 

Download this version from the TYPO3 extension repository or from GitHub.

All Changes 

This is a list of all changes in this release:

2023-06-30 [TASK] change author (Commit 9175f48 by Marcus Balasch)
2023-06-21 [TASK] Add possibility to deactivate url replacement through eventlistener or middleware (#7) (Commit cc63e72 by Fabian Martin)
2022-03-28 [TASK] Inlucde latest vendor package changes (Commit 43e4fa3 by Max Rösch)
Copied!

Version 1.0.2 - 2021/06/29 

This is regular maintenance release. It contains bug fixes only.

Download 

Download this version from the TYPO3 extension repository or from GitHub.

All Changes 

This is a list of all changes in this release:

2021-06-29 [TASK] Cast to bool with default value (Commit 3a9bc53 by Florian Wessels)
2021-05-05 [BUGFIX] Use extension key as string (Commit 093e228 by Florian Wessels)
Copied!

Version 1.0.1 - 2021/03/24 

This is regular maintenance release. It contains bug fixes only.

Download 

Download this version from the TYPO3 extension repository or from GitHub.

All Changes 

This is a list of all changes in this release:

2021-03-24 [RELEASE] Release of version 1.0.1 (Commit e01a077 by Florian Wessels)
2021-03-24 [TASK] Raise dependencies (Commit 54c7d2c by Florian Wessels)
2020-10-30 [TASK] Cast awstools_cdn_enabled value to bool (#1) (Commit dc4896e by Florian Wessels)
2020-09-18 [BUGFIX] Load JS only in BE mode (Commit 14f538d by Florian Wessels)
2020-09-18 [TASK] Use unique class names within svg files (Commit 0eba7a2 by Florian Wessels)
Copied!

Version 1.0.0 - 2020/08/24 

This is the initial TER release of this extension.

Download 

Download this version from the TYPO3 extension repository or from GitHub.

Added 

  • Method for invalidating entries in multiple distributions

All Changes 

This is a list of all changes in this release:

2020-08-24 [DOC] Add release notes for version 1.0.0 (Commit b679e94 by Florian Wessels)
2020-08-24 [DOC] Adapt toctree implementation (Commit 2186fe8 by Florian Wessels)
2020-08-24 [BUGFIX][DOC] Use proper tag name (Commit 731a7c8 by Florian Wessels)
2020-08-24 [FOLLOW-UP][TASK] Unify variables containing distribution ids (Commit 7ec7fc4 by Florian Wessels)
2020-08-24 [DOC] Introduce php doc (Commit 73bf916 by Florian Wessels)
2020-08-24 [TASK] Add method to invalidate files in multiple distributions (Commit 1ff1ad0 by Florian Wessels)
2020-08-24 [TASK] Improve JavaScript (Commit 340623f by Florian Wessels)
2020-08-24 [TASK] Improve error handling (Commit b59a38b by Florian Wessels)
2020-08-24 [TASK] Split methods (Commit 32330fe by Florian Wessels)
2020-08-24 [TASK] Unify variables containing distribution ids (Commit b940374 by Florian Wessels)
2020-08-24 [TASK] Set version to 1.0.0-dev (Commit e141dfd by Florian Wessels)
2020-08-20 [BUGFIX] Adapt file permissions (Commit c5e1e56 by Florian Wessels)
Copied!

Version 0.1.0 - 2020/08/20 

This is the initial release of this extension.

Download 

Download this version from the TYPO3 extension repository or from GitHub.

All Changes 

This is a list of all changes in this release:

2020-08-20 [TASK] Add further language labels (Commit 3a059c5 by Florian Wessels)
2020-08-20 [TASK] Rename configuration variable (Commit 061c1a3 by Florian Wessels)
2020-08-20 [TASK] Remove test related properties from composer.json (Commit 3825b52 by Florian Wessels)
2020-08-20 [TASK] Update title and description of this extension (Commit abe2448 by Florian Wessels)
2020-08-20 [TASK] Apply CS (Commit 9cde82f by Florian Wessels)
2020-08-20 [DOC] Adapt wording (Commit 9bbbd8a by Florian Wessels)
2020-08-20 [BUGFIX] Use proper links to packagist.org (Commit e15110c by Florian Wessels)
2020-08-20 [TASK] Remove obsolete comments (Commit 17f9579 by Florian Wessels)
2020-08-20 [DOC] Add documentation (Commit 6e92e5c by Florian Wessels)
2020-08-20 Initial commit (Commit 1571d32 by Florian Wessels)
Copied!

Sitemap