Skip to content

CodeDeploy

CloudMock emulates AWS CodeDeploy, supporting application, deployment group, and deployment lifecycle management.

OperationStatusNotes
CreateApplicationSupportedCreates an application
GetApplicationSupportedReturns application details
ListApplicationsSupportedLists all applications
UpdateApplicationSupportedRenames an application
DeleteApplicationSupportedDeletes an application
CreateDeploymentConfigSupportedCreates a deployment configuration
GetDeploymentConfigSupportedReturns deployment config details
ListDeploymentConfigsSupportedLists all deployment configs including built-ins
DeleteDeploymentConfigSupportedDeletes a custom deployment configuration
CreateDeploymentGroupSupportedCreates a deployment group
GetDeploymentGroupSupportedReturns deployment group details
ListDeploymentGroupsSupportedLists deployment groups
DeleteDeploymentGroupSupportedDeletes a deployment group
UpdateDeploymentGroupSupportedUpdates deployment group configuration
CreateDeploymentSupportedCreates a deployment
GetDeploymentSupportedReturns deployment details
ListDeploymentsSupportedLists deployments
StopDeploymentSupportedStops a deployment
BatchGetDeploymentsSupportedReturns details for multiple deployments
BatchGetDeploymentTargetsSupportedReturns deployment target details
AddTagsToOnPremisesInstancesSupportedTags on-premises instances
RemoveTagsFromOnPremisesInstancesSupportedUntags on-premises instances
import { CodeDeployClient, CreateApplicationCommand, CreateDeploymentCommand } from '@aws-sdk/client-codedeploy';
const client = new CodeDeployClient({
endpoint: 'http://localhost:4566',
region: 'us-east-1',
credentials: { accessKeyId: 'test', secretAccessKey: 'test' },
});
await client.send(new CreateApplicationCommand({
applicationName: 'my-app',
computePlatform: 'Server',
}));
const { deploymentId } = await client.send(new CreateDeploymentCommand({
applicationName: 'my-app',
deploymentGroupName: 'my-group',
revision: { revisionType: 'S3', s3Location: { bucket: 'my-bucket', key: 'app.zip', bundleType: 'zip' } },
}));
console.log(deploymentId);
import boto3
client = boto3.client('codedeploy',
endpoint_url='http://localhost:4566',
region_name='us-east-1',
aws_access_key_id='test',
aws_secret_access_key='test')
client.create_application(applicationName='my-app', computePlatform='Server')
response = client.create_deployment(
applicationName='my-app',
deploymentGroupName='my-group',
revision={'revisionType': 'S3', 's3Location': {'bucket': 'my-bucket', 'key': 'app.zip', 'bundleType': 'zip'}})
print(response['deploymentId'])
cloudmock.yml
services:
codedeploy:
enabled: true
  • Deployments are not actually executed on target instances
  • Deployment status transitions are simulated
  • On-premises instance registration is tag-only