AWS FOTA fails because of missing s3 role


#1

Hi,

Folowing these instructions: https://www.zerynth.com/blog/firmware-over-the-air-updates-via-aws-powered-by-zerynth/

I get stuck at:
ztc aws iot-fota-start thing_name new_firmware_slot_1.json s3://fota-aws-bucket s3-read-role

Error message: “Can’t find s3 role!”

How and where do I need to create this role? I think this is the latest step preventing me to succeed my FOTA implementation.


#2

Already solved!

I created a Job manually, in the wizard you have the option the create the role automatically. This worked :slight_smile:


#3

I have to correct myself, I can start a FOTA job when creating a job in the Amazon AWS site, but not start from the CLI… still get the same error.

Can someone point me in the right direction?


#4

Hi @Marcel,

have you created a role with the name s3-read-role for AWS IoT?


#5

can you show me the steps how to do this? You mean a role alias?


#6

Hi,

take a look at the Create Jobs section here, granting permissions subsection.

Let me know :slight_smile:


#7

Hi,

Thanks!

I followed the steps, created a IAM role “s3-read-role” with the new attached policy where I entered my S3 bucket. But still the same issue: “Can’t find s3 role!”


#8

Hi @Marcel,

let’s make another try: can you run the aws iam list-roles command?
Does it output a JSON? Does the JSON contain the s3-read-role you created?


#9

Hi LorenzoR,

I managed to get it working, it wasn’t working because I missed the policy to list-roles, and I also missed the policy to create a job.

Now it’s working, thanks.