# Create role with SSM permissions

Taskforce.sh uses the AWS Systems Manager in order to store the configuration variables of your instance securely and persistently.

Your instance will therefore need some permissions to read and write on the Parameter Store. Follow this instructions to create a role with minimal permissions that we will attach to the instance.

a) Go to the IAM panel and click on "Create role".

![](https://2160637802-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MG01zoyzHgr18e2IutZ%2F-MgLVFWhS7Y28MpjpdTS%2F-MgLXL5jTdM2hgcnhL5Q%2Fimage.png?alt=media\&token=f8a0ad66-182f-4ced-8a8c-d7430e6a82b4)

b) Choose AWS Service as the trusted entity and EC2 as Use Case.

![](https://2160637802-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MG01zoyzHgr18e2IutZ%2F-MgLXdbJ4pLGsIfEZIfJ%2F-MgLXmheG3APAJ5OtEdT%2Fimage.png?alt=media\&token=a97ebb95-597e-4214-91a9-c9ad83f9609d)

c) Create a new policy:

![](https://2160637802-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MG01zoyzHgr18e2IutZ%2F-MgLXdbJ4pLGsIfEZIfJ%2F-MgLXyi_57GZTOkrkZB_%2Fimage.png?alt=media\&token=f2073c76-762d-4b63-87db-0d311eafe9db)

d) Choose System Manager as a service:

![](https://2160637802-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MG01zoyzHgr18e2IutZ%2F-MgLXdbJ4pLGsIfEZIfJ%2F-MgLYDezSvRP8evCFp07%2Fimage.png?alt=media\&token=3273f97b-5a87-4388-82a7-8e4d7306309c)

e) For security we will only enable the absolute minimum permissions in the Actions section.

&#x20;So for the "Read" section we will only mark "GetParametersByPath":

![](https://2160637802-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MG01zoyzHgr18e2IutZ%2F-MgLXdbJ4pLGsIfEZIfJ%2F-MgLZi76i9LN530BmltW%2Fimage.png?alt=media\&token=7ec0f9eb-2bd1-4268-a8f5-40d542591a89)

And for the Write section we will mark "PutParameter":

![](https://2160637802-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MG01zoyzHgr18e2IutZ%2F-MgLXdbJ4pLGsIfEZIfJ%2F-MgLZw0ddmG5vpPlOuj-%2Fimage.png?alt=media\&token=4dd73558-d0f3-48d9-bb91-49631ea31a5e)

f) Restrict access to the Taskforcesh path.

Click on "Add Arn" link:

![](https://2160637802-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MG01zoyzHgr18e2IutZ%2F-MgL_2X-WRV45sPflXnk%2F-MgL_mUe9LU1GY8ocvxn%2Fimage.png?alt=media\&token=c677c6c6-bc12-41c6-9503-e0a5e153ba12)

And restrict to only paths under "Taskforcesh" and optionally on all regions:

![](https://2160637802-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MG01zoyzHgr18e2IutZ%2F-MgL_2X-WRV45sPflXnk%2F-MgLa2qoC5Pc9T01mXLc%2Fimage.png?alt=media\&token=b97da213-4b57-42d0-9a25-19ae28c9c2eb)

Click on "Add" and finalize by clicking on "Next: Tags" and then "Next: Review".

g) Review policy and click on "Create policy":

![](https://2160637802-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MG01zoyzHgr18e2IutZ%2F-MgLaOeMvMIgcCVvZczD%2F-MgLbChPXSwKqJ991a4r%2Fimage.png?alt=media\&token=8388470a-a5f6-49f4-bd0d-5b3db8ea11e8)

h) Go back to the "Create role" tab (that should still be open) and find the new policy so that we can attach it to the role. Do not forget to "refresh" the table so that the new policy appears:

![](https://2160637802-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MG01zoyzHgr18e2IutZ%2F-MgLaOeMvMIgcCVvZczD%2F-MgLdQ5hh1cOC8CqH_nW%2Fimage.png?alt=media\&token=abff9809-0c72-4aff-a1d8-6bf3a3507ff1)

Continue by clicking on "Next: Tags", then "Next: Review"

i) Review and "Create role"

![](https://2160637802-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MG01zoyzHgr18e2IutZ%2F-MgLaOeMvMIgcCVvZczD%2F-MgLdoSbpKKZTVCtIg4_%2Fimage.png?alt=media\&token=d0b128e9-439e-4549-b21d-9ca1c226a354)

