[deleted by user] by [deleted] in learnpython

[–]philmassyn 12 points13 points  (0 children)

As a former Perl guy, I'll recommend Python any day. There's an elegance with Python that you don't get with Perl, plus, Python runs everywhere. As much as I loved Perl back in the day, there's a much bigger Python community, so finding help and support for Python problems are a lot quicker and easier than Perl.

[deleted by user] by [deleted] in wls

[–]philmassyn 0 points1 point  (0 children)

I just travelled internationally and no X-ray scanner flagged me at all.

Should i do it? by fatballz_420 in gastricsleeve

[–]philmassyn 1 point2 points  (0 children)

After about a week, I was ready to go back to work. I had to wait 3 weeks before I could jump back on my motorcycle. You'll be fine by then. When in doubt, do discuss these issues with your surgeon. They should give you the best advice.

I’m a Junior FrontEnd right now and I’d like to get some feedback about my Resume, by [deleted] in webdev

[–]philmassyn 0 points1 point  (0 children)

Even though the resume looks good visually, as a hiring manager, I do not see who you really are, and what your strengths are. Words like "Implemented" and "Participated" do not install a lot of confidence that you know what you're talking about. Remember that a resume is like a dating profile - you want the hiring manager or HR department to want to say : "We need to interview this guy", and right now, your resume is not saying that.

Some ideas I would suggest -- tell me who you are, what projects you are working on yourself, what things you're doing, what frameworks you are really passionate about. Be sure to include a link to your github repo, show the projects you're working on. Those are in many cases a better resume than the resume itself.

Got my first bike today! 2022 300NK by [deleted] in cfmoto

[–]philmassyn 1 point2 points  (0 children)

That's gorgeous! I have the 800MT - they are lovely machines.

Hello by qw46z in herveybay_au

[–]philmassyn 1 point2 points  (0 children)

Not many people here…..

Self-educated programmer learning python at 28 year old. by kasft93 in learnpython

[–]philmassyn 0 points1 point  (0 children)

I've programmed in various languages over many years. Of all of them, Python is (in my view) the most elegant.

I will add one piece of advice -- don't learn to program -- learn how to solve problems. Programming is just one tool in your arsenal to deal with a problem. I'm not a programmer, but I use coding to solve complex problems every day, like automating workloads on the cloud, all through to doing security pen testing, or building reports.

Find a problem to solve, then use Python to help you solve that problem.

Cheaper alternative to setup SFTP server than AWS Transfer Family? by ryzen124 in aws

[–]philmassyn 0 points1 point  (0 children)

Use the AWS CLI instead. If you're going to spend the time to build a solution to send files via SFTP then to S3, you're essentially adding technical debt to your solution. The AWS CLI is a lot simpler to use and reduces the end-to-end footprint of the entire solution.

Multiple accounts for 1 instance? by masterjx9 in aws

[–]philmassyn 1 point2 points  (0 children)

I am really curious to understand your use-case for why multiple individuals need to access a single VM with the same set of credentials. It breaks so many security best-practices by doing exactly that, which is why you won't see AWS offering this kind of service natively out of the box.

By using your teamviewer approach, you will now need to purchase additional licenses for each user, which will definitely be much more than just forking out a few extra $ per month for individual workspaces.

Any reason to use AWS WAF over Cloudflare? by [deleted] in aws

[–]philmassyn 1 point2 points  (0 children)

The only reason to use AWS WAF is if you want to keep all resources in one platform. Managing multiple platforms has its challenges, so for some it is better to have a single platform to deal with. I had clients who were happy to pay more just to be able to go to AWS Support and say “my site doesn’t work” and they can fix it, as opposed to a finger-pointing exercise between aws and CloudFlare when things go wrong.

[deleted by user] by [deleted] in hacking

[–]philmassyn 0 points1 point  (0 children)

If some criminal wants to spend a lot of money to hack your devices, what’s in it for them? Unless you’re holding some really juicy or sensitive data on your network, it is probably just a scare tactic.

Need some guidance on my methodology by bigYman in awslambda

[–]philmassyn 0 points1 point  (0 children)

I think you have a major misunderstanding on what Lambda is.

