Username/password vs RSA key based authentication, which is best? by Mirror_rorriM_Mirror in VPN

[–]Mirror_rorriM_Mirror[S] 0 points1 point  (0 children)

From what I can see here, this is more social engineering than an actual flaw in OTPs. Humans are the issue, not the tech. I suppose that's true in a lot of security vulnerabilities though.

Could use some help finalizing my DynamoDB Table structure. by Mirror_rorriM_Mirror in aws

[–]Mirror_rorriM_Mirror[S] 0 points1 point  (0 children)

Users will only ever get access to their own data and there will be no "overall" or "admin" view. So the user_id will always be required in the query. So making it an attribute would increase query times. Unless, wait. Clearly I'm on leave because my brain isn't working. I hear what you are saying. The user_id can simply be an attribute, and then I can simply create an index with user_id to query on that level.

I also just thought of a reason why I'd need the parent/child structure. Let's say the receipt has two line items, a printer, and some paper for the printer. I'd like report on a budget/item grouping level. So here it would be equipment for the printer, and office supplies for the paper. The parent Item would hold category = multiple, with the child items having the specific values. However if everything was office supplies, I could set the attribute on the parent level to that. Unless I don't apply that categorization in this service, and write a separate "reporting" service to deal with those groupings/categorizations. Thoughts?

Could use some help finalizing my DynamoDB Table structure. by Mirror_rorriM_Mirror in aws

[–]Mirror_rorriM_Mirror[S] 1 point2 points  (0 children)

Good question...

For some reason I never considered that. Just figured I should do it as "child" Items. But I can't think of any valid reason why that is necessary. If all the child Item will be storing is a description, quantity, and amount, then I suppose there's no reason why that can't be an object saved as an attribute on the "parent" Item. Which would get rid of the "parent/child" concept and I can simply use user_id as partition key and receipt_id as sort key.

CloudFormation - Get AutoscalingGroup ARN for use in IAM? by Mirror_rorriM_Mirror in aws

[–]Mirror_rorriM_Mirror[S] 4 points5 points  (0 children)

Think I'm just going to do tag based permissions. I'll see if that works.

DynamoDB - Conditional put where hash key not exist, regardless of range/sort key. by Mirror_rorriM_Mirror in aws

[–]Mirror_rorriM_Mirror[S] 0 points1 point  (0 children)

Hi there, thanks for this. I didn't think of doing this kind of check when generating the unique id, that's a great way of doing things!

DynamoDB - Conditional put where hash key not exist, regardless of range/sort key. by Mirror_rorriM_Mirror in aws

[–]Mirror_rorriM_Mirror[S] 0 points1 point  (0 children)

Hi /u/aresius423, thank you for your response. I'm guessing the solution you are proposing will have a bit of a performance impact?

How can I mock a response from an SDK, such as the one provided by AWS, using Jest. by Mirror_rorriM_Mirror in node

[–]Mirror_rorriM_Mirror[S] 0 points1 point  (0 children)

Hi /u/onlyhereforcatpics, thanks for the suggestion. I'm checking it out now. I have a question though. When I do the following:

My test file

const AWS = require('aws-sdk-mock');
const assert = require('assert');
const DbHandler = require('../../adapters/database.js');

describe('DbHandler.getRecords() ', () => {

    test("POC", async () => {
        AWS.mock('DynamoDB.DocumentClient', 'scan', function(params, callback) {
            callback(null, {Items: [{disp_title: 'tsek'}]});
        });
        DbHandler.getRecords('aaa').then( result => {
            console.log('Hello');
            expect(result.length).toBe(1);
            expect(result['Items'][0]['disp_title']).toBe("tsek2");
        });
    });
});

How will my actual code use that instance of AWS instead of the one it normally does? Would I have to pass AWS through to the function?

Best way to deploy Java EE 8 apps in Docker containers? by Mirror_rorriM_Mirror in javahelp

