Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding setup IAM permissions for local Cloud9 setup #1

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ interstitial screen similar to this one for a minute or two:

![images/wait-for-environment.png](images/wait-for-environment.png)

if you are running the workshop on your own and not at AWS event, you will have to associate IAM roles to your Cloud9 instance, please follow steps [here](./SETUP_IAM_ROLE.md).

Once the development environment opens up click on the settings button in the upper right corner:

![images/settings.png](images/settings.png)
Expand Down Expand Up @@ -137,7 +139,7 @@ WORKDIR /srv
ADD package.json package-lock.json ./
RUN npm install

FROM public.ecr.aws/bitnami/node:16-slim
FROM public.ecr.aws/bitnami/node:16-prod
WORKDIR /srv
COPY --from=build /srv .
ADD . .
Expand Down Expand Up @@ -208,6 +210,7 @@ docker ps
Now that you have built and run a container in the development environment, the next step is to run the container as a horizontally scalable deployment in AWS Fargate. For this step we will use AWS Copilot.

```sh
cd deploying-container-to-fargate-using-aws-copilot
copilot init
```

Expand Down Expand Up @@ -409,4 +412,4 @@ If you want to clean everything up you can go back to Cloud9 and run:
copilot app delete
```

This will delete all resources grouped under the application, including the `reverse` service and the `load` job.
This will delete all resources grouped under the application, including the `reverse` service and the `load` job.
20 changes: 20 additions & 0 deletions SETUP_IAM_ROLE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Running the workshop on your own

Please follow below steps if you are running the workshop on your own. These steps will not be necessary if you are at AWS hosted event (such as re:Invent, Immersion Day, etc).

## Create an IAM role for your Workspace

1. Follow [this deep link to create an IAM role with Administrator access](https://console.aws.amazon.com/iam/home?#/roles$new?step=type&commonUseCase=EC2%2BEC2&selectedUseCase=EC2&policies=arn:aws:iam::aws:policy%2FAdministratorAccess&roleName=ecsworkshop-admin).
1. Confirm that **AWS service** and **EC2** are selected, then click **Next: Permissions** to view permissions.
1. Confirm that **AdministratorAccess** is checked, then click **Next: Tags** to assign tags.
1. Take the defaults, and click **Next: Review** to review.
1. Enter **ecsworkshop-admin** for the Name, and click **Create role**.
![createrole](images/createrole.png)

## Attach the IAM role to your Workspace
1. Click the grey circle button (in top right corner) and select **Manage EC2 Instance**.
![cloud9Role](images/cloud9-role.png)
1. Select the instance, then choose **Actions / Security / Modify IAM Role**
![c9instancerole](images/c9instancerole.png)
1. Choose **ecsworkshop-admin** from the **IAM Role** drop down, and select **Save**
![c9attachrole](images/c9attachrole.png)
Binary file added images/c9attachrole.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/c9instancerole.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/cloud9-role.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/createrole.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.