-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
I want to replicate our production environment setup and as such need to set a Registry policy on my LocalStack ECR. Any attempt to call put-registry-policy always fails with: An error occurred (InvalidParameterException) when calling the PutRegistryPolicy operation: Invalid parameter at 'PolicyText' failed to satisfy constraint: 'Invalid registry policy provided
Expected Behavior
I should be able to create a policy (even if it isn't really applied) without any error.
How are you starting LocalStack?
With the localstack script
Steps To Reproduce
How are you starting localstack (e.g., bin/localstack command, arguments, or docker-compose.yml)
sudo DEBUG=1 localstack start
Client commands (e.g., AWS SDK code snippet, or sequence of "awslocal" commands)
AWS_ACCESS_KEY_ID=LKIAQAAAAAABAA00000C AWS_SECRET_ACCESS_KEY=test aws ecr put-registry-policy --policy-text '{"Version": "2012-10-17","Statement": [ {"Effect": "Allow","Principal": {"AWS": ["arn:aws:iam::386209384616:root","arn:aws:iam::902366379725:root"]},"Action": ["ecr:BatchGetImage","ecr:GetDownloadUrlForLayer","ecr:GetImageCopyStatus","ecr:BatchImportUpstreamImage"],"Resource": "arn:aws:ecr:us-east-1:000000000000:repository/*"}]}' --endpoint-url='http://localhost.localstack.cloud:4566' --region us-east-1
this policy works in AWS, note the account ID's have to be real otherwise AWS will not save them either. Those account ID's are not mine they are from a github repository that lists known account id's.
Environment
- OS:PopOs
- LocalStack: 4.11.1Anything else?
No response