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.
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.
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.
@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.
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.
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 |
MikeTheCanuck
left a comment
There was a problem hiding this comment.
- 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-stackto instantiate this as part of the larger ECS infrastructure - I imagine there's some kind ofupdate-stackthat 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
!Refin 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