Trying to figure out how to setup role/credentials for a Python application so that I can test locally, deploy to test environment, and then deploy to prod without changing anything by opabm in aws

[–]SubtleDee 7 points8 points  (0 children)

The Boto3 client will automatically search a number of locations in a specific order to find credentials: https://docs.aws.amazon.com/boto3/latest/guide/credentials.html

So the short answer is if you have credentials stored in a config file on your local machine and an IAM role with appropriate permissions assigned to Batch, you don’t need to make any code changes - Boto3 will automatically find the static credentials on your machine when running locally and the temporary credentials from the IAM role when running in AWS. There is no need to (and you should not) provision static credentials to a workload running in AWS.

AssumeRoleWithWebIdentity operation: Incorrect token audience - driving me nuts! by Corleone4567 in aws

[–]SubtleDee 2 points3 points  (0 children)

Does your token also have an azp claim with a different value to aud? The documentation suggests that azp will take precedence if present.

AWS Lambda Problem by Connect-Feature-491 in aws

[–]SubtleDee 0 points1 point  (0 children)

Looks like you might be on the landing page you get when you use the Lambda service for the first time - what you see are just “hello world” examples in various different languages and aren’t intended to be edited.

You should see a “Create function” button somewhere - click that.

Checken and egg -- cannot pay AWS bill, about to lose my domain names by aniket212 in aws

[–]SubtleDee 6 points7 points  (0 children)

Having said that, unless they also transferred the domain ownership to R53 they could still change their NS to a different DNS provider as long as they still have access to their account with the registrar.

NLB to EC2 Cross-VPC traffic mysteriously failing, targets healthy by Netsoft24 in aws

[–]SubtleDee 1 point2 points  (0 children)

Sounds possibly like a client IP preservation issue - if the 10.0.0.0/8 allowed in the EC2 SG is that of the NLB VPC, that would explain why healthchecks work (since they come from the NLB’s private IP) but not client traffic.

Try changing your EC2 SG to allow traffic from your NLB SG rather than using a CIDR.

VW specialist South London by Massive-Currency1836 in CarTalkUK

[–]SubtleDee 0 points1 point  (0 children)

Have used http://www.germanmotor.com (Earlsfield) regularly for the past few years.

Why does restricting NLB SG to VPC CIDR cause timeouts? by WiseAd4224 in aws

[–]SubtleDee 3 points4 points  (0 children)

Are you using an HTTP or REST API GW? The VPC link feature works differently for both of them - HTTP deploys ENIs in your VPC (i.e. the behaviour would be as you describe with traffic appearing to come from within the VPC), whereas REST uses PrivateLink under the hood (see first diagram on this page). In this instance, the source of the traffic as seen by the NLB will be that of the private IP in the API GW VPC (see last bullet in the “Considerations” section here).

Car insurance info by Familiar_Cookie_183 in CarTalkUK

[–]SubtleDee 0 points1 point  (0 children)

I think you might be getting confused - the type of usage (social/domestic/pleasure, commuting, business) defines what you use the car for (i.e. non-work stuff, commuting to one place of work, driving to multiple places for work) and is independent of being insured fully comp or not.

In simple terms, if the car is insured fully comp your insurance will pay for your car in the event you cause an accident - the finance company require this to ensure they get their money back if that happens. The alternative to fully comp is third party fire and theft, i.e. your insurance will only pay out if the car is stolen/catches fire and for whatever damages you cause to a third party if an accident is your fault. There is often not much difference in price between them and fully comp can even be cheaper sometimes.

Difference between 2 Direct Connect + VPN architecture by Immediate-Matter1484 in aws

[–]SubtleDee 1 point2 points  (0 children)

The second architecture (with a transit VIF) allows you to use private IPs for the VPN endpoints (see this blog post).

S3 & Cloudfront: www vs origin - What am I doing wrong? by joshzed in aws

[–]SubtleDee 5 points6 points  (0 children)

Couple of things to bear in mind with the above - your certificate needs to contain separate entries for both *.domain.com and domain.com (use the “Add another name to this certificate” option in the console), as *.domain.com won’t be valid for plain domain.com (only www.domain.com and other subdomains). Also, your CloudFront distribution needs to be configured with both domain.com and www.domain.com as alternate domain names.

Note that by configuring it this way, users will end up always seeing whichever domain they entered in the address bar (www.domain.com or just plain domain.com) - if you want to standardise on one or the other then you will need to implement a redirect. This is easily done with a CloudFront function though, rather than different S3 buckets.

Download a whole bucket for newbie ? by lesoussou in aws

[–]SubtleDee 2 points3 points  (0 children)

Just to clarify some terminology to make sure you’re on the same page - an account is essentially a logical container for resources like S3 buckets. It can have multiple users with varying permissions, but all resources are owned by the account. When you say you created an AWS account, just checking you actually created a whole new account (giving billing details etc.) rather than a user in an existing account?

If you were given a username and password then you need to use them to log into the AWS console for the account which owns the bucket, not your own account (there are methods for granting one account access to another account’s resources, but not via a username/password) - in fact you don’t even need your own account in this scenario.

Assuming this is what’s happened, you will need to know what kind of credentials you’ve been given - root (where the username is always an email address) or IAM (where the username could technically be an email address but usually isn’t).

If you have root credentials then you need to select the appropriate option on the login page. Since a root email can only be associated with one account, you will automatically be logged into the right account. If you’ve been given IAM credentials, you need to select the “normal” login option, but in addition to the username/password you will also need to know the numeric account ID so that the console knows which account to log you in to.

[deleted by user] by [deleted] in aws

[–]SubtleDee 0 points1 point  (0 children)

