Skip to content

Commit cce192c

Browse files
authored
Seed iam role update (#735)
* Git repo url * Editing Seed IAM role steps
1 parent a24714b commit cce192c

11 files changed

+39
-17
lines changed

_chapters/changelog.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,16 @@ You can get these updates emailed to you via our [newsletter]({% link newsletter
2323

2424
### Changes
2525

26-
#### [v8.0: {{ site.data.changelog.current.title }}](https://branchv80.archives.sst.dev/) (Current)
26+
#### [v8.0.1: {{ site.data.changelog.current.title }}](https://branchv801.archives.sst.dev/) (Current)
2727

2828
{{ site.data.changelog.current.desc }}
2929

30+
- [Tutorial changes]({{ site.github_repo }}/compare/v8.0...v8.0.1)
31+
32+
#### [v8.0: {{ site.data.changelog.v8-0.title }}](https://branchv80.archives.sst.dev/)
33+
34+
{{ site.data.changelog.v8-0.desc }}
35+
3036
- [Tutorial changes]({{ site.github_repo }}/compare/v7.4...v8.0)
3137
- [Demo notes app source]({{ site.sst_demo_repo }}/compare/v1.4...v2.0)
3238

_chapters/setting-up-your-project-on-seed.md

+27-15
Original file line numberDiff line numberDiff line change
@@ -28,34 +28,46 @@ Next, Seed will automatically detect the `sst.config.ts` file in your repo. Clic
2828

2929
![SST app detected](/assets/part2/sst-app-detected.png)
3030

31-
Seed deploys to your AWS account on your behalf. You should create a separate IAM user with exact permissions that your project needs. You can read more about this [here](https://seed.run/docs/customizing-your-iam-policy). But for now we'll simply use the one we've used in this tutorial.
31+
Seed uses an IAM role to deploy to your AWS account on your behalf. It's more secure than the IAM user we created previously in this guide. An IAM role gives Seed temporary IAM credentials to deploy your app. These credentials expire after a short period of time.
3232

33-
{%change%} Run the following command.
33+
![Seed AWS IAM Role form](/assets/part2/seed-aws-iam-role-form.png)
3434

35-
``` bash
36-
$ cat ~/.aws/credentials
37-
```
35+
You should create this IAM role with the exact permissions that your project needs. You can read more about this [here](https://seed.run/docs/customizing-your-iam-policy). But for now we'll simply use the default one.
3836

39-
The output should look something like this.
37+
![Seed create IAM role](/assets/part2/seed-create-iam-role.png)
4038

41-
``` txt
42-
[default]
43-
aws_access_key_id = YOUR_IAM_ACCESS_KEY
44-
aws_secret_access_key = YOUR_IAM_SECRET_KEY
45-
```
39+
Click the **Create an IAM Role using CloudFormation** button. This will send you to the AWS Console and ask you to create a CloudFormation stack.
4640

47-
Seed will also create a couple of stages (or environments) for you. By default, it'll create a **dev** and a **prod** stage using the same AWS credentials. You can customize these but we'll use the defaults.
41+
![AWS create CloudFormation stack](/assets/part2/aws-create-cloudformation-stack.png)
42+
43+
Scroll down, **confirm** the checkbox at the bottom and click **Create stack**.
44+
45+
![AWS click create CloudFormation stack](/assets/part2/aws-click-create-cloudformation-stack.png)
4846

49-
Fill in the credentials and click **Add a New App**.
47+
It will take a couple of minutes to create the stack. Once complete, click the **Outputs** tab.
48+
49+
![AWS CloudFormation stack outputs](/assets/part2/aws-cloudformation-stack-outputs.png)
50+
51+
Copy the **RoleArn value**. Ours looks something like this.
52+
53+
```text
54+
arn:aws:iam::206899313015:role/seed/seed-role-SeedRole-BXQYLZX7AB8J
55+
```
56+
57+
Now back in Seed, you can paste the credentials.
5058

5159
![Add AWS IAM credentials](/assets/part2/add-aws-iam-credentials.png)
5260

53-
Your new app is created. You'll notice a few things here. First, we have a service called **notes**. It's picking up the name from our `sst.config.ts` file. You can choose to change this by clicking on the service and editing its name. You'll also notice the two stages that have been created.
61+
Seed will also create a couple of stages (or environments) for you. By default, it'll create a **dev** and a **prod** stage using the same AWS credentials. You can customize these but we'll use the defaults.
5462

55-
Our app can have multiple services within it. A service (roughly speaking) is a reference to a `sst.config.ts` or `serverless.yml` file (for Serverless Framework). In our case we just have the one service.
63+
Finally click **Add a New App**.
64+
65+
Your new app is created. You'll notice a few things here. First, we have a service called **notes**. It's picking up the name from our `sst.config.ts` file. You can choose to change this by clicking on the service and editing its name. You'll also notice the two stages that have been created.
5666

5767
![Seed app homepage](/assets/part2/seed-app-homepage.png)
5868

69+
Our app can have multiple services within it. A service (roughly speaking) is a reference to a `sst.config.ts` or `serverless.yml` file (for Serverless Framework). In our case we just have the one service.
70+
5971
Now before we proceed to deploying our app, we need to enable running unit tests as a part of our build process. You'll recall that we had added a couple of tests back in the [unit tests]({% link _chapters/unit-tests-in-serverless.md %}) chapter. And we want to run those before we deploy our app.
6072

6173
To do this, hit the **Settings** link and click **Enable Unit Tests**.

_data/changelog.yml

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
current:
2+
title: "Updating Seed to IAM roles"
3+
desc: "Sep 15, 2023: Minor changes to the setting up your project on Seed chapter."
4+
5+
v8-0:
26
title: "Updating to TypeScript"
37
desc: "Aug 31, 2023: Using TS by default, switching to pnpm, and using Vite instead of Create React App. And archiving old chapters."
48

_includes/footer.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@
247247
? parseFloat((num / 1000).toFixed(1)) + "k"
248248
: num;
249249
}
250-
$.ajax("https://api.github.com/repos/serverless-stack/sst")
250+
$.ajax("https://api.github.com/repos/sst/sst")
251251
.done(function(data) {
252252
$("#github-star-count").text(formatStars(data.stargazers_count));
253253
});
48.1 KB
Loading
Loading
Loading
Loading
710 KB
Loading

assets/part2/seed-create-iam-role.png

960 KB
Loading

assets/part2/sst-app-detected.png

78.1 KB
Loading

0 commit comments

Comments
 (0)