codedeploy function

AWS CodeDeploy

AWS CodeDeploy

CodeDeploy is a deployment service that automates application deployments to Amazon EC2 instances, on-premises instances running in your own facility, serverless Lambda functions, or applications in an Amazon ECS service.

You can deploy a nearly unlimited variety of application content, such as an updated Lambda function, updated applications in an Amazon ECS service, code, web and configuration files, executables, packages, scripts, multimedia files, and so on. CodeDeploy can deploy application content stored in Amazon S3 buckets, GitHub repositories, or Bitbucket repositories. You do not need to make changes to your existing code before you can use CodeDeploy.

CodeDeploy makes it easier for you to rapidly release new features, helps you avoid downtime during application deployment, and handles the complexity of updating your applications, without many of the risks associated with error-prone manual deployments.

CodeDeploy Components

Use the information in this guide to help you work with the following CodeDeploy components:

  • Application : A name that uniquely identifies the application you want to deploy. CodeDeploy uses this name, which functions as a container, to ensure the correct combination of revision, deployment configuration, and deployment group are referenced during a deployment.
  • Deployment group : A set of individual instances, CodeDeploy Lambda deployment configuration settings, or an Amazon ECS service and network details. A Lambda deployment group specifies how to route traffic to a new version of a Lambda function. An Amazon ECS deployment group specifies the service created in Amazon ECS to deploy, a load balancer, and a listener to reroute production traffic to an updated containerized application. An Amazon EC2/On-premises deployment group contains individually tagged instances, Amazon EC2 instances in Amazon EC2 Auto Scaling groups, or both. All deployment groups can specify optional trigger, alarm, and rollback settings.
  • Deployment configuration : A set of deployment rules and deployment success and failure conditions used by CodeDeploy during a deployment.
  • Deployment : The process and the components used when updating a Lambda function, a containerized application in an Amazon ECS service, or of installing content on one or more instances.
  • Application revisions : For an Lambda deployment, this is an AppSpec file that specifies the Lambda function to be updated and one or more functions to validate deployment lifecycle events. For an Amazon ECS deployment, this is an AppSpec file that specifies the Amazon ECS task definition, container, and port where production traffic is rerouted. For an EC2/On-premises deployment, this is an archive file that contains source content—source code, webpages, executable files, and deployment scripts—along with an AppSpec file. Revisions are stored in Amazon S3 buckets or GitHub repositories. For Amazon S3, a revision is uniquely identified by its Amazon S3 object key and its ETag, version, or both. For GitHub, a revision is uniquely identified by its commit ID.

This guide also contains information to help you get details about the instances in your deployments, to make on-premises instances available for CodeDeploy deployments, to get details about a Lambda function deployment, and to get details about Amazon ECS service deployments.

CodeDeploy Information Resources

codedeploy( config = list(), credentials = list(), endpoint = NULL, region = NULL )

Arguments

  • config: Optional configuration of credentials, endpoint, and/or region.

    • credentials :

      • creds :

        • access_key_id : AWS access key ID
        • secret_access_key : AWS secret access key
        • session_token : AWS temporary session token
      • profile : The name of a profile to use. If not given, then the default profile is used.

      • anonymous : Set anonymous credentials.

    • endpoint : The complete URL to use for the constructed client.

    • region : The AWS Region used in instantiating the client.

    • close_connection : Immediately close all HTTP connections.

    • timeout : The time in seconds till a timeout exception is thrown when attempting to make a connection. The default is 60 seconds.

    • s3_force_path_style : Set this to true to force the request to use path-style addressing, i.e. http://s3.amazonaws.com/BUCKET/KEY.

    • sts_regional_endpoint : Set sts regional endpoint resolver to regional or legacy https://docs.aws.amazon.com/sdkref/latest/guide/feature-sts-regionalized-endpoints.html

  • credentials: Optional credentials shorthand for the config parameter

    • creds :

      • access_key_id : AWS access key ID
      • secret_access_key : AWS secret access key
      • session_token : AWS temporary session token
    • profile : The name of a profile to use. If not given, then the default profile is used.

    • anonymous : Set anonymous credentials.

  • endpoint: Optional shorthand for complete URL to use for the constructed client.

  • region: Optional shorthand for AWS Region used in instantiating the client.

