Create an S3 role using a Cloud Formation template

In the next steps, you will create an S3 role that will give Jenkins permission to upload the Promotion Manager application build to the artifact repository you created in module 1. The role value will be used as an input to the Jenkins Sandbox deployment. Once Jenkins is deployed, it will use this role as a parameter of the pipeline jobs that you will run (see Deploy a Sandbox from Jenkins step in module 3).

1. Open AWS in a browser and navigate to the CloudFormation service

2. Click Create stack

27_page

3. In the drop-down list that appears, select With new resources (standard)

4. Under Template source, select Upload a template file

5. Click Choose file

6. Upload s3_bucket_access.template from the /jenkins directory of the workshop’s repo you created in Module 1. You may select the file from your local clone of the workshop’s Git repo, or use the URL of that file in the original repo: https://raw.githubusercontent.com/QualiSystemsLab/aws-workshop-colony/master/jenkins/s3_bucket_access.template

27_page

7. Click Next

8. Enter a name for the stack (e.g. “S3role”) and specify the S3 bucket name as the S3 bucket name in Parameter

27_page

9. Click Next

10. In the Configure stack options page, click Next again

11. In the Review page, scroll to the bottom and check the acknowledgement checkbox

27_page

12. Click _Create stack__

13. Wait for the new role to be created - you might want to click the refresh button on the top-right of the Events table

14. Once the role is created, open the Outputs tab

15. Save the value of the IAMRoleInstanceProfile key. It will serve as an input for your Jenkins sandbox

27_page