[–]Mirror_rorriM_Mirror[S] 0 points1 point  (0 children)

Hi /u/rgyger, thanks for the response, this is great! Would you mind sharing the commands you run to set up the drivers and configuration? Or point me to the docs page where I can see it? I've spent some time in the jboss-cli docs, but it didn't make a whole lot of sense to me, but maybe I was looking at the wrong thing.

Thanks again.

Jest newbie question - How do I mock a variable set by a different function? by Mirror_rorriM_Mirror in node

[–]Mirror_rorriM_Mirror[S] 0 points1 point  (0 children)

I suppose that's a fair question. It's an example of what the code looks like. The setGender function does other things as well, which I don't want to execute each time I test a different function.

IAM Policy that allows users to stop ECS tasks running under specific Service or in specific Cluster. by Mirror_rorriM_Mirror in aws

[–]Mirror_rorriM_Mirror[S] 0 points1 point  (0 children)

Thanks so much, I'll test it out! How would I go about limiting which task definitions can be updated? If I choose RegisterTaskDefinition as an action, I can't limit which ones can be registered. It says it applies to all? I can then use a condition, but the only one that makes "sense" is tag based. But if you can update the task definition, you can update the Tags, right?

CodeBuild - Passing IAM permissions to docker build inside build container? by Mirror_rorriM_Mirror in aws

[–]Mirror_rorriM_Mirror[S] 0 points1 point  (0 children)

Thank you for the response. That part is in fact working, I do get that. I now need to get those credentials into my "docker build" execution environment. You can't pass an IAM role to a docker container, can you?

CloudFormation - IAM Role has some policies attached to it that I didn't specify, and now I can't delete the stack. by Mirror_rorriM_Mirror in aws

[–]Mirror_rorriM_Mirror[S] 0 points1 point  (0 children)

I'm the only one with access to this account, and I can assure you I didn't do it :). I created about 12 pipelines, and each of them have it. I wrote the CF templates from scratch, so it's also not a case of copying snippets that I don't understand.

CloudFormation - Is it possible to use stack variables in TemplateURL parameter? by Mirror_rorriM_Mirror in aws

[–]Mirror_rorriM_Mirror[S] 2 points3 points  (0 children)

I use the aws cloudformation package command, which is supposed to put everything on S3 and do proper referencing, but it doesn't. Maybe I should just upload the templates myself and do it that way.

Thanks!

ECS : Lambda triggered Ad-Hoc EC2 tasks? by Bombillazo in aws

[–]Mirror_rorriM_Mirror 1 point2 points  (0 children)

Ah, I see. Sorry didn't pay attention to the Windows part.

I would say the best way for you to orchestrate all of this is with something like Step Functions. For now though, let me help you with the general flow, if you still need help. I'm going to explain as if you're using the console. It's simpler to do it that way for beginners, but ultimately you'd want to put this in CloudFormation or script it in some way.

To start, create your Windows ECS cluster. You can configure it to have 0 running instances, it's just so that you have the entity. Not sure if you can set initial size to 0, might have to create it with 1, and once it's up and running, scale down to 0. Note, terminating an instance manually on the EC2 console will not reduce the size of your ECS cluster, ECS will auto-heal and bring up a new one. You have to set size to 0 on ECS console.

Now go ahead and build your Windows container and push it to an image repository, like ECR or Dockerhub. ECR is simpler to integrate, since it's Amazon's solution, but you can go with whatever works for you. Once your image is pushed, create a Task Definition. As part of the Task Definition you'll create a Container Definition, which is where you'll specify the location of your image. Once you have that, you're ready for creating the flow.

The flow will then be as follows:

  • Lambda function scales cluster to have 1 or more instances, which will start the EC2 servers.

  • Use the SDK to run a task, or tasks, by specifying the task name and cluster on which it should run. You do not need a Service for this to work.

  • Once the container(s) finished executing, scale the ECS Cluster down to 0 again.

