aws-cli
This module provides a set of functions to interact with AWS CLI
Installation
dagger install github.com/ernesto27/daggerverse/aws-cli@v0.2.1
Entrypoint
Return Type
AwsCli
Example
dagger -m github.com/ernesto27/daggerverse/aws-cli@5548d6a8ee5fc4736fb3a5a8971f4650acac5866 call \
func (m *myModule) example() *AwsCli {
return dag.
AwsCli()
}
@function
def example() -> dag.AwsCli:
return (
dag.aws_cli()
)
@func()
example(): AwsCli {
return dag
.awsCli()
}
Types
AwsCli 🔗
run() 🔗
Executes an AWS CLI command Example usage
dagger call -m github.com/ernesto27/daggerverse/aws-cli run
–command=“s3 ls”
–dir-config ~/.aws/
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
command | String ! | - | AWS CLI command to execute |
dirConfig | Directory ! | - | AWS config credentials directory |
dirFiles | Directory | - | Directory with files to use in the command |
Example
dagger -m github.com/ernesto27/daggerverse/aws-cli@5548d6a8ee5fc4736fb3a5a8971f4650acac5866 call \
run --command string --dir-config DIR_PATH
func (m *myModule) example(ctx context.Context, command string, dirConfig *Directory) string {
return dag.
AwsCli().
Run(ctx, command, dirConfig)
}
@function
async def example(command: str, dir_config: dagger.Directory) -> str:
return await (
dag.aws_cli()
.run(command, dir_config)
)
@func()
async example(command: string, dirConfig: Directory): Promise<string> {
return dag
.awsCli()
.run(command, dirConfig)
}
publishToEcr() 🔗
Log in to AWS, build a Docker image and publish it to ECR Example usage
dagger call -m github.com/ernesto27/daggerverse/aws-cli publish-to-ecr
–dir-config ~/.aws
–dir-source .
–region=“us-west-2”
–registry=“registry-url”
–uri=“uri”
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
dirConfig | Directory ! | - | AWS config credentials directory |
dirSource | Directory ! | - | Directory with source code and Dockerfile |
region | String ! | - | AWS region |
registry | String ! | - | ECR registry URL |
uri | String ! | - | ECR image URI |
Example
dagger -m github.com/ernesto27/daggerverse/aws-cli@5548d6a8ee5fc4736fb3a5a8971f4650acac5866 call \
publish-to-ecr --dir-config DIR_PATH --dir-source DIR_PATH --region string --registry string --uri string
func (m *myModule) example(ctx context.Context, dirConfig *Directory, dirSource *Directory, region string, registry string, uri string) string {
return dag.
AwsCli().
PublishToEcr(ctx, dirConfig, dirSource, region, registry, uri)
}
@function
async def example(dir_config: dagger.Directory, dir_source: dagger.Directory, region: str, registry: str, uri: str) -> str:
return await (
dag.aws_cli()
.publish_to_ecr(dir_config, dir_source, region, registry, uri)
)
@func()
async example(dirConfig: Directory, dirSource: Directory, region: string, registry: string, uri: string): Promise<string> {
return dag
.awsCli()
.publishToEcr(dirConfig, dirSource, region, registry, uri)
}
updateEcsService() 🔗
Update an ECS service with a new task definition Example usage
dagger call -m github.com/ernesto27/daggerverse/aws-cli update-ecs-service
–dir-config ~/.aws
–region=“us-west-2”
–task-definition ./task-definition.json
–cluster=“your-cluster”
–service=“your-service”
–task-definition-name=“your-td”
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
dirConfig | Directory ! | - | No description provided |
region | String ! | - | No description provided |
taskDefinition | File ! | - | No description provided |
cluster | String ! | - | No description provided |
service | String ! | - | No description provided |
taskDefinitionName | String ! | - | No description provided |
Example
dagger -m github.com/ernesto27/daggerverse/aws-cli@5548d6a8ee5fc4736fb3a5a8971f4650acac5866 call \
update-ecs-service --dir-config DIR_PATH --region string --task-definition file:path --cluster string --service string --task-definition-name string
func (m *myModule) example(ctx context.Context, dirConfig *Directory, region string, taskDefinition *File, cluster string, service string, taskDefinitionName string) string {
return dag.
AwsCli().
UpdateEcsService(ctx, dirConfig, region, taskDefinition, cluster, service, taskDefinitionName)
}
@function
async def example(dir_config: dagger.Directory, region: str, task_definition: dagger.File, cluster: str, service: str, task_definition_name: str) -> str:
return await (
dag.aws_cli()
.update_ecs_service(dir_config, region, task_definition, cluster, service, task_definition_name)
)
@func()
async example(dirConfig: Directory, region: string, taskDefinition: File, cluster: string, service: string, taskDefinitionName: string): Promise<string> {
return dag
.awsCli()
.updateEcsService(dirConfig, region, taskDefinition, cluster, service, taskDefinitionName)
}