Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to import the AWS PowerShell module.
PowerShell
Import-Module [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'AWSCLI' which is a command line tool, not a PowerShell module.
Using 'AWS.Tools.Common' which is a dependency module, not the main module.
✗ Incorrect
The AWS PowerShell module is imported using 'Import-Module AWSPowerShell.NetCore'.
2fill in blank
mediumComplete the code to list all S3 buckets using AWS PowerShell.
PowerShell
Get-[1]Bucket Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Get-EC2Bucket' which is not a valid cmdlet.
Using 'Get-IAMBucket' which is incorrect because IAM manages users, not buckets.
✗ Incorrect
The cmdlet to list S3 buckets is 'Get-S3Bucket'.
3fill in blank
hardFix the error in the code to create a new S3 bucket named 'mybucket'.
PowerShell
New-S3[1] -BucketName mybucket Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'New-S3Buckets' which is not a valid cmdlet.
Using 'New-S3CreateBucket' which is incorrect syntax.
✗ Incorrect
The correct cmdlet to create a bucket is 'New-S3Bucket'.
4fill in blank
hardFill both blanks to upload a file 'file.txt' to bucket 'mybucket' with key 'file.txt'.
PowerShell
Write-[1]Object -BucketName mybucket -File [2] -Key file.txt
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Write-S3' which is incomplete.
Using bucket name instead of file path for the -File parameter.
✗ Incorrect
The cmdlet to upload is 'Write-S3Object' and the file parameter is the file path 'file.txt'.
5fill in blank
hardFill all three blanks to get the content of an object 'file.txt' from bucket 'mybucket' and save it to 'output.txt'.
PowerShell
Read-[1]Object -BucketName [2] -Key file.txt -File [3]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Read-S3' which is incomplete.
Swapping bucket name and file name parameters.
✗ Incorrect
The cmdlet is 'Read-S3Object', bucket name is 'mybucket', and output file is 'output.txt'.