fix: make Amplify frontend SSR deploy functional - #256
Merged
Conversation
Amplify app was configured (platform = WEB_COMPUTE, Next.js SSR) but had two gaps that prevent a working deploy: - No iam_service_role_arn. SSR/compute apps need a service role for Amplify to provision the compute backend and emit CloudWatch logs; without it SSR deploys fail. Add branch-amplify-ssr-role (trust amplify.amazonaws.com) + AdministratorAccess-Amplify. - NEXT_PUBLIC_API_BASE_URL defaulted to "", so the built frontend's apiFetch fell back to localhost:300x ports and could not reach the backend in production. Default it to the deployed API Gateway stage invoke_url; var.api_base_url still overrides when set. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Auto-formatted .tf files with terraform fmt - Updated README.md with terraform-docs Co-authored-by: nourshoreibah <nourshoreibah@users.noreply.github.com>
Contributor
Terraform Plan 📖
|
nourshoreibah
marked this pull request as ready for review
June 30, 2026 03:26
shreeyaadhikari
approved these changes
Jun 30, 2026
Rayna-Yu
approved these changes
Jun 30, 2026
nourshoreibah
added a commit
that referenced
this pull request
Jun 30, 2026
The aws module's `terraform-apply` has been failing on every merge:
InvalidParameterCombination: Cannot upgrade postgres from 17.9 to 17.6
main.tf pinned engine_version = "17.6", but RDS auto-applied a minor upgrade to
17.9 on the live instance. Terraform then tried to "downgrade" it, AWS rejected
it, and the whole aws-module apply aborted — which is why #256's Amplify changes
(SSR service role, NEXT_PUBLIC_API_BASE_URL) never actually applied.
Set engine_version to the live 17.9 and disable auto_minor_version_upgrade so
the version can't drift above the pin again; version bumps are now intentional.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The frontend deployment is broken for 2 reasons
branch-amplify-ssr-role(trustamplify.amazonaws.com) + AWS-managedAdministratorAccess-Amplify; setiam_service_role_arnon the app.NEXT_PUBLIC_API_BASE_URLto the deployed API Gateway stageinvoke_url(var.api_base_urlstill overrides when set).Verification
See terraform plan
🤖 Generated with Claude Code