View a markdown version of this page

Installing the AWS Systems Manager Cloud Extensions runtime - AWS Systems Manager

Installing the AWS Systems Manager Cloud Extensions runtime

The Cloud Extensions runtime manages extension lifecycle, permissions, updates, and telemetry. AWS Systems Manager Cloud Extensions supports two installation methods: as an AWS Lambda extension, and as a container image from Amazon ECR. The Systems Manager console doesn't install the runtime. You install the runtime yourself, in each Lambda function or container that uses Cloud Extensions.

Install for Lambda functions

AWS Systems Manager Cloud Extensions publishes its Lambda extension ARNs as public parameters in AWS Systems Manager Parameter Store. Use the ARN for your Lambda function's architecture.

Step 1: Get the extension ARN

For x86_64 functions:

aws ssm get-parameter \ --name /aws/service/aws-cloudextensions/lambda-extension/amd64/latest \ --query 'Parameter.Value' \ --output text

For arm64 functions:

aws ssm get-parameter \ --name /aws/service/aws-cloudextensions/lambda-extension/arm64/latest \ --query 'Parameter.Value' \ --output text

Step 2: Add the extension to your function

Add the ARN as a layer on your Lambda function:

aws lambda update-function-configuration \ --function-name my-function \ --layers extension-arn

To add it at function creation:

aws lambda create-function \ --function-name my-function \ --runtime python3.12 \ --role arn:aws:iam::123456789012:role/my-function-role \ --handler index.handler \ --zip-file fileb://function.zip \ --layers extension-arn

Step 3: Verify the extension is running

After your Lambda function invokes, check the logs for startup messages from the runtime:

INFO starting version=1.0.430 INFO serving http addr=localhost:5333 INFO retrieved profile from service profile=my-application profileId=3jzf0v5xs4m INFO profile loaded extensions=1

Infrastructure as code

AWS CloudFormation:

Resources: MyFunction: Type: AWS::Lambda::Function Properties: FunctionName: my-function Runtime: python3.12 Role: !GetAtt MyFunctionRole.Arn Handler: index.handler Code: ZipFile: | def handler(event, context): return {"statusCode": 200} Layers: - !Sub - "{{resolve:ssm:/aws/service/aws-cloudextensions/lambda-extension/amd64/latest}}" - {}

AWS Cloud Development Kit (AWS CDK):

import * as lambda from 'aws-cdk-lib/aws-lambda'; import * as ssm from 'aws-cdk-lib/aws-ssm'; const extensionArn = ssm.StringParameter.valueForStringParameter( this, '/aws/service/aws-cloudextensions/lambda-extension/amd64/latest' ); const fn = new lambda.Function(this, 'MyFunction', { runtime: lambda.Runtime.PYTHON_3_12, handler: 'index.handler', code: lambda.Code.fromAsset('lambda'), layers: [ lambda.LayerVersion.fromLayerVersionArn(this, 'CloudExtensionsLayer', extensionArn) ], });

Install for containers

For containerized applications, pull the Cloud Extensions runtime image from Amazon ECR and use it as a base image or sidecar.

Pull the runtime image

docker pull public.ecr.aws/aws-cloudextensions/runtime:1.x

The image includes the Cloud Extensions runtime.

Use as a base image

Add Cloud Extensions to your existing container by using it as a base image:

FROM public.ecr.aws/aws-cloudextensions/runtime:1.x AS runtime FROM your-base-image:latest # Copy the runtime binary from the Cloud Extensions image COPY --from=runtime runtime-binary-path runtime-binary-path # Start both the runtime and your application CMD aws-cloudx-rt run & exec /app/start.sh

Use as a sidecar container

For orchestrators that support sidecar containers, run the runtime alongside your application container:

Docker Compose example:

services: app: image: my-app:latest depends_on: - cloud-extensions-runtime environment: - CLOUD_EXTENSIONS_ENDPOINT=http://localhost:5333 cloud-extensions-runtime: image: public.ecr.aws/aws-cloudextensions/runtime:1.x network_mode: "service:app" environment: - AWS_REGION=us-east-1

Configuration options

The runtime accepts configuration through command-line flags or environment variables.

HTTP endpoint

Host and port where extensions listen for requests:

aws-cloudx-rt run --http-host localhost --http-port 5333

Default: localhost:5333. To disable the HTTP endpoint, set --http-port 0.

Profile name

Name of the Cloud Extensions profile to load:

aws-cloudx-rt run --profile my-profile

Default: $default

Poll interval

How often the runtime checks for profile updates:

aws-cloudx-rt run --poll-interval 45000ms

Default: 45000ms (45 seconds)

Log level

Verbosity of runtime logs:

aws-cloudx-rt run --log-level info

Values: debug, info, warn, error, none. Default: info

Service region

AWS region for service calls:

aws-cloudx-rt run --service-region us-west-2

Default: Determined from instance metadata or AWS configuration.

Proxy configuration

Configure an HTTP or HTTPS proxy:

aws-cloudx-rt run --proxy-url https://proxy.example.com:8080

Request timeout

Duration the runtime waits for AWS service responses:

aws-cloudx-rt run --request-timeout 15000ms

Default: 15000ms (15 seconds)

Runtime behavior

When the runtime starts:

  1. Profile retrieval – The runtime retrieves the configured profile from the Cloud Extensions service

  2. Extension loading – The runtime loads each extension that you configured in the profile

  3. HTTP routes – The runtime registers HTTP routes for each extension at localhost:5333/extension-path

  4. Polling – The runtime polls for profile changes every 45 seconds

  5. Automatic updates – When you add, remove, or update extensions in the profile, the runtime applies the changes automatically

Profile synchronization

The runtime checks for profile updates every 45 seconds. When you add or remove an extension from the profile, or update extension configuration, the runtime applies those changes within one poll cycle without restarting.

Extension hash verification

When loading extensions, the runtime verifies the extension hash. If a hash mismatch occurs, the runtime logs a warning, refetches the correct version from the service, and loads the updated extension.

Next steps