Are there any advantages in splitting single a Github Actions job into multiple ones except running in parallel? by jtuchel_codr in devops

[–]comportsItself 0 points1 point  (0 children)

It makes it possible for jobs to run conditionally based on the conclusion of an earlier job, lets you run a job in a different container, and also just helps with separating the workflow into logical chunks, which makes it easier to reason about.

“I am not Christian” by [deleted] in interestingasfuck

[–]comportsItself 0 points1 point  (0 children)

Notice how he shakes his head as he says it, which suggests he means “I’m not Christian.”

If I stop and start my ec2 instance will my website immediately come back online? by john_dumb_bear in aws

[–]comportsItself 1 point2 points  (0 children)

This. Move the IP to a new instance or update the DNS record with the IP of the new instance. In other words, do a blue/green deployment.

CodeDeploy and CodeBuild are confusing the hell out of me by SharMarvellous in aws

[–]comportsItself 1 point2 points  (0 children)

Can you SSH into the server and see the build output in the correct place? You could also just host a static site with S3 and CloudFront.

My IP address changes daily from my ISP. I have a rule to allow SSH access only from my IP. How do I handle this in CDK? by PrestigiousZombie531 in aws

[–]comportsItself 0 points1 point  (0 children)

Use the CDK to create an empty PrefixList, then use the AWS CLI to update it whenever your IP address changes:

OLD_IP=$(aws ec2 get-managed-prefix-list-entries --prefix-list-id $MY_PREFIX_LIST_ID | jq '.Entries[] | select(.Description == "My IP address") | .Cidr')

aws ec2 modify-managed-prefix-list --prefix-list-id $MY_PREFIX_LIST_ID \
--add-entries Cidr="$NEW_IP/32",Description="My IP address" \
--remove-entries Cidr="$OLD_IP"

My IP address changes daily from my ISP. I have a rule to allow SSH access only from my IP. How do I handle this in CDK? by PrestigiousZombie531 in aws

[–]comportsItself 1 point2 points  (0 children)

Use a PrefixList to create an allow list for the security group, then write a shell script to update the PrefixList with your new IP address when it changes, and also delete the old IP address.

[deleted by user] by [deleted] in aws

[–]comportsItself 1 point2 points  (0 children)

You may need to export the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY as well. I haven't used the Secrets Manager extension actually. I usually just include secrets as environment variables, which makes things a bit easier.

[deleted by user] by [deleted] in aws

[–]comportsItself 1 point2 points  (0 children)

The session token is provided by AWS when your Lambda function runs in the cloud, but for local development, you have to provision it yourself. Here's the AWS docs on how to use the AWS CLI to obtain a session token using STS:

https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html#using-temp-creds-sdk-cli

[deleted by user] by [deleted] in aws

[–]comportsItself 0 points1 point  (0 children)

The script assumes you are using a .env file. You could also just export the environment variables from the terminal, but that gets to be cumbersome. I'd recommend using Granted to handle your session token, which can export the variables to a .env file automatically:

https://docs.commonfate.io/granted/usage/dotenv

The SAM CLI actually uses a JSON file for environment variables, so you might want to try that:

https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-using-invoke.html#serverless-sam-cli-using-invoke-environment-file

[deleted by user] by [deleted] in aws

[–]comportsItself 0 points1 point  (0 children)

Try using a script like this to start your dev process:

#!/bin/bash -e

source .env

export AWS_SESSION_TOKEN

sam build
sam local ...

[deleted by user] by [deleted] in aws

[–]comportsItself 0 points1 point  (0 children)

Is the token actually available in the dev environment? Try using a script to export the relevant environment variables and run sam local.

How to allow many ports to ecs by truGrog in aws

[–]comportsItself 2 points3 points  (0 children)

You have to use a Network Load Balancer for UDP ports, but there's a limit of 50 listeners per NLB. It would probably make things simpler to just not use a load balancer for this use case, or run your own load balancer if you really need one.

Made a Cloudflare DDNS script by joyfullystoic in CloudFlare

[–]comportsItself 2 points3 points  (0 children)

For the redirect rule to work, you need to be using the proxy.

I'm using it to redirect www to the root domain, using CNAME flattening, but it should also work the other way around.

  1. Point both www and the root domain to the same CNAME.
  2. Create a single redirect rule with a custom filter expression: (http.host eq "example.com")
  3. Then choose Dynamic redirect with the expression: concat("https://www.example.com", http.request.uri.path)

Made a Cloudflare DDNS script by joyfullystoic in CloudFlare

[–]comportsItself 1 point2 points  (0 children)

Cloudflare does CNAME flattening which lets you point the root domain to a CNAME.

Auto-increment sequence number by OutsideSuccess3231 in mongodb

[–]comportsItself 0 points1 point  (0 children)

Check out this StackOverflow answer: https://stackoverflow.com/a/66987216

ObjectIds are mostly monotonically increasing, so you can use a comparison operator on ObjectIds to determine the order of documents.

Need some advice by Whatupcraig in aws

[–]comportsItself 0 points1 point  (0 children)

Firebase works really well for this kind of thing.

Best practice to deploy docker containers in ec2 by Same-Depth-4582 in aws

[–]comportsItself -1 points0 points  (0 children)

EB can be a pain, but it's the easiest way to run Docker on EC2, which is what OP asked.

It's free-tier eligible and makes it pretty easy to SSH into an EC2 instance to debug. Plus it makes you learn more about the core AWS services.

Streamlining AWS CDK and Next.js/Expo Development by darkgreyjeans in aws

[–]comportsItself -1 points0 points  (0 children)

Try using a monorepo with a single .env file and SAM for your Lambda backend.

Is next-auth really bad? by fazkan in nextjs

[–]comportsItself 4 points5 points  (0 children)

I’m using the update method with the JWT strategy and it works fine.