brefphp / laravel-bridge

Package to use Laravel on AWS Lambda with Bref
https://bref.sh/docs/frameworks/laravel.html
MIT License
314 stars 63 forks source link

Remove the need for setting the AWS account ID #95

Closed mnapoli closed 1 year ago

mnapoli commented 1 year ago

In the upcoming Laravel docs (https://github.com/brefphp/bref/pull/1424), we set us Laravel Queues using Lift, which lets us easily configure the SQS queue URL -> the SQS_PREFIX with account ID is useless there.

For those that don't use Lift, I also added some documentation that explains how to set SQS_PREFIX (as easy as copy/paste the example): https://github.com/brefphp/bref/pull/1424/commits/b69d852e719cae975e0c5d61f93061082a40dd4a

So I think we can now safely remove the constraint of having users set the AWS_ACCOUNT_ID in their config. That's one less step when getting started 🎉

tillkruss commented 1 year ago

Yeah, setting SQS_QUEUE via !Ref would be great to have in the docs and sample Serverless.yml.

mnapoli commented 1 year ago

@tillkruss it is much simpler with the Lift construct no? (as documented in https://github.com/brefphp/bref/pull/1424) IAM permissions are automatically setup, no need to deal with CloudFormation. Documenting 3 different ways (Lift construct + manual queue creation + CloudFormation queue creation) sounds like a lot.

tillkruss commented 1 year ago

I think I couldn't use Lift because it forced me into something with S3. Let's merge this and if something is missing I'll open a PR.

tillkruss commented 1 year ago

I'll probably just add an example serverless.yml file after the migration that doesn't use lift.

Instead of documenting it, we can just have a single code example.