Skip to content

Shield

CloudMock emulates AWS Shield (Advanced), supporting protection management, subscriptions, attack tracking, protection groups, and tagging.

OperationStatusNotes
CreateProtectionSupportedCreates a protection for a resource
DescribeProtectionSupportedReturns protection details
ListProtectionsSupportedLists all protections
DeleteProtectionSupportedDeletes a protection
CreateSubscriptionSupportedCreates a Shield Advanced subscription
DescribeSubscriptionSupportedReturns subscription details
DescribeAttackSupportedReturns attack details
ListAttacksSupportedLists detected attacks
CreateProtectionGroupSupportedCreates a protection group
DescribeProtectionGroupSupportedReturns protection group details
ListProtectionGroupsSupportedLists protection groups
UpdateProtectionGroupSupportedUpdates a protection group
DeleteProtectionGroupSupportedDeletes a protection group
TagResourceSupportedAdds tags to a resource
UntagResourceSupportedRemoves tags from a resource
ListTagsForResourceSupportedLists tags for a resource
import { ShieldClient, CreateProtectionCommand } from '@aws-sdk/client-shield';
const client = new ShieldClient({
endpoint: 'http://localhost:4566',
region: 'us-east-1',
credentials: { accessKeyId: 'test', secretAccessKey: 'test' },
});
const { ProtectionId } = await client.send(new CreateProtectionCommand({
Name: 'my-protection',
ResourceArn: 'arn:aws:elasticloadbalancing:us-east-1:000000000000:loadbalancer/app/my-alb/1234567890',
}));
console.log(ProtectionId);
import boto3
client = boto3.client('shield',
endpoint_url='http://localhost:4566',
region_name='us-east-1',
aws_access_key_id='test',
aws_secret_access_key='test')
response = client.create_protection(
Name='my-protection',
ResourceArn='arn:aws:elasticloadbalancing:us-east-1:000000000000:loadbalancer/app/my-alb/1234567890')
print(response['ProtectionId'])
cloudmock.yml
services:
shield:
enabled: true
  • No actual DDoS protection is provided
  • Attacks are stubs and not based on real traffic analysis
  • Subscription does not incur costs or provide real SRT access