Do you see following warning in your build log?
[WARNING]: !Failed to set up process.env.secrets
Secrets in AWS amplify are very confusing with Gen1 vs Gen1, Frontend vs Backend, build-time vs run-time.
I found that this works:
plus you also need and IAM Service role with permissions to read from SSM parameter store, namely ssm:GetParametersByPath
.
See this immensely helpful comment on github issue:
If you did everything right, you shouldn't see that warning in the build log.