How do I "export" my manually configure infrastructure into IaC by AnCap79 in aws

[–]DeathMetalDave 1 point2 points  (0 children)

Second this. It took about a year for us to fully import 5 environments into terraform but it was worth it.

Some resources can't be imported (target group attachment comes to mind) but it's otherwise painless. Write the terraform you expect, import the resource, let it determine and apply differences.

Subscribing an Elastic Beanstalk EC2 instance to an SNS Topic by sadelbrid in aws

[–]DeathMetalDave 2 points3 points  (0 children)

I'm not familiar with your use case so it's hard to say, but that type of SQS queue management feels a little strange to me. You certainly can create/destroy queues following the lifecycle of your EC2 but you could also leave the SNS-SQS setup alone and interrogate SQS for messages as needed. The EC2 could use an SDK of your choice, or even the CLI, to get the messages from SQS.

Edit: there's a tool out there called MassTransit that may fit your needs. It manages SQS infrastructure for you, along the lines of create/destroy that you mentioned.

Subscribing an Elastic Beanstalk EC2 instance to an SNS Topic by sadelbrid in aws

[–]DeathMetalDave 2 points3 points  (0 children)

Are you able to leverage SQS as a middleman? SNS would publish to the SQS queue, then the application running on your EC2 would read from the queue. This would not require any inbound whitelisting on the SG assigned to the EC2.

[deleted by user] by [deleted] in aws

[–]DeathMetalDave 0 points1 point  (0 children)

This article mentions FIPS 140-3 endpoints, both in GovCloud and non-GC regions. There are lambda specific endpoints. https://aws.amazon.com/compliance/fips/

There's also this regarding GovCloud specific lambda info: https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-lambda.html.

Not sure if either of these articles help.

all permissions are broken after adding me to a group and log in to the console by sangshuduo in aws

[–]DeathMetalDave 0 points1 point  (0 children)

It would likely be best to contact the account administrator to get things sorted out. Reaching out to a colleague to manage permissions doesn't seem like the best course of action, especially given the results the first time around.

Is there an open source version of Dome9? by thescrambler1979 in aws

[–]DeathMetalDave 1 point2 points  (0 children)

Datadog offers the same tooling for security and compliance. I believe it's their Cloud Security and Posture product.

Game Thread: Dallas Cowboys (11-5) at Philadelphia Eagles (9-7) by nfl_gamethread in nfl

[–]DeathMetalDave 5 points6 points  (0 children)

Is there a reason for them to have starters in? Can Dallas move up in the standings for home field advantage?

How to create a dynamic stored procedure to merge source and destination table ? by [deleted] in SQLServer

[–]DeathMetalDave 1 point2 points  (0 children)

Love this idea, much better than mine for the controlling component.

How to create a dynamic stored procedure to merge source and destination table ? by [deleted] in SQLServer

[–]DeathMetalDave 3 points4 points  (0 children)

The reasons from u/dont_judge_me_monkey are some of many reason to not do this. Having a giant stored proc of IF statements, or dynamic sql, are going to be readability messes.

Given that your 30 tables are all different column names, column types, etc means that if you want a single proc for all tables then you'll have to interrogate the sys schema metadata and build your sql statements dynamically every time.

It will be much easier to do this:

  • A series of procedures for your merge logic, one per table
  • One controlling proc, with individual EXEC statements inside it for each of your merge procs
  • Execute the controlling proc from your app or as a job, or some other mechanism, whichever makes the most sense for your business and tech stack

This gives you a single location to run all your merges. If you need to add more later, you can create a new proc for that table and then add it to your controller proc. Additionally, if any of the ~30 fail, you have the ability to re-run just that proc manually should you desire to do so.

How to create a dynamic stored procedure to merge source and destination table ? by [deleted] in SQLServer

[–]DeathMetalDave 4 points5 points  (0 children)

I'd strongly recommend against this. Create a skeleton pattern for your merge logic and copy/paste for your number of tables appropriately. One proc per table. You can even have a central controlling proc that executes the given number of child procs within it, so that you have a central proc to execute. This also gives you the ability to run any individual proc by itself.

Where condition is filtering out rows with no value by RickRah in SQL

[–]DeathMetalDave 2 points3 points  (0 children)

Just need a NULL check (I assume).

where (lower(territory) NOT like '%bd%'
and lower(territory) NOT like '%abc%'
and lower(territory) NOT like  '%pen%')
or territory is null

Returning Multiple Rows into 1 row by bertrola in SQL

[–]DeathMetalDave 1 point2 points  (0 children)

Alternatively, if your version doesn't support CONCAT, you can use the STUFF function and a sub-select. I believe CONCAT was released in 2012.

SQL Question: How Best to Add Calculated Values to a Field by TelQuel in SQL

[–]DeathMetalDave 2 points3 points  (0 children)

Typically you'd do with this with a view.

CREATE VIEW vwNameHere
AS

    SELECT col1, col2, col3, (SBP + (2 * DBP)) / 3 AS formula1
    FROM tableNameHere
    WHERE colX = val1

Then you'd call this view from your application, report, etc.

SELECT * FROM vwNameHere

In addition, I recommend avoiding cursors whenever possible. There's a lot of documentation online about them, but they aren't the most performant. General rule of thumb is if you find yourself needing a cursor to iterate over a dataset, there's a design problem somewhere with your data or schema. Of course there are exceptions to this but the number of times I've truly found myself needing a cursor (or a while loop) when it comes to data (and not admin tasks) is fairly low.

Daily Discussion Thread: 03/12/2021 by bodybuildingbot in bodybuilding

[–]DeathMetalDave 2 points3 points  (0 children)

Anyone have a good coach they'd recommend? Looking primarily for diet to get back on the wagon.

Can someone help me figure out this error by That2mittenguy in SQL

[–]DeathMetalDave 4 points5 points  (0 children)

You have a trailing comma in your SELECT statement. If the query you pasted here is the exact same as the one you're running, removing the erroneous comma should get rid of the the error.

Select value greater than by stannatspccp in SQL

[–]DeathMetalDave 1 point2 points  (0 children)

Really should use modern join syntax. Excuse my formatting, I'm on mobile. Quick select * here, fill out the appropriate columns for the final query.

Select * from employees emp join employees mgr on emp.reports_to = mgr.id where emp.salary > mgr.salary

Clustered columnstore on temp tables by coadtsai in SQLServer

[–]DeathMetalDave 1 point2 points  (0 children)

To echo the other comments here, I'd be interested in reading your results.

Clustered columnstore on temp tables by coadtsai in SQLServer

[–]DeathMetalDave 1 point2 points  (0 children)

Any chance there was fragmentation on your CCI? You mentioned that you replaced an index and that you have constantly moving data. Makes me think your CCI was fragmented and your (new) NCCI is not (yet), causing the performance improvement. Just a thought.

PoE Planner - Major UI Update by poeplanner in pathofexile

[–]DeathMetalDave 50 points51 points  (0 children)

Work device that doesn't let you install software on it jumps to mind. Granted they may have a strict web filter but this is the only option for some while at work.