-
Notifications
You must be signed in to change notification settings - Fork 4
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
Launch EC2 instance with CloudFormation #69
base: master
Are you sure you want to change the base?
Conversation
The /data volume needs to be preserved if we happen to terminate the databases VM, at least until we have a better backup strategy
Since the improvement/fix script has been merged yet, and I just accidentally branch out from a non-master branch, again :(
infrastructure/ec2-db.yaml
Outdated
Action: | ||
- "s3:GetObject" | ||
- "s3:ListBucket" | ||
Resource: "*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The existing policy is slightly different and limited to only one bucket:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "s3:*",
"Resource": [
"arn:aws:s3:::hacko-data-archive/*"
]
}
]
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @DingoEatingFuzz . Yes, I was aware of this. I wasn't sure which bucket to select so I left it a wildcard for easier testing. Patches incoming in a few mins
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DingoEatingFuzz : Updated.
Is it ok if I limit the allowed actions to the 2 following ones?
Action:
- "s3:GetObject"
- "s3:ListBucket"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potentially. Depends on whether or not the box will also be writing back to the bucket. I defer to @MikeTheCanuck
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now let's just leave it as read-only, but be prepared to generate a similar policy for whatever strategy we happen to use for backups. I'm conflicted on whether backups would be appropriate to write to the hacko-data-archive
bucket, otherwise no reason I can think of to open it for writes.
On Thursday I believe we discussed moving this template (and any others like it) under a parent folder called Next question is, how much of Is it possible, or even practical, to have this template run first, then run a modified/reduced version of the script, to get the same result as we get with the script today? |
@MikeTheCanuck These CloudFormation templates can replace |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- There's a lot of hard-coded parameters in here that could well inherit from what we have defined in hackoregon-aws-infrastructure, including
- AvailabilityZone
- SubnetId
- SecurityGroupId
- DBInstance > ImageId
- DBInstance > AvailabilityZone
- DBInstance > SubnetId
-
the InstanceType is now out of date - that's now a t2.large
-
I'm pretty sure we don't want to use
create-stack
to instantiate this as part of the larger ECS infrastructure - I imagine there's some kind ofupdate-stack
that would work better for us. -
I am about 70% sure that many of the hard-coded values buried in the Resources > DBInstance section would be better off as items in the Parameters section, that are then just pulled in by
!Ref
in the Resources > DBInstance section.
AWS CloudFormation to create an ec2 instance that has read permission to the existing s3 instance(s)
Small notes:
I accidentally branched out from a non-master branch and so pushed 2 unrelated files. The 2nd commit of this branch/PR fixes this issue. (Sorry Mike)
Upon:
Suggested by @DingoEatingFuzz in a discussion on PR #48
Requested by @MikeTheCanuck at assignment #61