Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Howdy!
So, here's the deal. Currently, both
LambdaClient
andCloudWatchLogsClient
are bound in the Laravel container, which is wonderful, because that means if we need to override that binding in user-land, we can. 😈However, in
Hammerstone\Sidecar\Package.php
, theS3Client
is currently being manually instantiated, which means thatThis PR aims to fix that with the following steps:
S3Client
behind a HammerstoneS3Client
that extends the formerS3Client
in theSidecarServiceProvider
Package
to make use of this boundS3Client
rather than manually instantiatingWhilst I was at it, I realised that what I actually tend to want as a user is to return a custom configuration array for all three services: Lambda, CloudWatch and S3 (for example, if I'm using token auth as an added layer of security). To help make it simple for a user to provide a custom config array for these services, I've made the following adjustments/additions:
AwsClientConfiguration
, which expects implementations to return a config arraySidecarServiceProvider::getAwsClientConfiguration
previouslyThere is a case I think for also passing the client FQCN as a parameter to the
AwsClientConfiguration::getConfiguration
method, which would allow for passing slightly different configurations depending on the service being used, but I opted not to add that in just yet pending your opinion.Any how, any questions let me know!
Kind Regards,
Luke