(aws-amplify-alpha): Ability to set secrets on Amplify application and branch
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 74
Description
### Describe the feature
Currently, you're only able to set environment variables via `environmentVariables` property on `amplify.App` and `amplify.Branch`, but not secrets. I would be nice if we had an option to define this in our IaC and not resolve to creating a script. That way, it's explicit what secrets are necessary for this application to be provisioned.
Dynamic resolving from SSM parameter would be nice to have, but Secrets Manager is good enough.
## Current workaround
> Secrets are stored in AWS Systems Manager Parameter Store under the following naming conventions:
>
> - Secrets that apply to all branches: `/amplify/shared//`
> - Secrets that apply to a specific branch: `/amplify//-branch-/`
A quick workaround would be to create the parameters with the above naming convention, but this only works for shared secrets as those scoped to a branch requires a unique hash which isn't known.
### Use Case
I want to able to express secrets and environment variables needed to provision and run an application in IaC
### Proposed Solution
_No response_
### Other Information
_No response_
### Acknowledgements
- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
### AWS CDK Library version (aws-cdk-lib)
2.250.0
### AWS CDK CLI version
2.1118.0
### Environment details (OS name and version, etc.)
Arch Linux (6.18.13-arch1-1)
Contributor guide
Research direction
No file or test is named. Start at the TypeScript definitions for amplify.App and amplify.Branch, especially environmentVariables, and trace how those properties are represented in the resulting IaC. Use the shared and branch-scoped naming requirements in the issue to define what supported secret configuration and completion should look like.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- cloud, infrastructure
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100