Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Ved Singh
    @vedgunjan
    Hi All, Is it possible to auto-create partition key using enhanced dynamodb ?
    Marcin SzaƂomski
    @baldram
    Hi AWS Team, I know that SDK team is not responsible for lambda library.
    But this is the only channel to contact with AWS Team from my side.
    Would you please inform some person from aws-lambda-java-libs regarding this security related PR? Waits for review, hopefully approval and merge.
    The previous update on CVE-2021-44228 vulnerability is not enough. This one fixes the CVE-2021-45046.
    aws/aws-lambda-java-libs#293
    Thanks!
    German Anders
    @AndersGerman_twitter

    I'm having some issues while trying to process a response from an async api call. Basically I'm trying to describe some rds clusters from aws on scala with the following approach:

    def describeClusters(): Unit = { val clustersReq = DescribeDbClustersRequest.builder().build() val clustersResp = client.describeDBClustersPaginator(clustersReq) val clusters = clustersResp.dbClusters() ... }

    So far the clusters val is of type SdkPublisher[DBCluster], and from there I don't know exactly how to handle it. I suppose that I need to get a stream of data from that publisher, so I need to subscribe to that in order to request that stream. But I don't know how can I do it. Any ideas?
    knuspertante
    @knuspertante

    Hi Team,

    how can I get an updated item (I use @DynamoDbVersionAttribute vor optimistic versioning and @DynamoDbAutoGeneratedTimestampAttribute for updated-date) after an dynamodbTable.putItem as in SDK V1?

    Is every single time a getItem request necessary?

    rnaval
    @rnaval

    Hello all! I'm currently trying to monitor the namespace AWS/Events via Cloudwatch. I noticed that there seems to be an undocumented dimension called EventBusName when I try to list metrics:

    {
        "Metrics": [
            {
                "Namespace": "AWS/Events",
                "MetricName": "FailedInvocations",
                "Dimensions": [
                    {
                        "Name": "EventBusName",
                        "Value": "test-event-bus"
                    },
                    {
                        "Name": "RuleName",
                        "Value": "test-rule-custom"
                    }
                ]
            },
            {
                "Namespace": "AWS/Events",
                "MetricName": "Invocations",
                "Dimensions": [
                    {
                        "Name": "EventBusName",
                        "Value": "test-event-bus"
                    },
                    {
                        "Name": "RuleName",
                        "Value": "test-rule-custom"
                    }
                ]
            },
            {
                "Namespace": "AWS/Events",
                "MetricName": "TriggeredRules",
                "Dimensions": [
                    {
                        "Name": "EventBusName",
                        "Value": "test-event-bus"
                    },
                    {
                        "Name": "RuleName",
                        "Value": "test-rule-custom"
                    }
                ]
            }
        ]
    }

    The interesting this here is that when the event bus being used is the default event bus, this dimension disappears:

    {
        "Metrics": [
            {
                "Namespace": "AWS/Events",
                "MetricName": "TriggeredRules",
                "Dimensions": [
                    {
                        "Name": "RuleName",
                        "Value": "test-rule-default"
                    }
                ]
            },
            {
                "Namespace": "AWS/Events",
                "MetricName": "Invocations",
                "Dimensions": [
                    {
                        "Name": "RuleName",
                        "Value": "test-rule-default"
                    }
                ]
            },
            {
                "Namespace": "AWS/Events",
                "MetricName": "FailedInvocations",
                "Dimensions": [
                    {
                        "Name": "RuleName",
                        "Value": "test-rule-default"
                    }
                ]
            }
        ]
    }

    Any idea on why this is the case? It looks like a bug, but keen to know if this is expected by any chance. Thanks!

    Nicholas Connor
    @nkconnor

    anybody have an example of the right type parameters to use here:

    val rsp: CompletableFuture[GetObjectResponse] =
      client.getObject(objectRequest, AsyncResponseTransformer.toBytes())

    None of the Java examples I've found are specifying type parameters. I'm guessing there is some new type inference in the Java compiler?

    To be clear, that client is S3AsyncClient and I'm getting an overloaded method error with alternatives
    Nicholas Connor
    @nkconnor

    searching a bit more I found this similar situation from this channel:

    @drocsid
    I found some ways to reason about this here: aws/aws-sdk-java-v2#94
    That post suggests the documentation was updated, but I ran into similar issues...
    Not sure where to look for the updated docs.
    @drocsid
    So the answer was to construct the StreamingResponseHandler with type parameter predefined like in #94
    def getFileResponseHandler(path: String): StreamingResponseHandler[GetObjectResponse,GetObjectResponse] = StreamingResponseHandler.toFile(Paths.get(path))

    So possibly I just need to name the result type of AsyncResponseTransformer.toBytes()
    surajgawas110
    @surajgawas110
    Hi All, need one help with JAVA SDK for ECS, trying to get available regions for my account for ECS service - Fargate. how can I get that?
    Anirudh Mergu
    @AnirudhMergu
    How to use @DynamoDbAutoGeneratedTimestampAttribute in Kotlin. I'm getting errors if I use
    @set:DynamoDbAutoGeneratedTimestampAttribute lateinit var creationDate: Instant or @get lateinit var creationDate: Instant
    kotlin.UninitializedPropertyAccessException: lateinit property creationDate has not been initialized
    katiekiki
    @katiekiki
    Hi I am trying to use aws sdk 2 with dax and the code reference in the aws documentation doesn't compile. Is there any updated code sample I can refer to? Specifically, I am trying to make dax work with enchanceddynamodbclient
    Jackie S
    @eikkaj
    Hey folks, I'm trying to use the textract java sdk v2 for form analysis. The results are completely different between the aws management console and what I see output with the SDK. Wondering if I can get any support / guidance around this.
    Jackie S
    @eikkaj
    fwiw i also submitted: aws/aws-sdk-java-v2#3095
    Daniel Svensson
    @dsvensson
    This issue was put into SDK Team Backlog (Ordered) in New Features (Public) on Jul 10, 2019.... does that have any significance on when it will be done? aws/aws-sdk-java-v2#370
    Mikhail Nemenko
    @eniqen

    hey guys, I have an issue with software.amazon.awssdk.securitymanager client
    I'm trying to mock request call using wiremock but it cause an error when I got a result

    Here is the test itself

    class SecretManagerSpec extends AnyFlatSpec with Matchers with BeforeAndAfterEach {
      val port = 8080
      val host = "localhost"
      val wireMockRule =
        new WireMockServer(wireMockConfig().port(port))
    
      override def beforeEach: Unit = {
        wireMockRule.start()
        WireMock.configureFor(host, port)
      }
    
      override def afterEach {
        wireMockRule.stop()
      }
    
      it should "mock security manager call and return db connection properties" in {
    
        val dummy =
          s"""|{
              |"arn": "arn:aws:secretsmanager:us-west-2:123456789012:secret:secret-abcdef",
              |"CreatedDate": 1.523477145713E9,
              |"Name": "NAME",
              |"VersionId": "EXAMPLE1-90ab-cdef-fedc-ba987SECRET1",
              |"VersionStages": ["AWSPREVIOUS"],
              |"SecretString": "{"password":"pass","dbname":"db","engine":"postgres","port":5432,"dbInstanceIdentifier":"rrr","host":"www","username":"random"}"
              |}""".stripMargin
    
        stubFor(post(anyUrl()).withHeader("X-Amz-Target", equalTo("secretsmanager.GetSecretValue"))
                  .willReturn(
            ok().withBody(dummy).withHeader("Content-Type", "text/plain")
          )
        )
    
        val dbConfig = DBConfig("secret", "us-west-2")
        val dbConn = DBConfig.getConnectionOptions(dbConfig)
      }
    }
    the problem is in the SecretString field when I pass it in double quotes like it is a string but include there json it fails with this error
    17:33:30,887 DEBUG org.apache.http.wire                                          - http-outgoing-0 << "HTTP/1.1 200 OK[\r][\n]"
    17:33:30,887 DEBUG org.apache.http.wire                                          - http-outgoing-0 << "Content-Type: text/plain[\r][\n]"
    17:33:30,887 DEBUG org.apache.http.wire                                          - http-outgoing-0 << "Matched-Stub-Id: f18f77d3-562d-4d26-8503-de70e9b924a7[\r][\n]"
    17:33:30,887 DEBUG org.apache.http.wire                                          - http-outgoing-0 << "Vary: Accept-Encoding, User-Agent[\r][\n]"
    17:33:30,887 DEBUG org.apache.http.wire                                          - http-outgoing-0 << "Transfer-Encoding: chunked[\r][\n]"
    17:33:30,887 DEBUG org.apache.http.wire                                          - http-outgoing-0 << "[\r][\n]"
    17:33:30,887 DEBUG org.apache.http.wire                                          - http-outgoing-0 << "1FF[\r][\n]"
    17:33:30,908 DEBUG org.apache.http.wire                                          - http-outgoing-0 << "{[\n]"
    17:33:30,909 DEBUG org.apache.http.wire                                          - http-outgoing-0 << ""arn": "arn:aws:secretsmanager:us-west-2:123456789012:secret:secret-abcdef",[\n]"
    17:33:30,909 DEBUG org.apache.http.wire                                          - http-outgoing-0 << ""CreatedDate": 1.523477145713E9,[\n]"
    17:33:30,909 DEBUG org.apache.http.wire                                          - http-outgoing-0 << ""Name": "NAME",[\n]"
    17:33:30,909 DEBUG org.apache.http.wire                                          - http-outgoing-0 << ""VersionId": "EXAMPLE1-90ab-cdef-fedc-ba987SECRET1",[\n]"
    17:33:30,909 DEBUG org.apache.http.wire                                          - http-outgoing-0 << ""VersionStages": ["AWSPREVIOUS"],[\n]"
    17:33:30,909 DEBUG org.apache.http.wire                                          - http-outgoing-0 << ""SecretString": "{"password":"test,"dbname":"test","engine":"postgres","port":5432,"dbInstanceIdentifier":"test","host":"somehost","username":"test"}"[\n]"
    17:33:30,909 DEBUG org.apache.http.wire                                          - http-outgoing-0 << "}[\r][\n]"
    17:33:30,909 DEBUG org.apache.http.wire                                          - http-outgoing-0 << "0[\r][\n]"
    17:33:30,909 DEBUG org.apache.http.wire                                          - http-outgoing-0 << "[\r][\n]"
    Left(software.amazon.awssdk.core.exception.SdkClientException: Unable to unmarshall response (software.amazon.awssdk.thirdparty.jackson.core.JsonParseException: Unexpected character ('p' (code 112)): was expecting comma to separate Object entries
     at [Source: (software.amazon.awssdk.http.AbortableInputStream); line: 7, column: 21]). Response Code: 200, Response Text: OK)
    Mikhail Nemenko
    @eniqen
    do you have any idea what is wrong ? if I change SecretString to simple string like "HELLO FROM CHAT" is works
    1 reply
    also I'm passing some java properties inside sbt build like this set javaOptions in Test ++= Seq("-Daws.accessKeyId=123", "-Daws.secretAccessKey=321")
    and have manager client like this
      private def buildSecretManagerClient(dbConfig: DBConfig): SecretsManagerClient =
        SecretsManagerClient.builder
          .region(Region.of(dbConfig.region))
          .endpointOverride(new java.net.URI("http://localhost:8080"))
          .httpClientBuilder(ApacheHttpClient.builder)
          .build
    hidayath85
    @hidayath85
    Hi , i am using Aws java sdk v2 facing connection pool shutdown error, my application deployed in aws cluster connecting with service account.
    S3Client.builder().region(Region.of("us-west2")).build();
    @Bean(destroyMethod = "close")
    public S3Client getAWSS3client(final AuditActivityProperties activityProps) {
    LOGGER.info("AWS S3 ClientConfig initializing");
        return S3Client.builder().region(Region.of("us-west2")).build();
    }
    any clues
    1 reply
    hidayath85
    @hidayath85
    i tried without destory method also , but still same error, connection pool shut down
    @Bean
    public S3Client getAWSS3client(final AuditActivityProperties activityProps) {
    LOGGER.info("AWS S3 ClientConfig initializing");
        return S3Client.builder().region(Region.of("us-west2")).build();
    }
    Ali Imran
    @aliimran-pk
    I am unable to parse any pdf using textrat aws management console , however image of that pdf working fine
    is this a bug in textract in aws management console
    ?
    Emmanuel Kaku
    @gindeli05_gitlab
    how to I set up ssm sdk
    Faiz Kidwai
    @fykidwai
    Is S3TransferManager stable enough to be used in production, considering it is still in PREVIEW mode?
    Debora N. Ito
    @debora-ito
    @fykidwai we don't recommend using anything in PREVIEW mode in production environments, as breaking changes can still occur. We are working towards the GA release of TransferManager V2.
    Aster
    @asterd
    Hi guys.. someone experience a 503 error when try to createEndpoint on sns?
    the strange thing is that the endpoint is created but the call throws a 503 exception and I can't read the associated ARN
    Trunks
    @purpletrunks_twitter
    Hello everyone,
    Can someone explain to me how the AWS SDK for Java 2.x makes request to AWS KMS? I want to know about the achitecture and security of it. Like how does the request get transmitted from my application all the way down to the KMS service.
    Daniel (dB.) Doubrovkine
    @dblock
    Is there a better way to make gzip-compressed requests with AWS SDK v2 for Java?
    String payload = "{\"test\": \"val\"}";
    
    ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
    GZIPOutputStream gzipOutputStream = new GZIPOutputStream(outputStream);
    gzipOutputStream.write(payload.getBytes("UTF-8"));
    gzipOutputStream.close();
    
    SdkHttpFullRequest request = SdkHttpFullRequest.builder()
                    .method(SdkHttpMethod.POST)
                    .uri(URI.create(ENDPOINT + "/index_name/type_name/document_id"))
                    .appendHeader("Content-Type", "application/json")
                    .appendHeader("Content-Encoding", "gzip")
                    .contentStreamProvider(() -> new ByteArrayInputStream(outputStream.toByteArray()))
                    .build();
    
    ...
    And, how can I do chunked transfer-encoding?
    Dmitry
    @electronic-dk

    Hello everyone! Sorry if this has been asked before. I'm trying to migrate to AWS sdk v2 and I'm now working on rewriting our dynamodb repositories. Straightforward stuff (like putting and retrieving items by key) was pretty smooth, but I'm struggling with replacing DynamoQueryBuilder and Conditions. Is there a java type safe way to build queries in dynamodb sdk v2 or do I have to use string representations of queries?

    I found classes like QueryRequest and Condition, but can't find a way to use them. Plus, Condition uses ConditionalOperator and the javadoc says it's deprecated

    Dmitry
    @electronic-dk
    The javadoc says "Use FilterExpression instead", but I can't find any way to generate the string for the filter expression by some builder
    Dmitry
    @electronic-dk
    I've also found software.amazon.awssdk.enhanced.dynamodb.Expression and its corresponding builder, but it still requires strings as arguments
    Dmitry
    @electronic-dk
    For anyone else interested in this feature, I think this is the github issue tracking this request, so please upvote it to show your interest. aws/aws-sdk-java-v2#2995
    G V Navin
    @gvnavin

    Hi folks,

    I am trying to make the chime video recording using aws sdk. I couldn't find the class - CompositedVideoArtifactsConfiguration
    https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/chimesdkmediapipelines/model/ArtifactsConfiguration.html

    I added the below lines in gradle
    implementation(platform("software.amazon.awssdk:bom:2.19.5"))
    implementation("software.amazon.awssdk:chime")

    Any insights on this will be super helpful.

    Vachana Shetty
    @vachana
    Hello, anybody know if there's similar package to com.amazonaws.services.dynamodbv2.document.TableWriteItems available in the v2?
    Garimendra Verma
    @garimendra_gitlab
    is it possible to get count of items based on query condition for dynamodb enhanced ?
    1 reply
    Petre Barna
    @pebarna
    Hi there, has anyone used the SDK with S3 MRAP so far? There docs are pretty light on this