aws-sdk-php-automation on 3.228.3
aws-sdk-php-automation on master
Update models for release 3.228.3 release (compare)
Hey, Everyone does anyone have an idea of how to use AWS AppConfig with the AWS SDK PHP.
My Particular use case is, I am running a simple PHP app on the EC2 instance and want to receive the JSON configurations written in the AppConfig.
require 'vendor/autoload.php';
use Aws\AppConfig\Exception\AppConfigException;
use Aws\AppConfig\AppConfigClient;
$appConfigClient = new AppConfigClient(['version' => 'latest', 'region' => 'ap-south-1']);
$clientid = uniqid('', true);
$params = [
'Application' => $APP_CONFIG_APP,
'ClientId' => $clientid,
'Configuration' => $APP_CONFIG_CONFIGURATION_PROFILE,
'Environment' => $APP_CONFIG_ENVIRONMENT
];
$response = $appConfigClient->getConfiguration($params);
$config = $response['Content'];
Also, I am authorizing with the AppConfig by an Adminstrator IAM Role Provided so, no issues on that side and I am able to get the following output
{ "Content": {}, "ConfigurationVersion": "1", "ContentType": "application\/octet-stream", "@metadata": { "statusCode": 200, client_id=60696", and some more fields...}
But the issue is I am not getting the AppConfig Content but able to extract the metadata regarding the Data.
So, Anyone who had tried this please help me out here.
$revoked = $this->getEC2Client($awsZone)->revokeSecurityGroupIngress([
'GroupId' => $securityGroup['GroupId'],
//'GroupName' => $securityGroup['GroupName'],
'IpPermissions' => $securityGroup['IpPermissions']
]);
InvalidRequest (client): The request received was invalid