Returns

A client for the service. You can call the service's operations using syntax like svc$operation(...), where svc is the name you've assigned to the client. The available operations are listed in the Operations section.

Service syntax

svc <- codedeploy(
  config = list(
    credentials = list(
 creds = list(
   access_key_id = "string",
   secret_access_key = "string",
   session_token = "string"
 ),
 profile = "string",
 anonymous = "logical"
    ),
    endpoint = "string",
    region = "string",
    close_connection = "logical",
    timeout = "numeric",
    s3_force_path_style = "logical",
    sts_regional_endpoint = "string"
  ),
  credentials = list(
    creds = list(
 access_key_id = "string",
 secret_access_key = "string",
 session_token = "string"
    ),
    profile = "string",
    anonymous = "logical"
  ),
  endpoint = "string",
  region = "string"
)

Operations

add_tags_to_on_premises_instancesAdds tags to on-premises instances
batch_get_application_revisionsGets information about one or more application revisions
batch_get_applicationsGets information about one or more applications
batch_get_deployment_groupsGets information about one or more deployment groups
batch_get_deployment_instancesThis method works, but is deprecated
batch_get_deploymentsGets information about one or more deployments
batch_get_deployment_targetsReturns an array of one or more targets associated with a deployment
batch_get_on_premises_instancesGets information about one or more on-premises instances
continue_deploymentFor a blue/green deployment, starts the process of rerouting traffic from instances in the original environment to instances in the replacement environment without waiting for a specified wait time to elapse
create_applicationCreates an application
create_deploymentDeploys an application revision through the specified deployment group
create_deployment_configCreates a deployment configuration
create_deployment_groupCreates a deployment group to which application revisions are deployed
delete_applicationDeletes an application
delete_deployment_configDeletes a deployment configuration
delete_deployment_groupDeletes a deployment group
delete_git_hub_account_tokenDeletes a GitHub account connection
delete_resources_by_external_idDeletes resources linked to an external ID
deregister_on_premises_instanceDeregisters an on-premises instance
get_applicationGets information about an application
get_application_revisionGets information about an application revision
get_deploymentGets information about a deployment
get_deployment_configGets information about a deployment configuration
get_deployment_groupGets information about a deployment group
get_deployment_instanceGets information about an instance as part of a deployment
get_deployment_targetReturns information about a deployment target
get_on_premises_instanceGets information about an on-premises instance
list_application_revisionsLists information about revisions for an application
list_applicationsLists the applications registered with the user or Amazon Web Services account
list_deployment_configsLists the deployment configurations with the user or Amazon Web Services account
list_deployment_groupsLists the deployment groups for an application registered with the Amazon Web Services user or Amazon Web Services account
list_deployment_instancesThe newer BatchGetDeploymentTargets should be used instead because it works with all compute types
list_deploymentsLists the deployments in a deployment group for an application registered with the user or Amazon Web Services account
list_deployment_targetsReturns an array of target IDs that are associated a deployment
list_git_hub_account_token_namesLists the names of stored connections to GitHub accounts
list_on_premises_instancesGets a list of names for one or more on-premises instances
list_tags_for_resourceReturns a list of tags for the resource identified by a specified Amazon Resource Name (ARN)
put_lifecycle_event_hook_execution_statusSets the result of a Lambda validation function
register_application_revisionRegisters with CodeDeploy a revision for the specified application
register_on_premises_instanceRegisters an on-premises instance
remove_tags_from_on_premises_instancesRemoves one or more tags from one or more on-premises instances
skip_wait_time_for_instance_terminationIn a blue/green deployment, overrides any specified wait time and starts terminating instances immediately after the traffic routing is complete
stop_deploymentAttempts to stop an ongoing deployment
tag_resourceAssociates the list of tags in the input Tags parameter with the resource identified by the ResourceArn input parameter
untag_resourceDisassociates a resource from a list of tags
update_applicationChanges the name of an application
update_deployment_groupChanges information about a deployment group

Examples

## Not run: svc <- codedeploy() svc$add_tags_to_on_premises_instances( Foo = 123 ) ## End(Not run)
  • Maintainer: Dyfan Jones
  • License: Apache License (>= 2.0)
  • Last published: 2025-03-17