Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
JehovahsWetness
Dec 9, 2005

bang that shit retarded
Per-release AMI baking is how Netflix does it, since they don't modify running instances and just phase-out their running fleets w/ new AMIs. They've got a couple of posts about their baking / release pipeline:

http://techblog.netflix.com/2016/03/how-we-build-code-at-netflix.html
http://techblog.netflix.com/2013/03/ami-creation-with-aminator.html

"The bakery reduced AMI creation time to under 5 minutes. This improvement led to further automation by engineers around Netflix who began scripting bakery calls in their Jenkins builds. Coupled with Asgard deployment scripts, by committing code to SCM, developers can have the latest build of their application running on an EC2 instance in as little as 15 minutes."

Adbot
ADBOT LOVES YOU

JehovahsWetness
Dec 9, 2005

bang that shit retarded
A single instance in a personal account (and I'm assuming not a big monthly spend)? Probably not much a chance for a refund. I've been at places where AWS waived the charges because some someone leaked their keys and got a fuckload of coin miners spun up but not a single DBA dipshitting a big RDS instance in the wrong region and forgetting about it.

I think AWS makes a rough distinction between maliciousness and mistake weighed against how much you pay them a month.

JehovahsWetness
Dec 9, 2005

bang that shit retarded

Votlook posted:

What is a good way to manage ssh access to ec2 servers?
We currently have the public keys of the dev team baked into all our AMI's, but this creates a lot of work whenever a new team member leaves or joins, as we have to
rebuilt all the ami's and update all our services.
We have tried using bastion server, but it complicates some of out tooling.
I'm looking for a solution that where it is easy to add and remove access to each machine on-the-fly; preferably something really simple and robust.

I've seen this used in the wild: https://github.com/widdix/aws-ec2-ssh

Assumes you're using individual IAM users, etc, and doesn't gently caress around w/ userdata and other stuff like OpsWorks does.

JehovahsWetness
Dec 9, 2005

bang that shit retarded
GCP will also give you a $300 credit (for 1yr) on signup and their free-tier is reasonable, although no managed DBMS is in the free-tier: https://cloud.google.com/free/

JehovahsWetness
Dec 9, 2005

bang that shit retarded
My team has/had that problem because SSM secrets were shared between ECS and Jupyter notebooks and were JSON strings, too. (Previous devs were really big on having single-sources of connection/credential info because we deal with a lot of external data sources.)

I ended up writing this https://github.com/ian-d/ecs-template for use in our ECS containers as a lightweight entrypoint to pull / parse / templatize poo poo from SSM instead of baking it into the apps themselves. Keeps the apps more 12 Factor-ish and makes local testing easier since I could just rely on ENV vars and not SSM locally.

JehovahsWetness
Dec 9, 2005

bang that shit retarded
I use Aurora Serverless for a couple of temporary, rarely-used reporting instances. The only problem we've had is the timeouts on to scale-from-zero / resume operations. Most clients have a default timeout that's shorter than Aurora's refresh spin-up time. Make sure client timeouts are set to 30s and it's usually fine.

We do also run into an occasional resume error from the server when it takes too long: "Database was unable to resume within timeout period", so you may need bake in a connection retry in your client. Pooled connections would probably "just work", but we're using SQLAlchemy engines in one-shot ETLs.

JehovahsWetness
Dec 9, 2005

bang that shit retarded

Just-In-Timeberlake posted:

The NAT gateway associated with that VPC has a static IP address assigned to it
DNS for abc.domain.com points to that IP address

Why? Inbound traffic to the NAT Gateway isn't somehow going to trigger your lambda or get routed via API Gateway. Running a Lambda function inside a VPC is so it can be part of your private network because it needs ip/network-level access to something that it couldn't otherwise reach.

If you just want a custom domain for your API Gateway:
https://aws.amazon.com/premiumsupport/knowledge-center/custom-domain-name-amazon-api-gateway/
https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html

JehovahsWetness
Dec 9, 2005

bang that shit retarded

Hed posted:

I'd like to run a corporate Django site on Fargate, does AWS have anything like Azure App Proxy?

I like the idea of having the Django app sitting behind a scalable LB that authenticates people against a directory (Azure AD in this case) and passes that info back. I've done this in the past in places that had PKI where the nginx -> Django backend would authenticate the user and pass back headers that the Django app used for authentication/authorization.

Should I just look into the AWS LB sets more or is there something else to do this?

ALBs can do OIDC "directly" or other options (SAML, LDAP, etc) by bouncing through Cognito: https://docs.aws.amazon.com/elasticloadbalancing/latest/application/listener-authenticate-users.html. It also signs the resulting headers so you can validate it on the app side to ensure the request actually passed through the ALB auth flow.

JehovahsWetness
Dec 9, 2005

bang that shit retarded
Is the bucket using a custom KMS key for encryption? If it is then that key also needs to have a resource policy that also grants access to the other account's principal. You also won't get a KMS-specific error, just the regular forbidden error.

Adbot
ADBOT LOVES YOU

JehovahsWetness
Dec 9, 2005

bang that shit retarded

BaseballPCHiker posted:

There are a lot of tools out there (names escaping me ) that can basically look back at what API calls a principal has made and then give you a recommendation as well.

The AWS-provided one is Access Analyzer: https://docs.aws.amazon.com/IAM/latest/UserGuide/what-is-access-analyzer.html. I think Netflix's repokid was the precursor but Access Anazlyer's pretty good.

I wish I could find it again but I think Netflix also promoted an IAM Policy pattern that was basically "make a policy per-principal" since trying to make "shared" cross-cutting policies to attach to multiple principals inevitably diverged and since you're managing these policy in some declarative/IaC fashion (right?!) then having a policy-per-principal actually make change tracking / control easier. (This advice is primarily targeted at workload roles.)

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply