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

Multiple stacks or instance of librelambda #15

Open
cybernotic opened this issue Oct 30, 2019 · 2 comments
Open

Multiple stacks or instance of librelambda #15

cybernotic opened this issue Oct 30, 2019 · 2 comments

Comments

@cybernotic
Copy link

Hi,

I was hoping that when I provisioned another librelambbda package, it would have given an option to build another instance. Use the same or create another bucket, re-use the lambda convert function or something that will allow you to use different provisions for a test and production instance of Moodle.
Running the script again will give an error: == Creating resource S3 Bucket ==
!!! error/1: Bucket exists !!!

Are you able to update the code so that there are options available to create another instance?
I am looking at this at the moment but for now just tweaking the stack.template.

Regards
David

@mattporritt
Copy link

Hi David,
There is no real reason why you can't use the one AWS stack setup across multiple Moodles. The files sent from each Moodle instance have hashed names so they shouldn't collide and the AWS infrastructure will scale on demand. We use the same stack for test and production instances without issue. If you wanted a little bit more control over user access keys you could copy the user created by the provisioning script and have different api keys between prod and dev Moodles.

If you did want to contribute and add extra flexibility; I'd rename the variable "bucket-prefix" to something like "stack-prefix" and then use that variable for not only the input and output buckets, but also for the stack name, lambda function, etc.

Cheers,
Matt P

@cybernotic
Copy link
Author

Hi Matt, thank you for your reply. Yes I was originally using the same stack for both dev and prod but it wasn't the ideal environment we need if we were to make changes to the stack and its dependencies before committing to production. Thank you for that information I will definitely look in to the renaming of those variables and figure out some option presented before provisioning.

Regards
David

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants