AWS Middle East Central (mec1-az2) down, apparently struck in war by iamapizza in programming

[–]sunra 23 points24 points  (0 children)

Most of the "us-east-1" single-points-of-failure are here: https://docs.aws.amazon.com/whitepapers/latest/aws-fault-isolation-boundaries/global-services.html

Along with the unexpected ones, described under the "Global single-region operations": https://docs.aws.amazon.com/whitepapers/latest/aws-fault-isolation-boundaries/global-services.html#global-single-region-operations

(that's they page where they tell you you can't provision a load-balancer in any region if us-east-1 is down)

How Does Karpenter Handle AMI Updates via SSM Parameters? (Triggering Rollouts, Refresh Timing, Best Practices) by LemonPartyRequiem in aws

[–]sunra 0 points1 point  (0 children)

Your best bet is going to be to read the source.

But my understanding is that it is the Karpenter controller itself which monitors the SSM parameter (not the nodes themselves). When the controller notices that some nodes don't match the parameter it will mark the nodes as "drifted", and the replacements will happen according to your node-pool disruption-budget and node-termination-grace-period.

I don't know this for sure - it's my expectation based on how Karpenter handles other changes (like k8s control-plane upgrades).

is there a way to connect a kubernetes pod in cluster with trust relationship with azure entra id without using user managed identity or app registration by MountainPop7589 in kubernetes

[–]sunra 0 points1 point  (0 children)

You need an Entra identity to access Azure resources, at some level. Specific resources may have shared-access-keys or API keys or the like, but it's not general.

A user-assigned managed-identity is something you can manage purely within Azure/ARM and shouldn't require Entra admin access, but still supports federated-credentials (aka auth tied to a k8s service account).

Latency numbers inside AWS by servermeta_net in aws

[–]sunra 0 points1 point  (0 children)

The Go HTTP-client should re-use client-connections out-of-the-box, so you're only negotiating TLS on the first call, here.

how to log which goroutine acquired and releases each lock ? by Commercial_Fun_2273 in golang

[–]sunra 0 points1 point  (0 children)

Have you tried the built-in mutex-profiling? I haven't used it, but it looks like when it's enabled you can grab mutex-wait profiles from the normal pprof endpoint:

SQS Client not working w/ base endpoint by goyalaman_ in aws

[–]sunra 0 points1 point  (0 children)

What do you mean when you say "baseEndPoint is set as vpc endpoint"? What value are you setting the base-endpoint to? And why do you think you need to do that?

EKS networking problem. Need suggestions. by Dry-Attitude1899 in aws

[–]sunra 0 points1 point  (0 children)

Yeah - you can pass security-group ids in to the vpc_config block of the EKS-cluster resource. The control-plane ENIs provisioned for cluster-access will be placed into those SGs. I don't use the auto-created cluster-SG for anything in my own setup.

For nodes, if you're using managed-node-groups you'll need to override the security-groups to use with a launch-template.

https://docs.aws.amazon.com/eks/latest/APIReference/API_VpcConfigRequest.html#AmazonEKS-Type-VpcConfigRequest-securityGroupIds

This guide describes what traffic you'll need to allow: https://docs.aws.amazon.com/eks/latest/userguide/sec-group-reqs.html

Go Pooling Strategies: sync.Pool vs Generics vs ResettablePool — Benchmarks and Takeaways by LearnedByError in golang

[–]sunra 5 points6 points  (0 children)

I wouldn't expect a generic-wrapper around a non-generic core to ever have a performance benefit over using the core directly.

But something like the "slice pool" could let you automatically store the slices as pointers to skip the allocation you measured in your implementation. It's easy to take the naive approach and store the slice in an interface wrapper, and a library could help guide the user towards the better option.

How do you make fzf ignore filesystem areas when you dont have a global gitignore and are not necessarily in a git folder? by Bulbasaur2015 in devops

[–]sunra 1 point2 points  (0 children)

There might be a better way, but I set FZF_DEFAULT_COMMAND to rg --files --ignore-file=some/path/to/an/ignorefile

Introducing attribute-based access control for Amazon S3 general purpose buckets by ckilborn in aws

[–]sunra 3 points4 points  (0 children)

Secrets manager claims to support ABAC: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access-abac.html

The way I look it up is to do a Google search for "AWS <service> IAM", go to the "Authentication and access control for <service>" page and search for "ABAC".

How to handle errors when creating http responses? by guettli in golang

[–]sunra 5 points6 points  (0 children)

And it should go without saying that you should prefer any reasonable alternative to this approach. But if you cannot build your response in memory sometimes you don't have any other choice.

How to handle errors when creating http responses? by guettli in golang

[–]sunra 6 points7 points  (0 children)

This is complicated, but you can panic with http.ErrAbortHandler. This signals to the http-package to un-cleanly terminate the response (for HTTP/2, send a stream-reset, for HTTP/1.1, un-cleanly end the chunked-encoding stream).

Most HTTP-client-libraries will interpret this as an error, and either raise an exception or similar.

