Nitin k
Nitin k

Reputation: 185

How to update the image uri of apprunner usinbg aws cli?

I was trying to up[date the image uri of source in aws apprunner using below command.

  aws apprunner update-service --service-arn arn:aws:apprunner:us-east-1:*:service/next-js/* --source-configuration ImageRepository={clp-ui-qa,some-tag} --region us-east-1

but its not working

and giving me the below error


Unknown options: ImageRepository=some-tag

Upvotes: 0

Views: 480

Answers (1)

user3636989
user3636989

Reputation: 181

AWS cli command for updating image for Apprunner

aws apprunner update-service \
    --service-arn <arn_apprunner_service> \
    --source-configuration '{
        "ImageRepository": {
            "ImageIdentifier": "<repository_url>:<image_tag>",
            "ImageRepositoryType": "ECR"
        }
    }' \
    --region eu-central-1

NOTE : ImageRepositoryType is mandatory option ECR|ECR_PUBLIC

Expected Output : json schema for the updated Apprunner service, with "Status": "OPERATION_IN_PROGRESS"

Reference : https://docs.aws.amazon.com/cli/latest/reference/apprunner/update-service.html

Upvotes: 0

Related Questions