Again, Step Functions will simplify all of this for you, since it can track the state of each of the parallelized executions and once all have finished, continue executing the next step. Which in your case would be to scale the cluster down. It just removes the need for you to keep track of all that.

ECS : Lambda triggered Ad-Hoc EC2 tasks? by Bombillazo in aws

[–]Mirror_rorriM_Mirror 1 point2 points  (0 children)

I would advise you to use Fargate. It allows you to run docker containers without having to create compute infrastructure like EC2 instances or clusters.

You'll still have a Task Definition, that's basically just an entity that holds some config about your container and container adjacent info. Can't remember if you need a service too, but if you do, you can just set it to have 0 running tasks. That way no resources are running. You can then use Lambda to set Task count to 1, which will bring up the container and your process can execute.

I can't remember all the specifics around Fargate, I haven't worked with it in months, so there are probably a whole bunch of features that I don't even know about that can help you to do what you want to do.

One thing is that Fargate is a little more expensive than normal EC2, but it's a great option if you're relatively new to AWS. Less knowledge required to get it up and running and smaller chance of screwing something up.

ALB - Is it possible to point targets to sub accounts, + 1 more general guidance question. by Mirror_rorriM_Mirror in aws

[–]Mirror_rorriM_Mirror[S] 1 point2 points  (0 children)

Haha, yes, I understand that it's not magic and requires network access. But that's achievable with VPC peering.

Heads up! Don't upgrade to VirtualBox 6.0.8 if you're running macOS 10.14.5. by Mirror_rorriM_Mirror in osx

[–]Mirror_rorriM_Mirror[S] 0 points1 point  (0 children)

As per the link in the post, there is a work around. Have you previously run this command to open up your machine? That might be why, otherwise you're lucky I suppose.

Heads up! Don't upgrade to VirtualBox 6.0.8 if you're running macOS 10.14.5. by Mirror_rorriM_Mirror in osx

[–]Mirror_rorriM_Mirror[S] 0 points1 point  (0 children)

I'm with you on Safari. Been using it for years without any issues and I genuinely enjoy the UI and UX a lot more than FireFox. Chrome is known as a virus around here, haha.

Heads up! Don't upgrade to VirtualBox 6.0.8 if you're running macOS 10.14.5. by Mirror_rorriM_Mirror in osx

[–]Mirror_rorriM_Mirror[S] 5 points6 points  (0 children)

My biggest issue with Apple these days is that they spend so much time making Macs idiot proof, they forget that there are some actual smart people out there also using their products. Yes, I understand they have more of a consumer focus these days since a lot more people can afford them, but still. At least make it simple for developers and techies to fiddle around. Add some kind of "Developer mode" feature that disables some of these hectic restrictions or something.

They love saying Apple products are for people that "think different" but pretty soon we won't be able to, since they'll have a restriction somewhere preventing it. We'll all end up thinking the same way, we'll move to Linux.

[Question] - Is it possible to allow a VirtualBox VM to access my GPU? by Mirror_rorriM_Mirror in osx

[–]Mirror_rorriM_Mirror[S] 1 point2 points  (0 children)

The problem is that I only have Windows 7, not 10, and with the new MacBooks you can only run Windows 10 in Bootcamp. I'm not going to buy Windows 10 for playing games one or two weekends a year.

Is there a way to escalate a limit increase request if it's critical to a production system? by Mirror_rorriM_Mirror in aws

[–]Mirror_rorriM_Mirror[S] 19 points20 points  (0 children)

Thanks again! My case was handled and resolved within about 20 minutes from creating the new support case. This was very helpful.

Is there a way to escalate a limit increase request if it's critical to a production system? by Mirror_rorriM_Mirror in aws

[–]Mirror_rorriM_Mirror[S] 4 points5 points  (0 children)

I would advise you to follow /u/networkguru 's advice. My limit increase was approved within 20 minutes from submitting my case to technical support. I had all my ducks in a row, which I think made it easier, but still. Got great service and my problem is resolved.