1717- [ Installation and Configuration] ( #installation-and-configuration )
1818 - [ Running the Initial Setup / Settings] ( #running-the-initial-setup--settings )
1919 - [ Alternative: Generating Settings via CLI] ( #alternative-generating-settings-via-cli )
20- - [ Using command-line arguments] ( #using-command-line-arguments )
21- - [ Using environment variables] ( #using-environment-variables )
22- - [ Command-line arguments override environment variables] ( #command-line-arguments-override-environment-variables )
2320 - [ Nested JSON Configurations] ( #nested-json-configurations )
24- - [ Configure CORS with nested JSON] ( #configure-cors-with-nested-json )
25- - [ Configure VPC settings] ( #configure-vpc-settings )
26- - [ Configure environment variables] ( #configure-environment-variables )
27- - [ Configure Lambda layers] ( #configure-lambda-layers )
2821- [ Basic Usage] ( #basic-usage )
2922 - [ Initial Deployments] ( #initial-deployments )
3023 - [ Updates] ( #updates )
8578 - [ Raising AWS Service Limits] ( #raising-aws-service-limits )
8679 - [ Dead Letter Queues] ( #dead-letter-queues )
8780 - [ Elastic File System (EFS)] ( #elastic-file-system-efs )
81+ - [ Basic Configuration] ( #basic-configuration )
82+ - [ Configuration Options] ( #configuration-options )
83+ - [ Security Group Configuration] ( #security-group-configuration )
84+ - [ Accessing EFS in Your Code] ( #accessing-efs-in-your-code )
85+ - [ Notes] ( #notes )
8886 - [ Unique Package ID] ( #unique-package-id )
8987 - [ Application Load Balancer Event Source] ( #application-load-balancer-event-source )
9088 - [ Endpoint Configuration] ( #endpoint-configuration )
@@ -207,19 +205,26 @@ Instead of using the interactive `init` command, you can also generate your `zap
207205
208206This generates a basic settings file with defaults. You can customize it using ` --config ` arguments or ` ZAPPA_ ` environment variables:
209207
208+ > Using command-line arguments
209+
210210``` bash
211- # Using command-line arguments
212211$ zappa settings --stage production \
213212 --config project_name=myapp \
214213 --config memory_size=1024 \
215214 --config timeout_seconds=60
215+ ```
216+
217+ > Using environment variables
216218
217- # Using environment variables
219+ ``` bash
218220$ export ZAPPA_PROJECT_NAME=myapp
219221$ export ZAPPA_MEMORY_SIZE=1024
220222$ zappa settings --stage production
223+ ```
221224
222- # Command-line arguments override environment variables
225+ > Command-line arguments override environment variables
226+
227+ ``` bash
223228$ export ZAPPA_MEMORY_SIZE=512
224229$ zappa settings --config memory_size=2048 # Uses 2048, not 512
225230```
@@ -228,20 +233,30 @@ $ zappa settings --config memory_size=2048 # Uses 2048, not 512
228233
229234The ` settings ` command supports complex nested JSON structures for advanced configurations like CORS options, VPC settings, and environment variables:
230235
236+ > Configure CORS with nested JSON
237+
231238``` bash
232- # Configure CORS with nested JSON
233239$ zappa settings --stage production \
234240 --config ' cors_options={"allowedOrigins":["*"],"allowedMethods":["GET","POST","PUT"]}'
241+ ```
242+
243+ > Configure VPC settings
235244
236- # Configure VPC settings
245+ ``` bash
237246$ zappa settings --stage production \
238247 --config ' vpc_config={"SubnetIds":["subnet-123","subnet-456"],"SecurityGroupIds":["sg-789"]}'
248+ ```
249+
250+ > Configure environment variables
239251
240- # Configure environment variables
252+ ``` bash
241253$ zappa settings --stage production \
242254 --config ' environment_variables={"DATABASE_URL":"postgres://...","API_KEY":"secret"}'
255+ ```
243256
244- # Configure Lambda layers
257+ > Configure Lambda layers
258+
259+ ``` bash
245260$ zappa settings --stage production \
246261 --config ' layers=["arn:aws:lambda:us-east-1:123:layer:mylayer:1","arn:aws:lambda:us-east-1:123:layer:another:2"]'
247262```
@@ -1623,8 +1638,10 @@ aws ec2 authorize-security-group-ingress \
16231638```
16241639
16251640**CloudFormation/Terraform:**
1641+
1642+ > CloudFormation example
1643+
16261644```yaml
1627- # CloudFormation example
16281645LambdaSecurityGroupNfsIngress:
16291646 Type: AWS::EC2::SecurityGroupIngress
16301647 Properties:
0 commit comments