Skip to content

Instantly share code, notes, and snippets.

@clstl
Created January 9, 2017 08:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clstl/b3937121f83ad6d47f51a19bccb91bbf to your computer and use it in GitHub Desktop.
Save clstl/b3937121f83ad6d47f51a19bccb91bbf to your computer and use it in GitHub Desktop.
provider:
# ...
vpc:
securityGroupIds:
- Ref: 'LambdaExecSecurityGroup'
subnetIds:
- Ref: 'SubnetAPrivate'
resources:
Resources:
$ref: ./resources.json
Outputs:
VPC:
Description: VPC.
Value:
Ref: VPC
SubnetAPublic:
Description: Subnet A public.
Value:
Ref: SubnetAPublic
SubnetAPrivate:
Description: Subnet A private.
Value:
Ref: SubnetAPrivate
LambdaExecSecurityGroup:
Description: Route table public.
Value:
Ref: LambdaExecSecurityGroup
SchedulingCache:
Description: Scheduler Redis Cache
Value:
Ref: SchedulingCache
functions:
scheduler:
handler: handler.scheduler
memory: 1024
timeout: 300
environment:
SchedulerSecurityGroup:
Ref: LambdaExecSecurityGroup
SchedulingCacheId:
Ref: SchedulingCache
SchedulingCacheAddr:
"Fn::GetAtt": [ SchedulingCache, RedisEndpoint.Address ]
SchedulingCachePort:
"Fn::GetAtt": [ SchedulingCache, RedisEndpoint.Port ]
custom:
defaultRegion: us-east-1
region: ${opt:region, self:custom.defaultRegion}
stage: ${opt:stage}
writeEnvVars:
SERVICE_NAME: ${self:service}
STAGE: ${self:custom.stage}
REGION: ${self:custom.region}
REQUESTS_TABLE: ${opt:stage}-requests
plugins:
- serverless-plugin-write-env-vars
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment