Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
79 lines (74 sloc) 1.88 KB
service: aws-credentials-issuer
package:
exclude:
- ./**
include:
- ./lambda_handler.py
- ./jwks.json
provider:
name: aws
runtime: python3.6
region: eu-central-1
environment:
CLIENT_ID: 'aws-credentials-issuer'
functions:
credentialGeneratorEndpoint:
role: AssumeRole
handler: lambda_handler.generate_credentials
events:
- http:
path: api/credentials
method: get
cors: true
consoleLogin:
role: AssumeRole
handler: lambda_handler.console_login
events:
- http:
path: api/login
method: get
cors: true
resources:
Resources:
AssumeRole:
Type: AWS::IAM::Role
Properties:
RoleName: ${self:service}-${self:provider.stage}
Policies:
- PolicyName: ${self:service}-${self:provider.stage}
PolicyDocument:
Statement:
- Effect: Allow
Action:
- lambda:InvokeFunction
- logs:CreateLogGroup
- logs:CreateLogStream
- logs:PutLogEvents
- logs:DescribeLogStreams
- sts:AssumeRole
- sts:GetCallerIdentity
Resource: "*"
AssumeRolePolicyDocument:
Statement:
- Effect: Allow
Principal:
Service:
- lambda.amazonaws.com
Action:
- sts:AssumeRole
plugins:
- serverless-python-requirements
- serverless-plugin-scripts
- serverless-finch
custom:
pythonRequirements:
dockerizePip: non-linux
scripts:
hooks:
'package:initialize': ./package.sh
'client:deploy:deploy': ./build.sh
client:
bucketName: ianduffy-aws-credentials-issuer
distributionFolder: ui/dist
indexDocument: index.html
errorDocument: index.html