steering_docs/php-tech/hello.md
šØ CRITICAL - Must be completed BEFORE any code generation
# Step 1: List available knowledge bases
ListKnowledgeBases()
# Step 2: Query coding standards (REQUIRED)
QueryKnowledgeBases("coding-standards-KB", "PHP-code-example-standards")
# Step 3: Query implementation patterns (REQUIRED)
QueryKnowledgeBases("PHP-premium-KB", "PHP implementation patterns")
# Step 4: AWS service research (REQUIRED)
search_documentation("What is [AWS Service] and what are its key API operations?")
read_documentation("https://docs.aws.amazon.com/[service]/latest/[relevant-page]")
FAILURE TO COMPLETE KNOWLEDGE BASE CONSULTATION WILL RESULT IN INCORRECT CODE STRUCTURE
Generate simple "Hello" examples that demonstrate basic service connectivity and the most fundamental operation using direct AWS SDK for PHP client calls.
example_code/{service}/
āāā Hello{Service}.php # Hello example file
MANDATORY standalone hello file:
<?php
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
require 'vendor/autoload.php';
use Aws\{Service}\{Service}Client;
use Aws\Exception\AwsException;
echo "Hello {AWS Service}!\n";
try {
$client = new {Service}Client([
'region' => 'us-east-1',
'version' => 'latest'
]);
// Simple service operation
$result = $client->someBasicOperation();
echo "Successfully connected to {AWS Service}\n";
// Display basic result
} catch (AwsException $e) {
echo "Error: " . $e->getMessage() . "\n";
}
new {Service}Client() directly