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

Sample CloudFormation #152

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Sample CloudFormation #152

wants to merge 7 commits into from

Conversation

amacks
Copy link

@amacks amacks commented Dec 14, 2017

I added a CloudFormation directory with a README and 3 templates needed to spin up a CF stack with the image-resizer working. The three templates are applied sequentially to the same stack, to handle some CF dependency issues. End state is a pair of buckets, one with code and logs, one with images, both raw and resized

@ysugimoto
Copy link
Owner

ysugimoto commented Dec 17, 2017

@amacks Thank you for your PR. This seems useful for CF users, but those templates cannot change easily themselves. So in order to add this feature, I want to consider about following things:

  • Configuration is loose coupling from our project stack. so it would be better to external project
  • If we bundle those, we gonna have to create generator like npm run cloudfront and generate your templates automatically by config.json and npm-config.

Do you have any idea for above things?

If have a time, plz review this @kdybicz

@kdybicz
Copy link
Collaborator

kdybicz commented Dec 17, 2017

From logical and technical point of view this approach seems to be more than valid. But I totally agree with both points @ysugimoto presented. If we would want to merge this feature I think it would be nice to try to hide the CF magic behind some generator, to don't discourage less experienced users.

@amacks
Copy link
Author

amacks commented Dec 19, 2017

Agreed, it's not easy to make CF a turnkey solution. I thought of this more as a "here's a way known to work, modify as needed" rather that a complete stack for all needs.

I don't have any experience with CF Template generation/regeneration, so I'm not sure I'd be able to create any sort of template generator. There would have to be a lot of config variables on that

One code change to the main app that would make this easier would be if the bucket name for the app could be specified as a lambda environment variable. Then the bucket names could be entirely controlled from the CF stack.

@fran-worley
Copy link

@amacks you can actually do this all in one template there is a rather helpful amazon FAQ on the subject here https://aws.amazon.com/premiumsupport/knowledge-center/unable-validate-circular-dependency-cloudformation/

@rromanchuk
Copy link

@amacks this can totally be done end to end with a single template today. CustomResources would help. I'm debating on forking this and modifying this build system to at least better support multi-environment deployments (different config files), and parameter passing, like which aws credential profile you want to be used. I have development/production deployments in different regions and it's much too dangerous to use as is. The CF turnkey is ideal, it's just a lot of work, but at least you got basics out of the way.

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

Successfully merging this pull request may close these issues.

5 participants