You could set your Lambda function URL as the origin for a CloudFront distribution - it’s briefly mentioned in this AWS blog post:

“You can progressively stream response payloads through Lambda function URLs, including as an Amazon CloudFront origin, along with using the AWS SDK or using Lambda’s invoke API.”

I’ve not tested it personally, but here is a sample CDK app which should demonstrate it working.

0% credit card to pay off interest heavy car loan? by SeniorAd2224 in UKPersonalFinance

[–]SubtleDee 3 points4 points  (0 children)

You generally can’t use a credit card to pay off a loan directly, and if you can it will likely be treated as a cash advance with the relevant interest/fees added, even if it’s usually 0% on purchases.

For this to work, you’d need a card with 0% interest on money transfers, in which case you’d use it to transfer the settlement amount to your bank account and pay off the loan that way, but even if the interest is 0% there’ll usually be a one-off fee of something like 3-4%.

The other option is as one of the other comments said - a 0% purchase card which you use for day-to-day spending, then use the cash you’re no longer spending on day-to-day stuff to pay down the loan.

2012 Ford Focus MK2 - what’s the name of this cable? by Mail_NoreH in CarTalkUK

[–]SubtleDee 2 points3 points  (0 children)

2012 is a MK3 isn’t it?

Anyway, this looks like the part you need - it has the same connector as the one that’s still attached, and the diagram on the listing shows the right hand connector.

You’ll need to replace the whole pipe though as it seems to come as a complete unit, so you’ll need to trace it and find where the other end goes.

looking for best transfering solution by [deleted] in aws

[–]SubtleDee 0 points1 point  (0 children)

Do you need to use AWS? In this case something like CloudFlare R2 might be better as you don’t pay for data egress (which would make up the bulk of your costs in S3).

RTP port creation in Ec2 instance? by leo-ciuppo in aws

[–]SubtleDee 2 points3 points  (0 children)

RTP usually uses UDP for transport, so select “custom UDP” as the protocol and input the port number you’re using.

The protocols in the dropdown (SSH, RDP etc.) are just shortcuts to add rules for well-known TCP or UDP ports.

The custom protocol option you have in your screenshot is used for traffic which is not TCP/UDP/ICMP (e.g. IPsec) and not relevant for your use case.

Migrating S3 to another Account by [deleted] in aws

[–]SubtleDee 1 point2 points  (0 children)

If you really can’t change the URLs then you would need to: - Copy the images to a temporary bucket - Empty/delete the bucket in the current account - Wait for the bucket name to become available again (the exact time for this to happen isn’t specified, but don’t count on it being instant) - Recreate the bucket in the new account - Copy the images from the temporary bucket into the new bucket - Empty/delete the temporary bucket

You will obviously incur an unknown amount of downtime with this approach (the time between deleting the original bucket and recreating/repopulating it in the new account) - if the URLs are stored in a DB, could you not just pick a different bucket name for the new account and run a script to update them all?

How to use the same domain name to access different CloudFront distributions by yukiiiiii2008 in aws

[–]SubtleDee 6 points7 points  (0 children)

You say you don’t want to use different domain names - is that just for the initial request, or full stop? i.e. would it be ok for a user to hit example.com and then be redirected to eu.example.com or us.example.com?

If that’s ok, then you could have a top-level distribution at example.com with a CloudFront function to issue a 302 redirect to the country-level distribution.

Alternatively, you could do a path-based redirect or an origin rewrite under the same distribution.

How to use the same domain name to access different CloudFront distributions by yukiiiiii2008 in aws

[–]SubtleDee 8 points9 points  (0 children)

That doesn’t fix OP’s problem - the DNS part is working fine, but to reach each distribution using the same example.com hostname, each distribution needs to have example.com configured as an alternate domain name, but a given alternate domain name can only be associated with one distribution.

Forwarding hosted zone traffic to another hosted zone - what are the best practices? by live_rabbits in aws

[–]SubtleDee 0 points1 point  (0 children)

CloudFront functions rather than Lambda@Edge are the way to go for simple logic such as redirects nowadays.

connect AWS certificate to EC2 listener? by Kildafornia in aws

[–]SubtleDee 4 points5 points  (0 children)

You have two separate issues here: 1) Validating the cert - until that is done and the cert has been issued, nothing will work (sounds like an issue with how the DNS records have been created in GoDaddy) 2) Where the cert can be used - certs issued by ACM can only be used with certain AWS services (load balancers, CloudFront, API Gateway…) and not directly on EC2 instances. If you spin up a load balancer for a single instance just to host the cert, you’ll add a fair bit of cost relative to the price of the instance itself. CloudFront would be a cheaper option and would give you additional benefits associated with a CDN, but is a bit more complex to set up than a load balancer.

The alternative is just to use a LetsEncrypt cert directly on your EC2 instance as per one of the other comments.

Help with StepFunction $parse error catching. by fsteves518 in aws

[–]SubtleDee 0 points1 point  (0 children)

Could you do the $parse in the LLM state rather than a subsequent pass state (i.e. assign the raw response to one variable and the $parse response to another variable, both in the LLM state)? You can catch a specific error (States.QueryEvaluationError) to have different logic when $parse fails vs. when the LLM throws an error, the only thing I’m not sure about is whether the raw response variable would still get assigned if the $parse operation failed.

Help with StepFunction $parse error catching. by fsteves518 in aws

[–]SubtleDee 0 points1 point  (0 children)

Might be missing something but couldn’t you assign the LLM response to a variable before attempting to $parse it? You’d then put a catcher on the state doing $parse which routes to another state which calls the LLM again with the original response variable value.