Skip to content

Commit

Permalink
Merge main into next-release/main (#7454)
Browse files Browse the repository at this point in the history
* Minor edits to Vite + React quickstart (#6926)

* Updates to Vite + React quickstart

* Update src/fragments/gen2/quickstart/build-a-backend.mdx

Co-authored-by: Kevin Old <kevold@amazon.com>

* Update build-a-backend.mdx

* Update build-a-backend.mdx

* Update build-a-backend.mdx

---------

Co-authored-by: Kevin Old <kevold@amazon.com>

* fix: Fix incorrect auth import path in migration guide. (#6934)

* fix: Update incorrect `updateMFAPreference` parameter in JS v6 migration guide. (#6935)

* Amplify Android Release 2.14.11 (#6933)

* chore: refactor .layout-header into separate component (#6826)

* platform typed as optional

* refactor init

* remove commented code

* remove angry useEffect

* fix typing

* added layoutcontext so mobile menu closes on navigation

* move import

---------

Co-authored-by: katiegoines <katiegoines@gmail.com>

* fix: Nesting of auth cli templates (#6932)

* fix: change config variable name (#6923)

* Guide to support Amplify v2 with AWS Android SDK (#6927)

* Update puppeteer (#6949)

* Update index.mdx (#6950)

* Update CODEOWNERS with correct PM alignment (#6951)

* fix(flutter, js): scope "connect existing cdk" guide to respective platform (#6947)

Co-authored-by: Tim Nguyen <54393192+timngyn@users.noreply.github.com>

* Revert "fix(flutter, js): scope "connect existing cdk" guide to respective pl…" (#6955)

This reverts commit 5998b22.

* chore: remove duplicated logic between Layout and LayoutHeader (#6954)

* chore: more layout refactoring

* remove unused prop, alphabetize props

* improve oauth docs (#6961)

* fixed gen 2 getting started guide (#6968)

* Update redirects for deleted hidden pages (#6944)

* Update manual installation to point to @beta tag (#6972)

* include usage for multi-page apps (#6964)

* include usage for multi-page apps

* improve multi-page app docs

* use Hub syntax

* update imports in examples

* chore: Clean up broken Amplify JS API reference links (#6976)

* chore: Clean up broken Amplify JS API reference links.

* Cleaned up language.

* Update build image instructions for Gen 2 (#6978)

* update build image settings for Gen 2

* remove callout and add fragment to vite guide

* chore: add unit test for YoutubeEmbed component (#6983)

* chore: add unit test for YoutubeEmbed component

* add code coverage stats

---------

Co-authored-by: katiegoines <katiegoines@gmail.com>

* chore: add unit tests for Accordion component (#6981)

* chore: add unit tests for Accordion component

* issue with window properties

* fixed tracking test

* working on animation issue

* accordion tests

* fix testing errors

* added test for closing accordion

* add code coverage stats

---------

Co-authored-by: katiegoines <katiegoines@gmail.com>

* Update index.mdx (#6986)

* Add env variables for algolia (#6957)

* Add algolia env vars to next.config

* Remove extra code string

* fix(data): update REST API docs to document correct error response type (#6989)

* fix(data): update React Native minimum iOS deployment target guidance; add build step to docs (#6970)

* fix(data): update React Native minimum iOS deployment target; add build step to docs

* address PR feedback

* remove deployment target guidance

* add React Native version deployment target callout

* fix unrecognized syntax

* replace callout with accordion

* move 'upgrading' callout

* Clarify behavior of forgetDevice() API regarding device tracking (#6985)

* Clarify behavior of forgetDevice() API regarding device tracking

This commit updates the documentation to clarify that using the forgetDevice() API results in the device being neither remembered nor tracked. Previously, the documentation suggested that forgotten devices might still be tracked, leading to confusion about the API's behavior. The revised wording aligns with the detailed description under the "Forgotten" section, ensuring consistency and eliminating ambiguity about how forgotten devices are handled.

* Clarify behavior of forgetDevice() API regarding device tracking

* Support for enum value listing (#6885)

* Support for enum value listing

* Update src/pages/gen2/build-a-backend/data/data-modeling/add-fields/index.mdx

* CDK updates v2 (#6990)

* Add padding to bottom of nav menu (#6991)

* Adding secondary index to Gen 2 (#6996)

* Adding secondary index docs

* fixed some formatting for custom query fields

* extend config to show addOuput (#6963)

* extend config

* modify wording

* modify example

* improve wording

* Update index.mdx (#6995)

* Update index.mdx

* add guest access support to docs

* chore: add unit tests for NextPrevious component (#7003)

Co-authored-by: katiegoines <katiegoines@gmail.com>

* chore: add unit tests for LinkCards and LinkCard components (#7006)

Co-authored-by: katiegoines <katiegoines@gmail.com>

* chore: add unit tests for GetStartedPopover component (#7005)

Co-authored-by: katiegoines <katiegoines@gmail.com>

* fix: [Storage] Configure Access (#6948)

Co-authored-by: Tim Nguyen <54393192+timngyn@users.noreply.github.com>

* fix(Swift): update data use policy info's tracking to false (#6938)

* fix(Swift): update data use policy info's tracking to false

* Update data-information.mdx

* chore: add callouts and troubleshooting guide for configuration (#6967)

* fix: resolve in-content broken links (#7011)

* re-platforming

* remove reference to mocking and testing for android & swift

* remove reference to mocking and testing for android & swift

* filtered out reference to optimistic ui for react native

---------

Co-authored-by: katiegoines <katiegoines@gmail.com>

* update gen2 storage and function docs (#7009)

* update gen2 storage and function docs

* add resource access links and example

* revisions, update code snippet titles

* Update CODEOWNERS (#7014)

* updated steps for extending components in code (#6827)

Co-authored-by: Aditya Shahani <theadi@amazon.com>

* Custom business logic support as of March @beta (#7019)

* Enhanced custom business logic DX

* addressed tim's comments

* Added custom subscription configuration worfklow

* removed in-development areas

* added titles

* added links for deep dive material

* Update src/pages/gen2/build-a-backend/data/custom-business-logic/index.mdx

Co-authored-by: josef <josef.aidt@gmail.com>

* Update src/pages/gen2/build-a-backend/data/custom-business-logic/index.mdx

Co-authored-by: josef <josef.aidt@gmail.com>

* Update src/pages/gen2/build-a-backend/data/custom-business-logic/index.mdx

Co-authored-by: Kethan sai <ykethan@amazon.com>

* Update src/pages/gen2/build-a-backend/data/custom-business-logic/index.mdx

Co-authored-by: Kethan sai <ykethan@amazon.com>

* Update src/pages/gen2/build-a-backend/data/custom-business-logic/index.mdx

Co-authored-by: josef <josef.aidt@gmail.com>

* Update src/pages/gen2/build-a-backend/data/custom-business-logic/index.mdx

* added client method for clarity.

* Update src/pages/gen2/build-a-backend/data/custom-business-logic/index.mdx

Co-authored-by: Kethan sai <ykethan@amazon.com>

* Apply suggestions from code review

Co-authored-by: josef <josef.aidt@gmail.com>

---------

Co-authored-by: josef <josef.aidt@gmail.com>
Co-authored-by: Kethan sai <ykethan@amazon.com>

* add storage trigger docs (#7020)

* storage trigger docs

* Apply suggestions from code review

Co-authored-by: josef <josef.aidt@gmail.com>

* add storage access actions

---------

Co-authored-by: josef <josef.aidt@gmail.com>

* update link checker to wait for each call to complete before making t… (#6993)

* update link checker to wait for each call to complete before making the next and remove # from urls being checked

* update logging to show how many links found on each page

* Update tasks/link-checker.js

---------

Co-authored-by: Jacob Logan <lognjc@amazon.com>
Co-authored-by: katiegoines <katiegoines@gmail.com>
Co-authored-by: Scott Rees <6165315+reesscot@users.noreply.github.com>

* custom examples (#6979)

* custom examples

* fix: broken link, missing / at start (#7026)

Co-authored-by: katiegoines <katiegoines@gmail.com>

* validate and fix code snippets in Data section (#6975)

* Update sandbox --dir-to-watch description (#7031)

* Update index.mdx (#7035)

* Fix link (#7028)

* add docs to auth resource access pattern (#7032)

* fix: type platform as optional in Breadcrumbs component & add unit tests (#6912)

* platform typed as optional

* chore: add unit tests for Breadcrumbs

* testing to include platform optional

* fix: type platform as optional

* add tests for override values

---------

Co-authored-by: katiegoines <katiegoines@gmail.com>

* fix: proper variable naming conventions for storage (#7033)

fix:  proper variable naming conventions for storage

* remove explicit file extension from gen2 imports (#6946)

Co-authored-by: Tim Nguyen <54393192+timngyn@users.noreply.github.com>

* fix: Update diff code blocks to TypeScript with code highlights (#6905)

* add docs on granting defineFunction access to defineData (#7029)

* standardize Gen 2 wording (#7036)

* Update index.mdx (#6906)

* Modify_Amplify_resources (#7018)

* fix code snippets on read data page

* code snippet updates

* updated the code snippets

* updated code snippets.

* custom business page rollback

* Update maplibre links (#7040)

* chore: add unit tests for PlatformNavigator (#6980)

* chore: add unit tests for PlatformNavigator

* add code coverage

* simplify

* simplify

---------

Co-authored-by: katiegoines <katiegoines@gmail.com>

* Update links to expo docs (#7044)

* Update links to expo docs

* Update src/pages/[platform]/prev/build-a-backend/auth/add-social-provider/index.mdx

Co-authored-by: josef <josef.aidt@gmail.com>

* Update src/pages/[platform]/prev/build-a-backend/auth/add-social-provider/index.mdx

Co-authored-by: josef <josef.aidt@gmail.com>

---------

Co-authored-by: josef <josef.aidt@gmail.com>

* chore: add unit tests for InternalLinkButton (#7000)

Co-authored-by: katiegoines <katiegoines@gmail.com>

* chore: add addtl unit test for Block component (#6982)

* chore: add addtl unit test for Block component

* add code coverage stats

* remove superfluous Block component

---------

Co-authored-by: katiegoines <katiegoines@gmail.com>

* chore: add unit tests for TOC (#6984)

* chore: add unit tests for TOC

* add code coverage

* hardcode expected hash

---------

Co-authored-by: katiegoines <katiegoines@gmail.com>

* chore: add unit tests for ExternalLink (#6915)

* chore: add unit tests for ExternalLink

* fixing tracking test

---------

Co-authored-by: katiegoines <katiegoines@gmail.com>

* chore: add unit tests for ExternalLinkButton (#6914)

* chore: add unit tests for ExternalLinkButton

* Update ExternalLinkButton.test.tsx

triggering checks

---------

Co-authored-by: katiegoines <katiegoines@gmail.com>

* chore: add unit tests for Footer component (#6999)

Co-authored-by: katiegoines <katiegoines@gmail.com>

* chore: add unit tests for MigrationAlert component (#7004)

* chore: add unit tests for MigrationAlert component

* chore: add unit tests for MigrationAlert component

---------

Co-authored-by: katiegoines <katiegoines@gmail.com>

* chore: add unit test for Overview component (#7002)

Co-authored-by: katiegoines <katiegoines@gmail.com>

* chore: upgrade docsearch/react to 3.6 (#7046)

* added utility type content (#7047)

* chore: add unit tests for PageLastUpdated (#7001)

Co-authored-by: katiegoines <katiegoines@gmail.com>

* chore: add unit tests for Commands and Columns (#6916)

* chore: add unit test for CLICommands

* chore: add unit test for Columns

* Update Command.test.tsx

triggering checks

---------

Co-authored-by: katiegoines <katiegoines@gmail.com>

* Update resolution for follow-redirects (#7055)

* Update relative urls (#7048)

* Update relative urls

* Update url

* Updating link checker (#7052)

* Updating link checker to account for duplicate urls from different pages and link text

* Update slack formatting

* Remove console.log

* Add comments to function

* Remove extra console.logs()

* chore: update redirects list (#6969)

* update redirects

* updated redirects

---------

Co-authored-by: katiegoines <katiegoines@gmail.com>

* remove allowlist role names for appsync console access page (#7081)

* Add JavaScript resolver code sample to Gen 1 (#7087)

* fix(JS): Update v5 JS libraries installation guides. (#7090)

* fix(v5): update aws-amplify v5 dependency

* chore: remove extra '0' number from versions

* chore: remove vue2 block

* chore: update version reference

* Cbonif/field-level-auth-support-for-sql (#7091)

* chore(gen2-data): update .secondaryIndexes example to match the latest interface (#7095)

* update setup auth client example with correct props (#7106)

* update auth with correct props

* Change generated function env package name (#7096)

* Update typo in url for localhost (#7110)

* update next config to use a static build Id (#7102)

Co-authored-by: Jacob Logan <lognjc@amazon.com>

* chore: Add callout on Analytics buffer persistence in Amplify JS (#7115)

* chore: Add callout on Analytics buffer persistence in Amplify JS.

* PR feedback.

* Custom subscription docs to Gen 2 (#7120)

* Add playsInline to videos (#7125)

* autoSignIn position correction in v6 migration docs (#7059)

* fix(next-release/main): update home page h1 and code block font size (#7117) (#7126)

* update font sizes

* add text-size-adjust

* add webkit prefix, add comment

* update text-size-adjust fix

---------

Co-authored-by: Tim Nguyen <54393192+timngyn@users.noreply.github.com>

* remove parenthesis from "Amplify (Gen 2)" (#7113)

* change "NPM" to "npm" (#7112)

* remove explicit ".js" extension from gen2 resource imports (#7134)

* remove leading slash from storage access paths (#7116)

* remove unnecessary "Angular" mention in auth getting started (#7139)

Removed 'Angular' from the app description. It is not necessarily an angular app.

* Gen 2 Quickstart: Fix amplify console link (#7141)

* fix amplify console link

* fix text from AWS Console to Amplify Console

* updated alt text for Amplify console

* Update src/fragments/gen2/quickstart/deploy-and-host.mdx

Co-authored-by: Scott Rees <6165315+reesscot@users.noreply.github.com>

* Update src/pages/gen2/deploy-and-host/fullstack-branching/branch-deployments/index.mdx

Co-authored-by: Scott Rees <6165315+reesscot@users.noreply.github.com>

---------

Co-authored-by: Scott Rees <6165315+reesscot@users.noreply.github.com>

* Add Favicon and apple-touch icons to root (#7137)

* add 96x96 favicons

* add favicon and apple-touch to root

* updated icons

---------

Co-authored-by: Jacob Logan <lognjc@amazon.com>

* docs(migration): fixes mislabeling notification enable snippet (#7135)

the v5 snippet was labeled as v6 and the v6 was labeled as v5

Co-authored-by: derrik.fleming <derrik.fleming@spindance.com>

* edits to custom business logic (#7129)

* remove console.log (#7147)

* fix: copied code no longer includes markdown comments (#7146)

* fix: copied code no longer includes markdown comments

* minor cleanup

* splite prepareCopyText to it's own export for easier testing

* fix MDXCode mock

* chore(react-native): Add callouts for dropped Expo Go support (#7160)

* Update index.mdx (#7165)

* Update github link to maplibre repo (#7162)

* Cbonif/add-sql-support-for-secrets-manager (#7104)

* add image example for secrets manager key/value

* add documentation for creating secrets in secrets manager and configuring db details on the construct

* adjust order of paragraphs, moving relevant text closer to image and make alt text more descriptive

* Fixed typo in amplifyconfiguration.json for predictions (#7185)

* fix swift docs to use the `.update` call (#7191)

* Update index.mdx (#7164)

* Added documentation on updated IAM behavior (#7056)

* Added documentation on updated IAM behavior

* Update src/pages/[platform]/tools/cli/migration/iam-auth-updates-for-cdk-construct/index.mdx

Co-authored-by: Kamil Sobol <sobol.k.r@gmail.com>

* Update src/pages/[platform]/build-a-backend/graphqlapi/customize-authorization-rules/index.mdx

Co-authored-by: Kamil Sobol <sobol.k.r@gmail.com>

* Update src/pages/[platform]/build-a-backend/graphqlapi/customize-authorization-rules/index.mdx

* Update src/pages/[platform]/tools/cli/migration/iam-auth-updates-for-cdk-construct/index.mdx

* Update src/pages/[platform]/tools/cli/migration/iam-auth-updates-for-cdk-construct/index.mdx

Co-authored-by: Tim Schmelter <schmelte@amazon.com>

* addressed comments

* Updated to reflect changes to Gen 2 content

* Update src/pages/[platform]/build-a-backend/graphqlapi/customize-authorization-rules/index.mdx

---------

Co-authored-by: Kamil Sobol <sobol.k.r@gmail.com>
Co-authored-by: Tim Schmelter <schmelte@amazon.com>

* Added Metadata section in Storage (#7152)

* Cbonif/edits-to-secondary-indexes-page (#7179)

* edits to custom business logic

* update secondary index code examples

* Add client examples of accessing models with specific auth modes (#7080)

* add client side code for public access

* add client side code for signed in user access

* add client side code for multi user access

* add client side code for per user/owner access

* add client side code for custom id & group claims

* add client side code for custom access

* add client side code for user pool group access

* add client side code for oidc access

* Update src/pages/gen2/build-a-backend/data/customize-authz/signed-in-user-data-access/index.mdx

Co-authored-by: Rene Brandel <4989523+renebrandel@users.noreply.github.com>

* add info callout and configuration code to public/private iam examples

* move callout up

* remove "**note**" from callouts

---------

Co-authored-by: Rene Brandel <4989523+renebrandel@users.noreply.github.com>

* Updated Gen 2 relationship behavior (#7222)

* Added new relationship behavior doc

* fixed typos

* fix(predictions): fix wrong reference of swfit/android predictions use aws sdk page (#7220)

* fix(predictions): fix wrong reference of swfit/android predictions use aws sdk page

* fix(predictions): update Use AWS SDK description

* Update amplify/data/increment-like.js syntax (#7229)

The correct DynamoDB syntax requires semicolon in both expression and expressionValues

* Graphql generate client code (#7176)

* updated generate-client-code section

* updated graphql-client-code section

* updated the description

* removed workflow

* Update src/pages/gen2/reference/cli-commands/index.mdx

Co-authored-by: Rene Brandel <4989523+renebrandel@users.noreply.github.com>

* Update src/pages/gen2/reference/cli-commands/index.mdx

Co-authored-by: Rene Brandel <4989523+renebrandel@users.noreply.github.com>

* added Supported GraphQL client code combinations

* fixed the spell

* fixed the format

* fixed the syntax

* Update src/pages/gen2/reference/cli-commands/index.mdx

Co-authored-by: josef <josef.aidt@gmail.com>

* Update src/pages/gen2/reference/cli-commands/index.mdx

Co-authored-by: josef <josef.aidt@gmail.com>

* Update src/pages/gen2/reference/cli-commands/index.mdx

Co-authored-by: josef <josef.aidt@gmail.com>

* Update src/pages/gen2/reference/cli-commands/index.mdx

Co-authored-by: josef <josef.aidt@gmail.com>

* updated the stack name

---------

Co-authored-by: Rene Brandel <4989523+renebrandel@users.noreply.github.com>
Co-authored-by: josef <josef.aidt@gmail.com>

* use latest tag for Gen2 apps (#7256)

* Updated Data Gen 2 authorization rules to use the new syntax (#7252)

* Updated authorization rules to use the new syntax

* Update src/pages/gen2/build-a-backend/data/customize-authz/signed-in-user-data-access/index.mdx

Co-authored-by: Hui Zhao <10602282+HuiSF@users.noreply.github.com>

---------

Co-authored-by: Hui Zhao <10602282+HuiSF@users.noreply.github.com>

* Update index.mdx (#7253)

Modified link for "Serverless APIs" points to the correct URL.

* Add tests to inline filter component for nested inline filters (#7274)

* [Gen 2][Bugfix] Update the flutter mobile support doc. (#7245)

* Update the flutter mobile support doc.

* Add file name.

* Add Safe Area.

* chore(main): replace Twitter logo with X logo (#7295)

* chore(main): replace Twitter logo with X logo

* update tests,snapshots, use x.com link instead of twitter.com

* Fix gen-1 storage code (#7284)

* fix(main): allow code elements to work in h2/h3 headings with anchor links (#7292)

* fix: allow code elements to work in h2/h3 headings with anchor links

* update test

* add comments to describe logic

* fix(main): allow tablist in Blockswitcher to be scrollable (#7294)

* allow tablist to be scrollable

* add scroll padding

* Remove scroll padding because firefox hates it

* chore(main): update X icon name (#7324)

* [Gen2][Backend] Update casing of MFA mode. (#7218)

* fix(main): update overflow background color in dark mode (#7316)

* fix(main): update background color in darkmode

* fix darkmode when system default is used

* StoragePath Documentation for Gen1 (#7279)

* storage: update swift storage with storage path

* chore: update swift storage docs with storage path

* chore: update storage getting started content

* chore: add callout warning to file access level

* chore: update gen2 callout

* chore: convert fragments to inline filter

* update storage path example

* Android Gen2 Storage

* remove upload from getting started

* Add Using Storagepath

* add content to storage path page

* Expand storagepath

* improve doc

* update callout message

* modify file access level callout

* add accidental remove

* gramatical issues

* Update src/pages/[platform]/build-a-backend/storage/download/index.mdx

Co-authored-by: Jordan Nelson <nejrd@amazon.com>

* Update src/pages/[platform]/build-a-backend/storage/upload/index.mdx

Co-authored-by: Jordan Nelson <nejrd@amazon.com>

* Update src/pages/[platform]/build-a-backend/storage/storagepath/index.mdx

Co-authored-by: Jordan Nelson <nejrd@amazon.com>

* Update src/pages/[platform]/build-a-backend/storage/list/index.mdx

Co-authored-by: Jordan Nelson <nejrd@amazon.com>

* Update src/pages/[platform]/build-a-backend/storage/remove/index.mdx

Co-authored-by: Jordan Nelson <nejrd@amazon.com>

* Bump Android version

---------

Co-authored-by: Tuan Pham <phantum@amazon.com>
Co-authored-by: Jordan Nelson <nejrd@amazon.com>

* Update npx amplify generate config -> outputs - Gen2 doc (#7344)

npx amplify generate config is throwing 
>>Unknown command: config

Generates post deployment artifacts

Commands:
  amplify generate outputs               Generates amplify outputs
  amplify generate forms                 Generates UI forms
  amplify generate graphql-client-code   Generates graphql API code
  amplify generate schema-from-database  Generates typescript data schema from a
                                          SQL database

* chore: add kotlin update to docs and formatting changes for flutter (#7023)

* chore: add kotlin update to docs and formatting changes for new flutter build.gradle creation

* chore: remove steps for apps created with flutter 3.16 and earlier

* JS Gen2 Storage Docs (#7323)

* [Gen2 Storage JS] DownloadData doc updates (#7049)
* [JS] Update migration docs to use path (#7143)
* [JS] Storage API - path update (#7145)
* [Gen2 Storage JS] Update version and path strings (#7307)
* fix missed $ in string

---------

Co-authored-by: Jim Blanchard <jim.l.blanchard@gmail.com>

* update sandbox secret management (#7108)

* update sandbox secret management

* Update src/pages/gen2/deploy-and-host/sandbox-environments/features/index.mdx

* Update src/pages/gen2/deploy-and-host/sandbox-environments/features/index.mdx

* Update src/pages/gen2/deploy-and-host/sandbox-environments/features/index.mdx

* Update src/pages/gen2/deploy-and-host/sandbox-environments/features/index.mdx

* Update src/pages/gen2/deploy-and-host/sandbox-environments/features/index.mdx

---------

Co-authored-by: josef <josef.aidt@gmail.com>

* add angular specific code snippet (#7353)

* add angular specific code snippet

* update dist directory path

* chore(gen2): replace authMode 'iam' with 'identityPool' (#7370)

* fix: Typos in JS Auth migration & getting started guides (#7371)

* amplifyconfiguration.json -> amplify_outputs.json (#7346)

* amplifyconfiguration.json -> amplify_outputs.json

* configuration file -> outputs file

* update all references to "import *config" to "import outputs"

* Update src/pages/gen2/build-a-backend/server-side-rendering/index.mdx

Co-authored-by: Amplifiyer <51211245+Amplifiyer@users.noreply.github.com>

---------

Co-authored-by: Amplifiyer <51211245+Amplifiyer@users.noreply.github.com>

* re add action to check for console errors (#6471)

* re add action to check for console errors

* add get sitemap links script

* update console error scripts

* remove http-server action and using python server instead

* revert change to pr broken links action

* use LOCALHOST constant

* check console errors

* upgrade node

* upgrade github-script

* update

* change filetype to .mjs

* fix reference

* .

* working

* .

* back to js

* .

* catch error

* merge conflicts

* .

* upgrade checkout script

* upgrade checkout script

* run on prod build, exclude addtl marketing script

* exclude more scripts

* .

* .

* remove image

* add photo back in

* change name of problem image

* change filename

---------

Co-authored-by: Jacob Logan <lognjc@amazon.com>
Co-authored-by: katiegoines <katiegoines@gmail.com>

* Add resolution for ejs (#7413)

* Chore: JS List API doc (#7408)

* minor doc fix

* Apply suggestions from code review

Co-authored-by: Scott Rees <6165315+reesscot@users.noreply.github.com>

---------

Co-authored-by: Scott Rees <6165315+reesscot@users.noreply.github.com>

* Fix merge conflict

* Fix merge conflict

* Remove file that should only exist in gen1

* Remove file that should only exist in gen1

* Undo changes that shouldn't be there

---------

Co-authored-by: Jim Eagan <84857865+hibler13@users.noreply.github.com>
Co-authored-by: Kevin Old <kevold@amazon.com>
Co-authored-by: Jim Blanchard <jim.l.blanchard@gmail.com>
Co-authored-by: Ankit Shah <22114629+ankpshah@users.noreply.github.com>
Co-authored-by: Katie Goines <30757403+katiegoines@users.noreply.github.com>
Co-authored-by: katiegoines <katiegoines@gmail.com>
Co-authored-by: Dan Kiuna <dankiuna@gmail.com>
Co-authored-by: Kihara, Takuya <gray@tacck.net>
Co-authored-by: Tyler Roach <tjroach@amazon.com>
Co-authored-by: Rene Brandel <4989523+renebrandel@users.noreply.github.com>
Co-authored-by: Elijah Quartey <Equartey@users.noreply.github.com>
Co-authored-by: Heather Buchel <hbuchel@gmail.com>
Co-authored-by: John Corser <johnpc@umich.edu>
Co-authored-by: Heather Pundt <119376175+heatheramz@users.noreply.github.com>
Co-authored-by: Nikhil Swaminathan <2429410+swaminator@users.noreply.github.com>
Co-authored-by: Jay Raval <jay.ambrish.raval@gmail.com>
Co-authored-by: David McAfee <mcafd@amazon.com>
Co-authored-by: Kethan sai <ykethan@amazon.com>
Co-authored-by: Michael Law <1365977+lawmicha@users.noreply.github.com>
Co-authored-by: erinleigh90 <106691284+erinleigh90@users.noreply.github.com>
Co-authored-by: Edward Foyle <foyleef@amazon.com>
Co-authored-by: Adi <34354177+the1adi@users.noreply.github.com>
Co-authored-by: Aditya Shahani <theadi@amazon.com>
Co-authored-by: josef <josef.aidt@gmail.com>
Co-authored-by: jacoblogan <jacob.maiola.logan@gmail.com>
Co-authored-by: Jacob Logan <lognjc@amazon.com>
Co-authored-by: Scott Rees <6165315+reesscot@users.noreply.github.com>
Co-authored-by: Chris Bonifacio <christopher.bonifacio@gmail.com>
Co-authored-by: Roshane Pascual <rtpascual@users.noreply.github.com>
Co-authored-by: Charles Shin <shin.charles11@gmail.com>
Co-authored-by: Ujjwol Shrestha <usewall05@gmail.com>
Co-authored-by: Gen Tamura <gen.tamura84@gmail.com>
Co-authored-by: dwittle <72715628+dwittle@users.noreply.github.com>
Co-authored-by: Anil Maktala <maktala.anil@gmail.com>
Co-authored-by: israx <70438514+israx@users.noreply.github.com>
Co-authored-by: Hui Zhao <10602282+HuiSF@users.noreply.github.com>
Co-authored-by: Nairi Areg <51801223+NairiAreg@users.noreply.github.com>
Co-authored-by: spivakov83 <spivakov83@gmail.com>
Co-authored-by: Harshita Daddala <harshita.d11@gmail.com>
Co-authored-by: derrik <fleminde@mail.gvsu.edu>
Co-authored-by: derrik.fleming <derrik.fleming@spindance.com>
Co-authored-by: Chris F <5827964+cshfang@users.noreply.github.com>
Co-authored-by: Kamil Sobol <sobol.k.r@gmail.com>
Co-authored-by: Tim Schmelter <schmelte@amazon.com>
Co-authored-by: yuhengshs <94558971+yuhengshs@users.noreply.github.com>
Co-authored-by: Di Wu <diwud@amazon.com>
Co-authored-by: Guy Pavlov <guy.pavlov84@gmail.com>
Co-authored-by: abhisuma02 <abhisuma@amazon.com>
Co-authored-by: Muhammed Salih Guler <muhammedsalihguler@gmail.com>
Co-authored-by: Danny Banks <djb@amazon.com>
Co-authored-by: Amplifiyer <51211245+Amplifiyer@users.noreply.github.com>
Co-authored-by: Tuan Pham <phantum@amazon.com>
Co-authored-by: Jordan Nelson <nejrd@amazon.com>
Co-authored-by: Susmitha <sushpatg@amazon.com>
Co-authored-by: Kha Truong <64438356+khatruong2009@users.noreply.github.com>
Co-authored-by: ashika112 <155593080+ashika112@users.noreply.github.com>
Co-authored-by: Ivan Artemiev <29709626+iartemiev@users.noreply.github.com>
  • Loading branch information
Show file tree
Hide file tree
Showing 22 changed files with 236 additions and 45 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
/src/themes @aws-amplify/documentation-team
/src/utils @aws-amplify/documentation-team
/tasks @aws-amplify/documentation-team
.github @aws-amplify/documentation-team

#Protected Content
/src/protected @reesscot @srquinn21 @Milan-Shah @swaminator
38 changes: 38 additions & 0 deletions .github/workflows/check_for_console_errors.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: CheckConsoleErrors
on:
pull_request:
branches: [main]
types: [opened, synchronize]
permissions:
contents: read
jobs:
CheckConsoleErrors:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.2 https://github.com/actions/checkout/commit/b4ffde65f46336ab88eb53be808477a3936bae11
- name: Setup Node.js 20.x
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 https://github.com/actions/setup-node/commit/e33196f7422957bea03ed53f6fbb155025ffc7b8
with:
node-version: 20.x
- name: Install Dependencies
run: yarn
- name: Run Build
run: yarn build:release
env:
NODE_OPTIONS: --max_old_space_size=4096
- name: Run Server
run: |
python -m http.server 3000 -d ${{ vars.BUILD_DIR }} &
sleep 5
- name: Run Console Errors
id: consoleErrors
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1 https://github.com/actions/github-script/commit/d7906e4ad0b1822421a7e6a35d5ca353c962f410
with:
result-encoding: string
script: |
const { consoleErrors } = require('./tasks/console-errors.js');
return await consoleErrors();
- name: Fail if console errors have been found
if: ${{ steps.consoleErrors.outputs.result }}
run: exit 1
2 changes: 1 addition & 1 deletion cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -1520,7 +1520,7 @@
"privatesaccess",
"menudetaileditors",
"editorgroupaccess",
"publicauthreadonly",
"authreadonly",
"envs",
"Onetoone",
"onetomany",
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@
"@adobe/css-tools": "4.3.2",
"follow-redirects": "^1.15.6",
"ip": "2.0.1",
"sharp": "0.32.6"
"sharp": "0.32.6",
"ejs": "3.1.10"
},
"scripts": {
"clean": "rm -rf node_modules yarn.lock",
Expand Down
File renamed without changes
8 changes: 4 additions & 4 deletions src/components/BlockSwitcher/__tests__/BlockSwitcher.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ describe('BlockSwitcher', () => {
const blockSwitcher = await screen.findByText(blockAContent);
expect(blockSwitcher).toBeInTheDocument();
});

it('should have more than one Block', async () => {
render(component);
expect(component.props.children.length).toBeGreaterThan(1);
});

it('should show the first Block as default', async () => {
render(component);
const tabs = await screen.getAllByRole('tab');
Expand All @@ -39,7 +39,7 @@ describe('BlockSwitcher', () => {
expect(panels[1]).not.toHaveClass('amplify-tabs__panel--active');
expect(panels[2]).not.toHaveClass('amplify-tabs__panel--active');
});

it('should load all Blocks to the DOM', async () => {
render(component);
const blockA = await screen.findByText(blockAContent);
Expand All @@ -49,7 +49,7 @@ describe('BlockSwitcher', () => {
expect(blockB).toBeInTheDocument();
expect(blockC).toBeInTheDocument();
});

it('should switch tabs upon click', async () => {
render(component);
const tabs = await screen.getAllByRole('tab');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ npx ampx sandbox

</InlineFilter>

After a successful deployment, this command also generates a configuration file (`amplify_outputs.json`) to enable your frontend app to connect to your backend resources. The values you configure in your backend authentication resource are set in the generated configuration file to automatically configure the frontend [`Authenticator connected component`](https://ui.docs.amplify.aws/react/connected-components/authenticator).
After a successful deployment, this command also generates an outputs file (`amplify_outputs.json`) to enable your frontend app to connect to your backend resources. The values you configure in your backend authentication resource are set in the generated outputs file to automatically configure the frontend [`Authenticator connected component`](https://ui.docs.amplify.aws/react/connected-components/authenticator).

## Connect your application code to your auth resource

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,11 @@ npx ampx sandbox --outputs-format dart --outputs-out-dir lib

## Connect your application code to the data backend

Once the cloud sandbox is up and running, it will also create an `amplifyconfiguration.json` file, which includes the relevant connection information to your data backend, like your API endpoint URL and API key.
Once the cloud sandbox is up and running, it will also create an `amplify_outputs.json` file, which includes the relevant connection information to your data backend, like your API endpoint URL and API key.

To connect your frontend code to your backend, you need to:

1. configure the Amplify library with the Amplify client configuration file
1. configure the Amplify library with the Amplify client configuration file (`amplify_outputs.json`)
2. generate a new API client from the Amplify library
3. make an API request with end-to-end type-safety

Expand All @@ -133,9 +133,9 @@ In your app's entry point, typically **main.tsx** for React apps created using V

```tsx title="src/main.tsx"
import { Amplify } from 'aws-amplify';
import config from '../amplifyconfiguration.json';
import outputs from '../amplify_outputs.json';

Amplify.configure(config);
Amplify.configure(outputs);
```

</InlineFilter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,16 @@ npm add aws-amplify @aws-amplify/adapter-nextjs

You will need to create a `runWithAmplifyServerContextRunner` function to use Amplify APIs on the server-side of your Next.js app.

You can create an `amplifyServerUtils.ts` file under a `utils` folder in your codebase. In this file, you will import the Amplify configuration object from the `amplifyconfiguration.json` file that is generated by the Amplify CLI, and use the `createServerRunner` function to create the `runWithAmplifyServerContextRunner` function.
You can create an `amplifyServerUtils.ts` file under a `utils` folder in your codebase. In this file, you will import the Amplify backend outputs from the `amplify_outputs.json` file that is generated by the Amplify CLI, and use the `createServerRunner` function to create the `runWithAmplifyServerContextRunner` function.

For example, the `utils/amplifyServerUtils.ts` file may contain the following content:

```typescript
import { createServerRunner } from '@aws-amplify/adapter-nextjs';
import config from '@/amplifyconfiguration.json';
import outputs from '@/amplify_outputs.json';

export const { runWithAmplifyServerContext } = createServerRunner({
config
outputs
});
```

Expand All @@ -78,10 +78,10 @@ When you use the Amplify library on the client-side of your Next.js app, you wil
```typescript
'use client';

import config from '@/amplifyconfiguration.json';
import outputs from '@/amplify_outputs.json';
import { Amplify } from 'aws-amplify';

Amplify.configure(config, {
Amplify.configure(outputs, {
ssr: true // required when using Amplify with Next.js
});

Expand Down Expand Up @@ -110,9 +110,9 @@ If you're using the Next.js App Router, you can create a client component to con
'use client';

import { Amplify } from 'aws-amplify';
import config from '../amplifyconfiguration.json';
import outputs from '../amplify_outputs.json';

Amplify.configure(config, { ssr: true });
Amplify.configure(outputs, { ssr: true });

export default function ConfigureAmplifyClientSide() {
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ Next, create a `components` folder in the root of your project and copy the cont

import { Amplify } from "aws-amplify";

import config from "@/amplifyconfiguration.json";
import outputs from "@/amplify_outputs.json";

Amplify.configure(config, { ssr: true });
Amplify.configure(outputs, { ssr: true });

export default function ConfigureAmplifyClientSide() {
return null;
Expand Down Expand Up @@ -123,10 +123,10 @@ import { generateServerClientUsingCookies } from "@aws-amplify/adapter-nextjs/ap
import { getCurrentUser } from "aws-amplify/auth/server";

import { type Schema } from "@/amplify/data/resource";
import config from "@/amplifyconfiguration.json";
import outputs from "@/amplify_outputs.json";

export const { runWithAmplifyServerContext } = createServerRunner({
config,
outputs,
});

export const cookiesClient = generateServerClientUsingCookies<Schema>({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Please refer to this Amazon CodeCatalyst [guide](https://docs.aws.amazon.com/cod

### Step 3: Update build specification

Add the `npx ampx generate outputs --branch $AWS_BRANCH --app-id $AWS_APP_ID` command to the build spec and comment out the `npx ampx pipeline-deploy --branch $AWS_BRANCH --app-id $AWS_APP_ID` command. `ampx pipeline-deploy` runs a script to deploy backend updates, while `amplify generate config` fetches the latest `amplifyconfiguration.json` for the specified environment.
Add the `npx amplify generate config --branch $AWS_BRANCH --app-id $AWS_APP_ID` command to the build spec and comment out the `npx amplify pipeline-deploy --branch $AWS_BRANCH --app-id $AWS_APP_ID` command. `amplify pipeline-deploy` runs a script to deploy backend updates, while `amplify generate config` fetches the latest `amplify_outputs.json` for the specified environment.

![Screenshot of Build image settings section in AWS Amplify Gen 2 console, with details about the app build specification](images/gen2/cross-account-deployments/pipeline10.png)

Expand Down Expand Up @@ -183,4 +183,4 @@ Next, you can review the result of the workflow run from the **Runs** tab:

![Screenshot of CodeCatalyst console showing the Workflows section, focusing on the Runs tab](images/gen2/cross-account-deployments/pipeline11.png)

Done! You have successfully set up a custom cross-account pipeline to deploy your frontend and backend for apps built using Amplify Gen 2. To summarize, this custom pipeline will enable you to deploy your backend initially with your `staging` environment using `ampx pipeline-deploy` in the CodeCatalyst workflow and `amplify generate config` will generate the `amplifyconfiguration.json` file for the `main` branch. Amplify Hosting will not deploy backend resources as part of the build and instead will use the deployed backend resources from the `main` branch. Once the staging environment deploys successfully, a similar process will be followed to deploy your `production` environment in a different AWS account.
Done! You have successfully set up a custom cross-account pipeline to deploy your frontend and backend for apps built using Amplify Gen 2. To summarize, this custom pipeline will enable you to deploy your backend initially with your `staging` environment using `amplify pipeline-deploy` in the CodeCatalyst workflow and `amplify generate config` will generate the `amplify_outputs.json` file for the `main` branch. Amplify Hosting will not deploy backend resources as part of the build and instead will use the deployed backend resources from the `main` branch. Once the staging environment deploys successfully, a similar process will be followed to deploy your `production` environment in a different AWS account.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ You can set up your backend deployments using the following steps:
<source src="/images/gen2/fullstack-branching/auto-build.mp4" />
</video>

3. Update the Amplify build-spec to add `npx ampx generate outputs --branch $AWS_BRANCH --app-id $AWS_APP_ID` and comment out the `pipeline-deploy` script. `ampx pipeline-deploy` runs a script to deploy backend updates, while `amplify generate config` fetches the latest `amplifyconfiguration.json` for the specified environment.
3. Update the Amplify build-spec to add `npx amplify generate config --branch $AWS_BRANCH --app-id $AWS_APP_ID` and comment out the `pipeline-deploy` script. `amplify pipeline-deploy` runs a script to deploy backend updates, while `amplify generate config` fetches the latest `amplify_outputs.json` for the specified environment.

![custom-ci](/images/gen2/fullstack-branching/custom-ci.png)

Expand Down Expand Up @@ -114,4 +114,4 @@ aws amplify create-webhook --app-id AMPLIFY-APPID --branch-name main --region R
-H "Content-Type:application/json"; fi
```

4. This should trigger a build in your Amplify app. Amplify CI will build and first generate the `amplifyconfiguration.json` for the branch and then build, deploy, and host the frontend.
4. This should trigger a build in your Amplify app. Amplify CI will build and first generate the `amplify_outputs.json` for the branch and then build, deploy, and host the frontend.
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ npm add @aws-amplify/backend-cli aws-amplify @aws-amplify/ui-react
npx ampx generate outputs --branch main --app-id BACKEND-APPID
```

This will generate the `amplifyconfiguration.json` file that contains all the information about your backend at the root of your project.
This will generate the `amplify_outputs.json` file that contains all the information about your backend at the root of your project.

<img
src="/images/gen2/fullstack-branching/multirepo3.png"
alt="Screenshot of project folder contents with amplifyconfiguration.json file highlighted"
alt="Screenshot of project folder contents with amplify_outputs.json file highlighted"
width="300"
/>

Expand All @@ -79,13 +79,13 @@ This will generate the `amplifyconfiguration.json` file that contains all the in
// pages/_app.tsx
import { withAuthenticator } from '@aws-amplify/ui-react';
import { Amplify } from 'aws-amplify';
import config from '@/amplifyconfiguration.json';
import outputs from '@/amplify_outputs.json';
import '@aws-amplify/ui-react/styles.css';
import '@/styles/globals.css';
import type { AppProps } from 'next/app';

// configure the Amplify client library with the configuration generated by `ampx sandbox`
Amplify.configure(config);
// configure the Amplify client library with the configuration generated by `amplify sandbox`
Amplify.configure(outputs);

function App({ Component, pageProps }: AppProps) {
return <Component {...pageProps} />;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ You can update your app build settings to share resources across branches. From

![The build specification YAML file on the Build settings page in Amplify console.](/images/gen2/fullstack-branching/build-settings.png)

Update the build settings for the `backend` phase to run `npx ampx generate outputs --branch dev app-id $AWS_APP_ID` to generate the `amplifyconfiguration.json` file for all branches other than `main` or `dev`. After this update, any new deployed branches will not deploy backend resources as part of the build and instead will use the deployed backend resources from the `dev` branch.
Update the build settings for the `backend` phase to run `npx amplify generate config --branch dev app-id $AWS_APP_ID` to generate the `amplify_outputs.json` file for all branches other than `main` or `dev`. After this update, any new deployed branches will not deploy backend resources as part of the build and instead will use the deployed backend resources from the `dev` branch.

```yaml title="amplify.yml"
version: 1
Expand Down
2 changes: 1 addition & 1 deletion src/pages/[platform]/reference/cli-commands/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ npx ampx generate outputs --stack amplify-nextamplifygen2-josef-sandbox-ca85e108

#### Use with mobile applications

Similar to `sandbox`, you can specify an alternate configuration file format by using `--format`:
Similar to `sandbox`, you can specify an alternate outputs file format by using `--format`:

```bash title="Terminal" showLineNumbers={false}
npx ampx generate outputs --stack amplify-nextamplifygen2-josef-sandbox-ca85e1081b
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import common_configureaccess from '/src/fragments/lib/storage/native_common/con
<Callout warning>
We recommend using the new [Amplify Gen2](https://docs.amplify.aws/gen2/build-a-backend/storage/) experience when defining file access permissions as it offers a more flexible approach to customize access to files.

Note: `accessLevel` parameter is deprecated and maybe removed in next major version.
Note: `accessLevel` parameter is deprecated and may be removed in the next major version.
</Callout>

Storage module can manage files with three different access levels; `guest`, `protected` and `private`. The Amplify CLI configures three different access levels on the storage bucket: guest, protected and private. When you run `amplify add storage`, the CLI will configure appropriate IAM policies on the bucket using a Cognito identity pool Role. You will have the option of adding CRUD (Create/Update, Read and Delete) based permissions as well, so that Authenticated and Guest users will be granted limited permissions within these levels.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,4 +250,8 @@ const loadNextPage = async () => {

<Callout>Note: The range of pageSize can be from 0 - 1000.</Callout>

## List with no prefix (Deprecated)

The usage of the `list` API without a specified prefix `await list()` or with an empty string as the prefix `await list({ prefix: "" })` is now deprecated and may be removed in the next major version.

</InlineFilter>
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ export function getStaticProps(context) {
<InlineFilter filters={['javascript', 'react-native', 'angular', 'nextjs', 'react', 'vue']}>
You can now use the `path` parameter in the API to access any path within your S3 bucket. This provides more flexibility than the predefined `protected`, `private`, or `guest` folder access levels, allowing you to create and manage a storage structure tailored to your needs.

Note : `path` parameter can not be empty or start with a '/' (leading slash)
<Callout>Note: `path` parameter can not be empty or start with a '/' (leading slash)</Callout>

The sections below explain how to use existing `guest`, `protected`, and `private` resources with path-based APIs.

## Using Guest accessLevel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ If you want your data model to be publicly accessible, switch to API_KEY or IAM
1. Using the *Books* data model that you created in the [Create a data model example](/gen1/[platform]/tools/console/data/data-model/#Create-a-data-model-example), set the authorization mode to **API Key**.
2. In the **Model** pane on the right, expand the **Anyone** window. Choose **Read** to specify that any signed in user has read access to the data in the *Book* model.

![](/images/console/7_publicauthreadonly.png)
![](/images/console/7_authreadonly.png)
Loading

0 comments on commit d070fc2

Please sign in to comment.