-
Notifications
You must be signed in to change notification settings - Fork 103
Initial implementation for function secret access #836
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: 6c9e653 The changes in this PR will be included in the next version bump. This PR includes changesets to release 12 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
edwardfoyle
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, just left some small comments.
Only somewhat big thing is I think this change warrants some e2e coverage. I'd recommend adding it to the existing data_storage_auth_with_triggers.ts test which already sets up some secrets to use for auth. You'd need to update the "specialTestFunction" definition to reference one of those secrets and then verify that it was able to fetch it at runtime. You could verify by adding the resolved secret value to the response payload here and then verify you got the right thing here
|
One other thing that we handle with auth secrets and need to handle here as well is falling back to "shared" secrets if a branch-specific secret doesn't exist. You can see where we do this in the secret resolver custom resource here I'm thinking we should figure out some way to refactor that code such that it can be used in the custom resource lambda and also injected into the banner of customer lambdas. |
|
Closing this PR for #845 in order to change the source branch for e2e test checks. |
Problem
defineFunctiondoes not have access to secrets created withnpx amplify sandbox secret.Issue number, if available:
Changes
environmentparameter ofdefineFunction.backend-secrettoplatform-coreto be used across multiple packages.Corresponding docs PR, if applicable:
Validation
Used a test project with local changes to deploy a function with secrets using
defineFunctionand verified the following:Checklist
run-e2elabel set.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.