Mode:
Duration:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package main
import "fmt"
type S3Object struct {
Name string
Size string
StorageClass string
}
type BucketPolicy struct {
Action string
Access string
}
func uploadObject(object S3Object) {
fmt.Println("Uploaded Object:", object.Name)
fmt.Println("Size:", object.Size)
fmt.Println("Storage Class:", object.StorageClass)
}
func main() {
object := S3Object{
Name: "profile-image.png",
Size: "2MB",
StorageClass: "STANDARD",
}
policy := BucketPolicy{
Action: "Read",
Access: "Private",
}
uploadObject(object)
fmt.Println("Bucket Policy:", policy.Access)
fmt.Println("Lifecycle Rule: Move old files to Glacier")
}Coding works best on desktop or with an external keyboard.