Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

JavaScript runtime features for CloudFront Functions

Focus mode
JavaScript runtime features for CloudFront Functions - Amazon CloudFront

The CloudFront Functions JavaScript runtime environment is compliant with ECMAScript (ES) version 5.1 and also supports some features of ES versions 6 through 12.

For the most up-to-date features, we recommend that you use JavaScript runtime 2.0.

The JavaScript runtime 2.0 features has the following changes compared to 1.0:

  • Buffer module methods are available

  • The following non-standard string prototype methods are not available:

    • String.prototype.bytesFrom()

    • String.prototype.fromBytes()

    • String.prototype.fromUTF8()

    • String.prototype.toBytes()

    • String.prototype.toUTF8()

  • The cryptographic module has the following changes:

    • hash.digest() – Return type is changed to Buffer if no encoding is provided

    • hmac.digest() – Return type is changed to Buffer if no encoding is provided

  • For more information about additional new features, see JavaScript runtime 2.0 features for CloudFront Functions.

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.