Add AWS lambda lib
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -128,6 +128,6 @@ fabric.properties
|
|||||||
|
|
||||||
resouces/facts.txt
|
resouces/facts.txt
|
||||||
|
|
||||||
secrets.yaml
|
secrets.local
|
||||||
|
|
||||||
resources/facts.txt
|
resources/facts.txt
|
||||||
|
|||||||
2
.idea/groupme-facts-bot.iml
generated
2
.idea/groupme-facts-bot.iml
generated
@@ -4,7 +4,7 @@
|
|||||||
<content url="file://$MODULE_DIR$">
|
<content url="file://$MODULE_DIR$">
|
||||||
<excludeFolder url="file://$MODULE_DIR$/venv" />
|
<excludeFolder url="file://$MODULE_DIR$/venv" />
|
||||||
</content>
|
</content>
|
||||||
<orderEntry type="inheritedJdk" />
|
<orderEntry type="jdk" jdkName="Python 3.7 (groupme-facts-bot)" jdkType="Python SDK" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
</component>
|
</component>
|
||||||
<component name="TestRunnerService">
|
<component name="TestRunnerService">
|
||||||
|
|||||||
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
@@ -3,5 +3,5 @@
|
|||||||
<component name="JavaScriptSettings">
|
<component name="JavaScriptSettings">
|
||||||
<option name="languageLevel" value="ES6" />
|
<option name="languageLevel" value="ES6" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.7 (avan-facts)" project-jdk-type="Python SDK" />
|
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.7 (groupme-facts-bot)" project-jdk-type="Python SDK" />
|
||||||
</project>
|
</project>
|
||||||
39
config.yaml
Normal file
39
config.yaml
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
region: us-east-1
|
||||||
|
|
||||||
|
function_name: avan_facts_bot
|
||||||
|
handler: service.handler
|
||||||
|
description: Random Avan facts vis groupme
|
||||||
|
runtime: python3.8
|
||||||
|
# role: lambda_basic_execution
|
||||||
|
|
||||||
|
# S3 upload requires appropriate role with s3:PutObject permission
|
||||||
|
# (ex. basic_s3_upload), a destination bucket, and the key prefix
|
||||||
|
# bucket_name: 'example-bucket'
|
||||||
|
# s3_key_prefix: 'path/to/file/'
|
||||||
|
|
||||||
|
# if access key and secret are left blank, boto will use the credentials
|
||||||
|
# defined in the [default] section of ~/.aws/credentials.
|
||||||
|
aws_access_key_id: ${AWS_TOKEN_ID}
|
||||||
|
aws_secret_access_key: ${AWS_TOKEN}
|
||||||
|
|
||||||
|
# dist_directory: dist
|
||||||
|
# timeout: 15
|
||||||
|
# memory_size: 512
|
||||||
|
# concurrency: 500
|
||||||
|
#
|
||||||
|
|
||||||
|
# Experimental Environment variables
|
||||||
|
environment_variables:
|
||||||
|
BOT_NAME: ${BOT_NAME}
|
||||||
|
GROUPME_KEY: ${GROUPME_KEY}
|
||||||
|
|
||||||
|
# If `tags` is uncommented then tags will be set at creation or update
|
||||||
|
# time. During an update all other tags will be removed except the tags
|
||||||
|
# listed here.
|
||||||
|
#tags:
|
||||||
|
# tag_1: foo
|
||||||
|
# tag_2: bar
|
||||||
|
|
||||||
|
# Build options
|
||||||
|
build:
|
||||||
|
source_directories: lib # a comma delimited list of directories in your project root that contains source to package.
|
||||||
4
event.json
Normal file
4
event.json
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"pi": 3.14,
|
||||||
|
"e": 2.718
|
||||||
|
}
|
||||||
@@ -1,2 +1,3 @@
|
|||||||
GroupyAPI
|
GroupyAPI
|
||||||
pytest
|
pytest
|
||||||
|
python-lambda
|
||||||
8
service.py
Normal file
8
service.py
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
|
||||||
|
def handler(event, context):
|
||||||
|
# Your code goes here!
|
||||||
|
e = event.get("e")
|
||||||
|
pi = event.get("pi")
|
||||||
|
return e + pi
|
||||||
Reference in New Issue
Block a user