Skip to content
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

secrets that do not exist do not error when used with Functions #2075

Open
josefaidt opened this issue Oct 2, 2024 · 1 comment
Open

secrets that do not exist do not error when used with Functions #2075

josefaidt opened this issue Oct 2, 2024 · 1 comment
Labels
feature-request New feature or request function Issue pertaining to Amplify Function

Comments

@josefaidt
Copy link
Contributor

Environment information

System:
  OS: macOS 14.6.1
  CPU: (10) arm64 Apple M1 Pro
  Memory: 168.42 MB / 32.00 GB
  Shell: /opt/homebrew/bin/fish
Binaries:
  Node: 22.8.0 - ~/.local/state/fnm_multishells/13750_1727708399158/bin/node
  Yarn: undefined - undefined
  npm: 10.8.2 - ~/.local/state/fnm_multishells/13750_1727708399158/bin/npm
  pnpm: 9.10.0 - ~/.local/state/fnm_multishells/13750_1727708399158/bin/pnpm
NPM Packages:
  @aws-amplify/auth-construct: Not Found
  @aws-amplify/backend: 1.3.0
  @aws-amplify/backend-auth: Not Found
  @aws-amplify/backend-cli: 1.2.8
  @aws-amplify/backend-data: Not Found
  @aws-amplify/backend-deployer: Not Found
  @aws-amplify/backend-function: Not Found
  @aws-amplify/backend-output-schemas: Not Found
  @aws-amplify/backend-output-storage: Not Found
  @aws-amplify/backend-secret: Not Found
  @aws-amplify/backend-storage: Not Found
  @aws-amplify/cli-core: Not Found
  @aws-amplify/client-config: Not Found
  @aws-amplify/deployed-backend-client: Not Found
  @aws-amplify/form-generator: Not Found
  @aws-amplify/model-generator: Not Found
  @aws-amplify/platform-core: Not Found
  @aws-amplify/plugin-types: Not Found
  @aws-amplify/sandbox: Not Found
  @aws-amplify/schema-generator: Not Found
  aws-amplify: 6.6.2
  aws-cdk: 2.160.0
  aws-cdk-lib: 2.160.0
  typescript: 5.6.2
AWS environment variables:
  AWS_PROFILE = josef
  AWS_REGION = us-east-1
  AWS_STS_REGIONAL_ENDPOINTS = regional
  AWS_NODEJS_CONNECTION_REUSE_ENABLED = 1
  AWS_SDK_LOAD_CONFIG = 1
No CDK environment variables

Describe the feature

When using a secret on a Function that does not exist I am not presented with an error notifying me of the missing secret like I do for Auth. This can be confusing because I will not see an error until the Function is invoked and fails to resolve the secret.

// amplify/functions/say-hello/resource.ts
import { defineFunction, secret } from "@aws-amplify/backend"

export const sayHello = defineFunction({
  name: "say-hello",
  environment: {
  	MY_SECRET: secret("DOES_NOT_EXIST"),
  },
})

Use case

see above

@josefaidt josefaidt added the pending-triage Incoming issues that need categorization label Oct 2, 2024
@josefaidt
Copy link
Contributor Author

marking as a feature request

@josefaidt josefaidt added feature-request New feature or request function Issue pertaining to Amplify Function and removed pending-triage Incoming issues that need categorization labels Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request function Issue pertaining to Amplify Function
Projects
None yet
Development

No branches or pull requests

1 participant