replaced variables by replaceAwsEnvironmentVariables so that SnsException occured ;(
config/aws.php
<?php
use Aws\Laravel\AwsServiceProvider;
return [
/*
|--------------------------------------------------------------------------
| AWS SDK Configuration
|--------------------------------------------------------------------------
|
| The configuration options set in this file will be passed directly to the
| `Aws\Sdk` object, from which all client objects are created. This file
| is published to the application config directory for modification by the
| user. The full set of possible options are documented at:
| http://docs.aws.amazon.com/aws-sdk-php/v3/guide/guide/configuration.html
|
*/
'credentials' => [
'key' => env('NULL_AWS_ACCESS_KEY_ID', ''),
'secret' => env('NULL_AWS_SECRET_ACCESS_KEY', ''),
],
'region' => env('AWS_REGION', 'ap-northeast-1'),
'version' => 'latest',
'ua_append' => [
'L5MOD/' . AwsServiceProvider::VERSION,
],
];
vapor-cli/src/BuildProcess/HarmonizeConfigurationFiles.php
/**
* Replace the AWS environment variables with dummy variables so they will not be used.
*
* The keys and secrets are automatically injected by Lambda.
*
* @param \SplFileInfo $file
* @return string
*/
protected function replaceAwsEnvironmentVariables($file)
{
return str_replace([
'AWS_ACCESS_KEY_ID',
'AWS_SECRET_ACCESS_KEY',
'AWS_SESSION_TOKEN',
], [
'NULL_AWS_ACCESS_KEY_ID',
'NULL_AWS_SECRET_ACCESS_KEY',
'NULL_AWS_SESSION_TOKEN',
], file_get_contents($file->getRealPath()));
}