Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@ provider:
- "s3:*"
Resource:
- "*"
deploymentBucket: # Custom configuration for deployment bucket is unique and put here
deploymentBucket: # Custom configuration for deployment bucket
blockPublicAccess: true
environment:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@karikarshivani hi - quick question - was there an advantage to originally keeping this separate ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @rgs1109! Yes, the provider.environment section defines the environment variable globally (so all functions can access the value) and the functions.<function_name>.environment section defines the environment variable locally (so only that function can access the value). Hope that helps! :)

INPUT_BUCKET: ${env:INPUT_BUCKET}

functions:
saf:
Expand All @@ -32,6 +30,7 @@ functions:
existing: true # test pending in CMS
environment:
COMMAND_STRING: ${env:COMMAND_STRING}
INPUT_BUCKET: ${env:INPUT_BUCKET}
INPUT_PREFIX: ${env:INPUT_PREFIX, ""}
OUTPUT_BUCKET: ${env:OUTPUT_BUCKET, env:INPUT_BUCKET}
OUTPUT_PREFIX: ${env:OUTPUT_PREFIX, "results/"}
Expand Down