Archive to S3 only if secret defined

I’d like to archive builds in S3 only if the relevant secrets are defined.

I would like to do this so that if I run drone exec locally without defining the secret, the archive step is not executed. However, on an official runner, builds get archived normally.

Is this possible? Here is my archive step:

- name: archive
  image: plugins/s3
    bucket: drone
      from_secret: aws_access_key_id
      from_secret: aws_secret_access_key
    source: build/**
    region: ap-southeast-2

If I do try to limit it by branch, instance, etc. I still get an error when I run “drone exec”: “secret not defined”. This seems to imply that even though a step doesn’t run, the information it requires must be available. Is my understanding correct and if so, is this desired behaviour?