1 réponse
- Le plus récent
- Le plus de votes
- La plupart des commentaires
1
Hi Gary.
EDIT: I just realized you are wrapping the S3 object link to the job document in a pre-signed URL placeholder. This is not correct. To try to clarify:
- Use
--document
when specifying the body of the job document inline in your CLI command. - Use
--document-source
when your job document is in an S3 bucket. - A pre-signed URL placeholder is only needed if the body of the job document refers to another S3 object. The placeholder should only appear in the body of the job document.
- You do not need to use a pre-signed URL placeholder in your CLI command when using
--document-source
.
So your second command should be:
aws iot create-job-template --job-template-id 'test-job-template' --description 'test job template' --document-source https://s3.amazonaws.com/jobsdocs/testDoc.json'
If testDoc.json
includes a pre-signed placeholder, then you need the --presigned-url-config
as well.
Contenus pertinents
- demandé il y a un an
- demandé il y a 4 mois
- demandé il y a un an
- AWS OFFICIELA mis à jour il y a un an
- AWS OFFICIELA mis à jour il y a 2 ans
- AWS OFFICIELA mis à jour il y a un an
- AWS OFFICIELA mis à jour il y a un an
Thanks Greg. I used
--document
and--presigned-url
as you suggested, as follows but got a new error:My JSON file has the same content as per my first cmd
Hi Greg, I'm not sure why with
--document
I'm passing a placeholder link (when this is not mentioned in the docs), and why I'm not using--document-source
and passing the placeholder link together with--presigned-url-config
(to give AWS CLI permission to get the jobs doc?) to convert a jobs document into a jobs template. It would be great if you could clarify, I must be missing something in the docs.Hi Gary. I edited my answer. When I first answered, I thought you were passing in a job document, not a link to a job document in S3. I hope the answer is clearer now.
Hi Greg, that makes perfect sense. It was this section in the docs
If the job document resides in an S3 bucket, you must use a placeholder link when specifying the document. The placeholder link is of the following form: ${aws:iot:s3-presigned-url:https://s3.amazonaws.com/ *bucket* / *key* }
that tripped me - I did wonder why a placeholder link was needed when I had a simple job document in S3. Thanks againUnderstood. I raised in issue internally yesterday to get that part of the documentation addressed.