github.com/jaylevin/jenkins-library@v1.230.4/documentation/docs/steps/awsS3Upload.md (about) 1 # ${docGenStepName} 2 3 ## ${docGenDescription} 4 5 ## Prerequisites 6 7 * Before you can use the step awsS3Upload, you must have an Amazon account. See [How do I create and activate a new AWS account?](https://aws.amazon.com/premiumsupport/knowledge-center/create-and-activate-aws-account/) for details. 8 * You will need AWS access keys for your S3 Bucket. Access keys consist of an access key ID and secret access key, which are used to sign programmatic requests that you make to AWS. You can create them by using the AWS Management Console. 9 * The access keys must allow the action "s3:PutObject" for the specified S3 Bucket 10 11 ## Set up the AWS Credentials 12 13 To make your AWS credentials available to the jenkins library, store them as Jenkins credentials of type "Secret Text". The "Secret Text" must be in JSON format and contain the "access_key_id", "secret_access_key", "bucket" as well as the "region". 14 15 For Example: 16 17 ```JSON 18 { 19 "access_key_id": "FJNAKNCLAVLRNBLAVVBK", 20 "bucket": "vro-artloarj-ltnl-nnbv-ibnh-lbnlsnblltbn", 21 "secret_access_key": "123467895896646438486316436kmdlcvreanvjk", 22 "region": "eu-central-1" 23 } 24 ``` 25 26 If the JSON string contains additional information, this is not a problem. These are automatically detected and skipped. 27 28 ## About Files/Directories to Upload 29 30 With the step awsS3Upload you can upload single files as well as whole directories into your S3 bucket. File formats do not matter and directory structures are preserved. 31 32 **Note:** File paths must be specified in UNIX format. So the used path separator must be "/". 33 34 ## ${docGenParameters} 35 36 ## ${docGenConfiguration} 37 38 ## ${docJenkinsPluginDependencies} 39 40 ## Example 41 42 ```groovy 43 awsS3Upload( 44 script: this, 45 awsCredentialsId: "AWS_Credentials", 46 filePath: "test.txt" 47 ) 48 ```