aws-amplify / amplify-backend

Home to all tools related to Amplify's code-first DX (Gen 2) for building fullstack apps on AWS
Apache License 2.0
176 stars 61 forks source link

Set secret using sandbox --name parameter #1125

Closed jbp35 closed 7 months ago

jbp35 commented 8 months ago

Environment information

System:
  OS: Windows 11 10.0.22000
  CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
  Memory: 1.09 GB / 15.73 GB
Binaries:
  Node: 20.10.0 - C:\Program Files\nodejs\node.EXE
  Yarn: undefined - undefined
  npm: 9.8.1 - C:\Program Files\nodejs\npm.CMD
  pnpm: undefined - undefined
NPM Packages:
  @aws-amplify/backend: 0.12.1
  @aws-amplify/backend-cli: 0.11.1
  aws-amplify: 6.0.19
  aws-cdk: Not Found
  aws-cdk-lib: Not Found
  typescript: 5.4.2
AWS environment variables:
  AWS_NODEJS_CONNECTION_REUSE_ENABLED = 1
  AWS_SDK_LOAD_CONFIG = 1
  AWS_STS_REGIONAL_ENDPOINTS = regional
No CDK environment variables

Description

I am trying to configure secrets within a sandbox. As I work on multiple computers, I am using sandbox --name MyName to use the same sandbox on different system.

Calling npx amplify sandbox --name MyName secret set MY_SECRET does not work. Looking at the created AWS Systems Manager Parameter Store ressource, I think the issue is that the set secret command ignores the --name parameter and create the secret for the default sandbox.

edwardfoyle commented 8 months ago

Hi @jbp35, this is currently not supported but it definitely should be! Marking as a feature request.

AakashKB commented 8 months ago

Yep, can you please list this issue in docs? Spent an hour debugging this.

If you run npx amplify sandbox --name MyName secret list, it shows as if the secret exists, but is not able to pull it on sandbox deploy