Commit e7894f5
authored
docs(build-a-backend): add AWS Blocks integration section (#8606)
* docs(build-a-backend): add AWS Blocks integration section
Add an "AWS Blocks" section under Build a Backend covering how to add
AWS Blocks to an existing Amplify Gen 2 project, how the integration
works, connecting a frontend, and task-based guides for adding an AI
agent and using BasicAuth. Add a Blocks integration steering-file recipe
for AI coding assistants.
- New pages under src/pages/[platform]/build-a-backend/aws-blocks/
- Register pages in directory.mjs (top of Build a Backend, New badge)
- Extend develop-with-ai/steering-files with an AWS Blocks section
- Add Blocks terminology to cspell dictionary
* docs(build-a-backend): fix Connect your frontend link in Blocks how-it-works
Add the missing build-a-backend/ path segment so the Next steps link
resolves instead of 404ing.
* chore: update yarn.lock to v10 format for Yarn 4.17
CI's set_yarn_berry action runs 'yarn set version berry', which resolves
to the latest Yarn (now 4.17.0) and rewrites the lockfile to __metadata
version 10. The committed lockfile was version 9, so the immutable install
step failed on every PR. Regenerate the lockfile and bump packageManager
to match what CI resolves.
* feat(modal): introduce AWS Blocks in the announcement modal
Repurpose the site announcement modal from 'Introducing Amplify Gen 2'
to 'Introducing AWS Blocks', since Gen 2 is now established and AWS
Blocks is the new capability. Add two feature highlights, an internal
link to the Blocks docs section, and an external link to AWS Blocks on
AWS. Use a new dismissal key so the announcement re-shows. Remove the
now-unused Gen 1 back-link, isGen1 prop, and orphaned useGen1Path helper.
* docs(aws-blocks): correct verified API usage in Agent and AuthBasic guides
Verified all code examples against the aws-blocks source repo:
- add-an-agent: expose getChannel() on the backend API namespace. The
frontend useChat subscribe() calls api.getChannel(), but it is not
auto-generated and must be defined explicitly (matches the bb-agent
README end-to-end example and test-apps/comprehensive).
- use-basic-auth: setAuthState() does not throw; it returns an AuthState
with errorName. Replace the try/catch + isBlocksError pattern with
hasAuthError(next, ...), per the bb-auth-basic README rule of thumb.
- get-started: list all four scaffolded npm scripts (sandbox,
sandbox:delete, blocks:dev, blocks:generate-client).
* fix(modal): add spacing between modal action label and icon
The 'AWS Blocks on AWS' button's external-link icon overlapped its
label because .modal-action had no inline-flex layout or gap. Add
inline-flex + gap (matching .modal-heading) so text and trailing
icons are spaced.
* feat(modal): differentiate Blocks CTA labels and feature examples
- Rename actions so they read distinctly: primary "Explore Blocks with
Amplify" (left, into the Amplify docs) and secondary "AWS Blocks
documentation" (right, external). Previously both said "AWS Blocks".
- Swap feature examples that overlapped Amplify's own categories (AI
agents, auth, storage) for differentiated Blocks capabilities:
PostgreSQL databases, realtime messaging, metrics, logging.
* feat(modal): rename secondary CTA to "Get Started with Blocks"
Keeps the external-link icon to signal it opens a new page (the AWS Blocks docs). Pairs with the primary "Explore Blocks with Amplify" action.
* docs(build-a-backend): move steering-file recipe to a separate PR
The AWS Blocks steering-file section now lives in #8608. Restore steering-files/index.mdx to its main version here so this PR is scoped to the Blocks docs only.
* docs(aws-blocks): address PR review feedback on Agent guide
Verified against current aws-blocks/main (local clone was 31 commits stale, which is how these were missed):
- useChat adapter now compiles: backend returns { conversationId } and
{ messages } and sendMessage accepts channelId, matching the
UseChatOptions interface and the bb-agent README end-to-end example.
- Replace deprecated BedrockModels.DEFAULT with BALANCED; note model is
optional (defaults to BALANCED).
- Move Realtime to a Real-time & async category (matches the Blocks
reference), leaving EmailClient under Communication.
- Reword the useChat factory callout ("Despite the name...").
* docs(aws-blocks): re-verify examples against latest aws-blocks main
Pulled aws-blocks to HEAD e8f3854 and re-verified all examples:
- Agent sendMessage now passes userId to agent.stream(); without it the
Agent throws PersistenceRequired at runtime (bb-agent agent.ts:407).
- Revert Realtime to the Communication category and restore Compute &
background (AsyncJob/CronJob) to match the aws-blocks root README
grouping (the authoritative in-repo source).
- Drop blocks:dev from the scaffolded-scripts list: the CLI points it at
aws-blocks/scripts/server.ts, which the amplify template does not ship,
so it is non-functional for Amplify projects.1 parent 6cf6e76 commit e7894f5
16 files changed
Lines changed: 904 additions & 146 deletions
File tree
- src
- components
- Layout
- Modal
- __tests__
- directory
- pages/[platform]/build-a-backend/aws-blocks
- add-an-agent
- connect-your-frontend
- get-started
- how-it-works
- use-basic-auth
- styles
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
889 | 889 | | |
890 | 890 | | |
891 | 891 | | |
| 892 | + | |
892 | 893 | | |
893 | 894 | | |
894 | 895 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
| 132 | + | |
133 | 133 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
312 | 312 | | |
313 | 313 | | |
314 | 314 | | |
315 | | - | |
| 315 | + | |
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
10 | 16 | | |
11 | 17 | | |
12 | 18 | | |
13 | 19 | | |
14 | | - | |
15 | 20 | | |
16 | | - | |
17 | | - | |
18 | | - | |
| 21 | + | |
| 22 | + | |
19 | 23 | | |
20 | | - | |
| 24 | + | |
21 | 25 | | |
22 | 26 | | |
23 | 27 | | |
24 | 28 | | |
25 | | - | |
| 29 | + | |
26 | 30 | | |
27 | 31 | | |
28 | | - | |
29 | 32 | | |
30 | 33 | | |
31 | | - | |
32 | | - | |
| 34 | + | |
| 35 | + | |
33 | 36 | | |
34 | 37 | | |
35 | 38 | | |
| |||
43 | 46 | | |
44 | 47 | | |
45 | 48 | | |
46 | | - | |
| 49 | + | |
47 | 50 | | |
48 | 51 | | |
49 | 52 | | |
50 | 53 | | |
51 | 54 | | |
52 | 55 | | |
53 | | - | |
| 56 | + | |
54 | 57 | | |
55 | 58 | | |
56 | 59 | | |
57 | | - | |
58 | | - | |
| 60 | + | |
| 61 | + | |
59 | 62 | | |
60 | 63 | | |
61 | | - | |
62 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
63 | 71 | | |
64 | 72 | | |
65 | 73 | | |
66 | | - | |
| 74 | + | |
67 | 75 | | |
68 | 76 | | |
69 | | - | |
70 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
71 | 80 | | |
72 | 81 | | |
73 | 82 | | |
74 | 83 | | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
| 84 | + | |
| 85 | + | |
82 | 86 | | |
83 | 87 | | |
84 | 88 | | |
85 | | - | |
| 89 | + | |
86 | 90 | | |
87 | 91 | | |
88 | | - | |
| 92 | + | |
| 93 | + | |
89 | 94 | | |
90 | 95 | | |
91 | 96 | | |
92 | 97 | | |
93 | 98 | | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | 99 | | |
106 | 100 | | |
107 | 101 | | |
108 | 102 | | |
109 | | - | |
| 103 | + | |
110 | 104 | | |
111 | 105 | | |
112 | 106 | | |
113 | 107 | | |
114 | 108 | | |
115 | 109 | | |
116 | | - | |
| 110 | + | |
117 | 111 | | |
118 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
119 | 125 | | |
120 | 126 | | |
121 | 127 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
85 | | - | |
| 84 | + | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
92 | | - | |
| 91 | + | |
| 92 | + | |
93 | 93 | | |
94 | | - | |
95 | | - | |
| 94 | + | |
| 95 | + | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
99 | 102 | | |
100 | 103 | | |
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
69 | 96 | | |
70 | 97 | | |
71 | 98 | | |
| |||
0 commit comments