Skip to content

Commit

Permalink
Fixing auth snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
jayair committed Aug 21, 2024
1 parent 26d6009 commit 1100d47
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 3 additions & 5 deletions _chapters/adding-auth-to-our-serverless-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,12 @@ This looks a little complicated but Amazon API Gateway has a format it uses to d
We are also creating a specific IAM policy to secure the files our users will upload to our S3 bucket.

```ts
// Policy granting access to a specific folder in the bucket
new iam.PolicyStatement({
{
actions: ["s3:*"],
effect: iam.Effect.ALLOW,
resources: [
bucket.bucketArn + "/private/${cognito-identity.amazonaws.com:sub}/*",
$concat(bucket.arn, "/private/${cognito-identity.amazonaws.com:sub}/*"),
],
}),
},
```

Let's look at how this works.
Expand Down
4 changes: 2 additions & 2 deletions _includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
</a>
</span>
<a class="links" target="_blank" href="{{ site.forum_url }}">Forums</a>
<a class="links" target="_blank" href="{% link _chapters/changelog.md %}">Changelog</a>
<a class="links" target="_blank" href="{% link newsletter.md %}">Newsletter</a>
<a class="links" href="{% link _chapters/changelog.md %}">Changelog</a>
<a class="links" href="{% link newsletter.md %}">Newsletter</a>
</div>

<div class="col2">
Expand Down

0 comments on commit 1100d47

Please sign in to comment.