Documentation
¶
Overview ¶
Package sdk is the official AWS SDK v2 for the Go programming language.
aws-sdk-go-v2 is the Developer Preview for the v2 of the AWS SDK for the Go programming language. Look for additional documentation and examples to be added.
Getting started ¶
The best way to get started working with the SDK is to use `go get` to add the SDK and Service module to your Go Workspace manually.
go get github.com/aws/aws-sdk-go-v2/config go get github.com/aws/aws-sdk-go-v2/service/dynamodb
This example shows how you can use the v2 SDK to make an API request using the SDK's Amazon DynamoDB client.
package main
import (
"context"
"fmt"
"log"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/config"
"github.com/aws/aws-sdk-go-v2/service/dynamodb"
)
func main() {
// Using the SDK's default configuration, loading additional config
// and credentials values from the environment variables, shared
// credentials, and shared configuration files
cfg, err := config.LoadDefaultConfig()
if err != nil {
log.Fatalf("unable to load SDK config, %v", err)
}
// Set the AWS Region that the service clients should use
cfg.Region = "us-west-2"
// Using the Config value, create the DynamoDB client
svc := dynamodb.NewFromConfig(cfg)
// Send the request, and get the response or error back
resp, err := svc.DescribeTable(&dynamodb.DescribeTableInput{
TableName: aws.String("myTable"),
})
if err != nil {
log.Fatalf("failed to describe table, %v", err)
}
fmt.Println("Response", resp)
}
Directories
¶
| Path | Synopsis |
|---|---|
|
Package aws provides the core SDK's utilities and shared types.
|
Package aws provides the core SDK's utilities and shared types. |
|
arn
Package arn provides a parser for interacting with Amazon Resource Names.
|
Package arn provides a parser for interacting with Amazon Resource Names. |
|
signer/v4
Package v4 implements signing for AWS V4 signer Provides request signing for request that need to be signed with AWS V4 Signatures.
|
Package v4 implements signing for AWS V4 signer Provides request signing for request that need to be signed with AWS V4 Signatures. |
|
config
module
|
|
|
credentials
module
|
|
|
ec2imds
module
|
|
|
internal
|
|
|
awstesting/unit
Package unit performs initialization and validation for unit tests
|
Package unit performs initialization and validation for unit tests |
|
ini
Package ini is an LL(1) parser for configuration files.
|
Package ini is an LL(1) parser for configuration files. |
|
sync/singleflight
Package singleflight provides a duplicate function call suppression mechanism.
|
Package singleflight provides a duplicate function call suppression mechanism. |
|
service
|
|
|
acm
module
|
|
|
apigateway
module
|
|
|
applicationautoscaling
module
|
|
|
applicationdiscoveryservice
module
|
|
|
appstream
module
|
|
|
athena
module
|
|
|
autoscaling
module
|
|
|
batch
module
|
|
|
cloudformation
module
|
|
|
cloudfront
module
|
|
|
cloudhsmv2
module
|
|
|
cloudsearch
module
|
|
|
cloudtrail
module
|
|
|
cloudwatch
module
|
|
|
codebuild
module
|
|
|
codecommit
module
|
|
|
codedeploy
module
|
|
|
codepipeline
module
|
|
|
codestar
module
|
|
|
cognitoidentityprovider
module
|
|
|
configservice
module
|
|
|
costandusagereportservice
module
|
|
|
databasemigrationservice
module
|
|
|
devicefarm
module
|
|
|
directconnect
module
|
|
|
directoryservice
module
|
|
|
docdb
module
|
|
|
dynamodb
module
|
|
|
ec2
module
|
|
|
ecr
module
|
|
|
ecs
module
|
|
|
efs
module
|
|
|
elasticache
module
|
|
|
elasticbeanstalk
module
|
|
|
elasticloadbalancing
module
|
|
|
elasticloadbalancingv2
module
|
|
|
elasticsearchservice
module
|
|
|
elastictranscoder
module
|
|
|
emr
module
|
|
|
eventbridge
module
|
|
|
firehose
module
|
|
|
gamelift
module
|
|
|
glacier
module
|
|
|
glue
module
|
|
|
health
module
|
|
|
iam
module
|
|
|
inspector
module
|
|
|
internal/s3shared
module
|
|
|
iot
module
|
|
|
kinesis
module
|
|
|
kms
module
|
|
|
lambda
module
|
|
|
lexruntimeservice
module
|
|
|
lightsail
module
|
|
|
marketplacecommerceanalytics
module
|
|
|
neptune
module
|
|
|
opsworks
module
|
|
|
pinpointemail
module
|
|
|
polly
module
|
|
|
rds
module
|
|
|
redshift
module
|
|
|
rekognition
module
|
|
|
route53
module
|
|
|
route53domains
module
|
|
|
route53resolver
module
|
|
|
s3
module
|
|
|
secretsmanager
module
|
|
|
servicecatalog
module
|
|
|
ses
module
|
|
|
sfn
module
|
|
|
shield
module
|
|
|
sms
module
|
|
|
snowball
module
|
|
|
sns
module
|
|
|
sqs
module
|
|
|
ssm
module
|
|
|
sts
module
|
|
|
support
module
|
|
|
waf
module
|
|
|
wafregional
module
|
|
|
wafv2
module
|
|
|
workspaces
module
|
Click to show internal directories.
Click to hide internal directories.