Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to understand deployment methods for Lambda environments. #31

Closed
tashua314 opened this issue Apr 12, 2023 · 3 comments
Closed

Unable to understand deployment methods for Lambda environments. #31

tashua314 opened this issue Apr 12, 2023 · 3 comments
Labels
question Further information is requested

Comments

@tashua314
Copy link

I am having difficulty understanding how to deploy to Lambda environments with s3.
I would greatly appreciate it if you could provide me with detailed instructions, please.

@seratch seratch added the question Further information is requested label Apr 12, 2023
@seratch
Copy link
Owner

seratch commented Apr 12, 2023

Hey @tashua314, it's quite simple. Once you create S3 buckets for installations and OAuth state parameters, you can go through these steps:

# export SLACK_CLIENT_ID=
# export SLACK_CLIENT_SECRET=
# export SLACK_SIGNING_SECRET=
# export SLACK_SCOPES=app_mentions:read,channels:history,groups:history,im:history,mpim:history,chat:write.public,chat:write,users:read
# export SLACK_INSTALLATION_S3_BUCKET_NAME=
# export SLACK_STATE_S3_BUCKET_NAME=
# export OPENAI_S3_BUCKET_NAME=
# npm install -g serverless
# serverless plugin install -n serverless-python-requirements
# serverless deploy

If you still don't get the point, I would suggest going with a different way to deploy the app. For instance, you can deploy the app using this Dockerfile to ECS and any other container services.

@tashua314
Copy link
Author

tashua314 commented Apr 14, 2023

@seratch

Thank you! I have successfully deployed to Lambda and can now be used as a Slackbot!

I have an additional question, if I may ask?

Once I answer, there may be multiple responses. Do you know what might be causing this?

@seratch
Copy link
Owner

seratch commented Apr 14, 2023

@tashua314 With the given information, I cannot pinpoint the cause of your situation, but there may be some kind of race condition issue in this app and/or cold-start issues on the AWS Lambda platform. I'd suggest enabling debug-level logging, and if you find something suspicious, please feel free to share the logs.

Either way, I've provided an answer to your original question. So, let me close this issue now.

@seratch seratch closed this as completed Apr 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants