aws-sdk
module for interact with the AWS SDK
Installation
dagger install github.com/ernesto27/daggerverse/aws-sdk@4921d3afbdd99bc24a214d9a88c6ed8b50adca6c
Entrypoint
Return Type
AwsSdk
Example
dagger -m github.com/ernesto27/daggerverse/aws-sdk@4921d3afbdd99bc24a214d9a88c6ed8b50adca6c call \
func (m *myModule) example() *AwsSdk {
return dag.
AwsSdk()
}
@function
def example() -> dag.AwsSdk:
return (
dag.aws_sdk()
)
@func()
example(): AwsSdk {
return dag
.awsSdk()
}
Types
AwsSdk 🔗
uploadBucket() 🔗
Upload a file to a AWS S3 bucket
Example usage:
dagger call upload-bucket
–region=“us-west-2”
–bucket=“mybucket”
–file=myfile
–access-key env:AWS_ACCESS_KEY –secret-key env:AWS_SECRET_KEY
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
accessKey | Secret ! | - | AWS access key |
secretKey | Secret ! | - | AWS secret key |
region | String ! | - | AWS S3 region |
bucket | String ! | - | AWS S3 bucket name |
file | File ! | - | File to upload |
timeout | Integer | 60 | Timeout for the operation |
Example
dagger -m github.com/ernesto27/daggerverse/aws-sdk@4921d3afbdd99bc24a214d9a88c6ed8b50adca6c call \
upload-bucket --access-key env:MYSECRET --secret-key env:MYSECRET --region string --bucket string --file file:path
func (m *myModule) example(ctx context.Context, accessKey *Secret, secretKey *Secret, region string, bucket string, file *File) string {
return dag.
AwsSdk().
UploadBucket(ctx, accessKey, secretKey, region, bucket, file)
}
@function
async def example(access_key: dagger.Secret, secret_key: dagger.Secret, region: str, bucket: str, file: dagger.File) -> str:
return await (
dag.aws_sdk()
.upload_bucket(access_key, secret_key, region, bucket, file)
)
@func()
async example(accessKey: Secret, secretKey: Secret, region: string, bucket: string, file: File): Promise<string> {
return dag
.awsSdk()
.uploadBucket(accessKey, secretKey, region, bucket, file)
}