Skip to content

Add AWS ECR deployment section to serverless worker deployment guide #324

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
27 changes: 27 additions & 0 deletions serverless/workers/deploy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,33 @@ If your worker fails to start or process requests:
4. Check that your Docker image is compatible with the selected GPU type.
5. Verify your input format matches what your handler expects.

## Deploying from AWS ECR

You can deploy Serverless workers from AWS Elastic Container Registry (ECR), but this requires additional setup due to ECR's credential expiration policy.

To deploy from ECR, you'll need:

* An AWS account with ECR access.
* An ECR repository containing your worker image.
* A Runpod account with [API access](/get-started/api-keys).

### Setting up credential automation

ECR credentials expire every 12 hours, so you'll need to automate credential updates. The recommended approach is to use an AWS Lambda function that refreshes your Runpod container registry credentials:

1. **Create an AWS Lambda function** that runs every few hours to refresh ECR credentials.
2. **Configure the Lambda function** to call Runpod's container registry API to programmatically update stored credentials.

You can use the Runpod GraphQL API [saveRegistryAuth mutation](https://graphql-spec.runpod.io/#mutation-saveRegistryAuth) to programmatically update credentials in your Lambda function.

### Deploying your ECR image

Once you have credential automation in place:

1. **Push your image to ECR** following standard ECR procedures.
2. **Configure container registry credentials** in the Runpod console with your ECR repository URL and current credentials.
3. **Create your Serverless endpoint** using the ECR image URL for the **Container Image** field: `[AWS_ACCOUNT_ID].dkr.ecr.[REGION].amazonaws.com/[REPOSITORY_NAME]:[TAG]`

## Next steps

After successfully deploying your worker, you can:
Expand Down