Cannot configure both commands and custom attributes [access_id secret_key region]

i wrote a plugin to pull image from ecr,but it error Cannot configure both commands and custom attributes [access_id secret_key region]

i had try on ubuntu machine and it works

[email protected]:/data/play-web# docker run  --rm \
>   -e PLUGIN_ACCESS_ID="ACCESS_ID" \
>   -e PLUGIN_SECRET_KEY="SECRET_KEY" \
>   -e PLUGIN_REGION="ap-northeast-1" \
>   -v /var/run/docker.sock:/var/run/docker.sock \
>   lpf190/drone-pull-ecr:v0.04
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Login Succeeded

but in .drone.yaml

pipeline:
  pull-from-ecr:
    image: lpf190/drone-pull-ecr:v0.04
    access_id: ${ecr_access_key}   # set a secret key in UI
    secret_key: ${ecr_secret_key}  # set a secret key in UI
    region: ap-northeast-1
    commands:
      - docker pull ulr:images
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    when:
      event: push

error on UI
Cannot configure both commands and custom attributes [access_id secret_key region]

when i comment commands: [ docker pull ulr:images ]

the error is

you cannot use commands with plugins, which is why you are getting this error.

pipeline:
  pull-from-ecr:
    image: lpf190/drone-pull-ecr:v0.04
    access_id: ${ecr_access_key}   # set a secret key in UI
    secret_key: ${ecr_secret_key}  # set a secret key in UI
    region: ap-northeast-1
-    commands:
-      - docker pull ulr:images
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    when:
      event: push

but what about How do you authenticate with and pull from an ECR registry?

The example at that link is not a plugin, it is just a custom docker image.

Also FYI the Drone Enterprise Edition supports pulling ECR images:
http://docs.drone.io/setup-global-registry-credentials/#elastic-container-registry-ecr