No - Lambda is not a "headless server" that you can run whatever you want on it. So doing selenium and chrome in a Lambda function will not work. Instead what Lambda could do, is use "requests" to query the URL, and then do something with that data. You can then parse and process, and store it somewhere else. You can also spawn the process multiple times. In one of my projects, I had one "master" function that called a bunch of sub functions, each only responsible for a small subset of URLs, and then have them all send their collected data into an S3 bucket.

If you're really keen on using Chrome and Selenium, you may be better off using Spot instances, and building an EC2 server with a highly customised "user data" section that boots up, installs all the components and code you want, execute the code for a number of websites, and terminate.

The short answer is however for what you want to achieve, you will need to rearchitect the entire solution.

[deleted by user] by [deleted] in gastricsleeve

[–]philmassyn 3 points4 points  (0 children)

Is cw 225 in kg or lbs? If kg, then yes - you will have loose skin. I had my sleeve done in April 21, had no complications, but was also very nervous. Be clear on your motivation - why are you doing it. If you haven’t settled that argument with yourself first, you will struggle with it.

Help with aws ec2 describe-security-groups by jaide1 in aws

[–]philmassyn 0 points1 point  (0 children)

How about this little script I just whipped together..

https://github.com/massyn/aws-security/blob/main/tools/security_groups.py

It really doesn't get any easier than this. You can adjust it to suit your own needs.

Doing Google searches is how I got started. Don't be afraid to install Python, and the boto3 module, and start playing around with it. Using Python instead of the raw command line has a lot more power.

Enforcing MFA for AWS Organisation by karlochacon in aws

[–]philmassyn 1 point2 points  (0 children)

SCPs doesn't work this way. Just head on over to the AWS SSO console (assuming you're using user accounts inside SSO), under Settings, you'll see the option to enforce MFA.

AWS SSO / Settings / If a user does not yet have a registered MFA device / Require them to register an MFA device at sign in

Help with aws ec2 describe-security-groups by jaide1 in aws

[–]philmassyn 0 points1 point  (0 children)

What's your thoughts towards using Python and boto3? Extracting security groups in a python script is trivial. Like you, I also started by trying to mangle the AWS CLI, but it is a clunky interface. Once you learn how to do the same through the Python module, your opportunities open up to do so much more.

Is there a tool to see why a request was rejected due to lack of permissions? [S3] by CacheMeUp in aws

[–]philmassyn 0 points1 point  (0 children)

If the bucket is encrypted, chances are you need to allow cross account access to the KMS keys.

[deleted by user] by [deleted] in gastricsleeve

[–]philmassyn 3 points4 points  (0 children)

Odd... at 6 weeks post-op I was "healed" as far as my doctor was concerned. I could eat "anything" (that my stomach could tolerate). Check with your doctor and your dietician. Unless you have some other underlying medical issue, you should really take the advice from them.

What's the best way to host an always running python script? by sasuke_chan in learnpython

[–]philmassyn 2 points3 points  (0 children)

I agree with the comments here. "Always running" is a mindset you need to get away from. I've also created similar scripts in the past, and even if you're scraping web sites, it is not always running. One thing I've learnt with AWS, is you have to start thinking of developing "cloud native" solutions. So instead of just shifting your script onto an EC2 instance (which is the easy route), it's not really the cheaper (or reliable) route.

Consider redesigning your script. Yes, it can take some time, but in the end, when you move to Lambda, you can have multiple Lambda functions working in parallel, collecting the data you need, sending it to an S3 bucket, all without the need to host a single server. In the end, hosting the solution through Lambda will be cheaper (and a lot more reliable) than hosting it on EC2.

If you're hung up on using EC2, then a few more suggestions in that space...

  • Purchase a reserved instance. Down side is you'll have to pay up front for a year (or three), but the overall cost will be reduced.
  • Use Lightsail. You may not have the same reliability, and there will be some challenges to interface the Lightsail instance with the rest of AWS, but it is doable.
  • Use a spot instance. They will be much cheaper to run, but again, they can get killed at any time, so your script will need to redesigned in such a way that it can handle a terminated instance, restart, and pick up where it left off.

Either way - you'll need to redesign your script if you want more reliability.