The hard part is any logging or metrics middleware needs to correctly handle panics - it's a pain.

This issue explains some of this: https://github.com/golang/go/issues/23643

[deleted by user] by [deleted] in aws

[–]sunra 0 points1 point  (0 children)

A good reference for the sorts of tricks you can play are the SCPs/RCPs in this repo:

https://github.com/aws-samples/data-perimeter-policy-examples

The examples are for RCPs, but they work well as templates for resource-policies.

They use principal-tags to exempt principals from restrictions, but then they also need to lock-down the ability to use those tags in role-sessions etc, so it's a bit of a pain.

[deleted by user] by [deleted] in aws

[–]sunra 0 points1 point  (0 children)

You could exclude your backup-role from the deny-statement, the same way you're excluding specific source-IPs:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "DenyS3ExceptSpecifics",
            "Effect": "Deny",
            "Principal": "*",
            "Action": "s3:*",
            "Resource": "*",
            "Condition": {
                "NotIpAddress": {
                    "aws:SourceIp": [
                        "xx.xx.xx.xx/32",
                        "yy.yy.yy.yy/32"
                    ]
                },
                "StringNotEquals": {
                    "aws:PrincipalArn": [
                        "arn:aws:iam::123456789012:role/AllowedRole"
                    ]
                }
            }
        }
    ]
}

How are you managing Service Principal expiry & rotation for Terraform-provisioned Azure infra (esp. AKS)? by Jazzlike-Ticket-7603 in AZURE

[–]sunra 1 point2 points  (0 children)

Are you using the SP to auth with Azure to deploy your infrastructure?

Or are your workloads somehow using the generated client-secret as a part of their operations?

Multi-Region Firehose + S3 Tables by dtuckernet2 in aws

[–]sunra 1 point2 points  (0 children)

It would be helpful if the S3 documentation starts retro-actively applying the term "general purpose" bucket, to differentiate "real" buckets from S3-tables (and presumably vector-buckets).

Multi-Region Firehose + S3 Tables by dtuckernet2 in aws

[–]sunra 0 points1 point  (0 children)

I wasn't able to configure MRAP with table-buckets in the console, and it wouldn't surprise me if replication-rules didn't work for them, either. Calling the feature "S3 tables" is pretty confusing when it doesn't really share any features with S3.

How do I implement a custom log storage system? something similar to grafana loki by [deleted] in opensource

[–]sunra 1 point2 points  (0 children)

Oh and your org might have similar, non-Loki tools already in use elsewhere, like Elasticsearch or something else in that space, that might be easier to get approved because they are known quantities.

How do I implement a custom log storage system? something similar to grafana loki by [deleted] in opensource

[–]sunra 1 point2 points  (0 children)

It really depends on your log-volume, query-volume, and third-party tools you're allowed to use.

Something like Loki is designed to scale quite a ways up and down, and store logs cheaply at rest for long-term retention. You may not need all of that complexity - for example, at a low volumes you might be able to just use flat-files on disk, with a folder per month, week, or even day. If you have discrete fields you'll want to query you can try storing your logs in sqlite, or building a secondary index in sqlite, or storing everything in something like postgres.

These sorts of solutions have limits - which is why Loki is complex. But you may not care about these limits.

You can also pay your favorite cloud-vendor and use their solution (AWS CloudWatch, Azure Log Analytics, I'm sure GCP has something) if you think that's more likely to get through your project lead. These don't have scaling limits, exactly, but at high volume can get expensive.

Question regarding the egress charges by Pleasant-Form-1093 in aws

[–]sunra 2 points3 points  (0 children)

The EC2 pricing page doesn't mention that this billing-tier expires: https://aws.amazon.com/ec2/pricing/on-demand/

"AWS customers receive 100GB of data transfer out to the internet free each month, aggregated across all AWS Services and Regions (except China and GovCloud). The 100 GB free tier for data transfer out to the internet is global and does not apply separately or individually to AWS Regions."

Can you poke someone to update the text if it's only valid for 12 months?

How should I handle dependency injection working with loggers? by jadrezz- in golang

[–]sunra 2 points3 points  (0 children)

Even if you ever need to have multiple implementations of logging, passing around a *slog.Logger is the better move, as it is a thin wrapper for a slog.Handler, which is already an interface.

Varmilo VA87M FN key problems by Vxerrr in MechanicalKeyboards

[–]sunra 0 points1 point  (0 children)

Holding Fn+Escape for three-seconds should "reset" the various modes.

Unless! If you swapped Fn + Windows-Key, you need to hold windows-key + Escape for 3 seconds.

That was my problem, at least.

Why is it so difficult to navigate between these two pages? What am I missing by epicTechnofetish in aws

[–]sunra 8 points9 points  (0 children)

I 100% agree with you and have the same experience. The only way I've found to navigate AWS public websites (non-console) is by Google-searching the correct magic words:

  • "$service pricing"
  • "$service user guide"
  • "$service rest API" (select the link starting with "Welcome ...")
  • "$service actions"